Обсуждение: Installation of contrib/tablefunc - problems
Hi there, small problem with installing the tablefunc libs. I have a 8.3.1 running on my Mac 10.5. Now, I would like to add tablefunc. Last time, I did it the following way: # in the downloaded postgres package directory $ ./compile # in the tablefunc dir $ USE_PGXS=1 sudo make $ USE_PGXS=1 sudo make install $ psql -U ss_admin geodataportal < tablefunc.sql #(it's then being inserted into the public schema. Good?!) But, now, this doesn't work anymore. I get this error message: $ USE_PGXS=1 sudo make sed 's,MODULE_PATHNAME,$libdir/tablefunc,g' tablefunc.sql.in >tablefunc.sql gcc -no-cpp-precomp -O2 -Wall -Wmissing-prototypes -Wpointer-arith - Winline -Wdeclaration-after-statement -Wendif-labels -fno-strict- aliasing -fwrapv -I. -I../../src/include -c -o tablefunc.o tablefunc.c gcc -no-cpp-precomp -O2 -Wall -Wmissing-prototypes -Wpointer-arith - Winline -Wdeclaration-after-statement -Wendif-labels -fno-strict- aliasing -fwrapv -bundle -o tablefunc.so tablefunc.o - bundle_loader ../../src/backend/postgres ld: file not found: ../../src/backend/postgres collect2: ld returned 1 exit status make: *** [tablefunc.so] Error 1 rm tablefunc.o Can anyone give me a hint what I should do? Thanks a lot! Stef
Stefan Schwarzer wrote: > ld: file not found: ../../src/backend/postgres It appears to be trying to link to the postgres executable (which is presumably built with --export-dynamic to usefully permit that). The postgres executable doesn't appear to be there. At a guess, the module expects to be built from a particular location within the postgresql source tree, probably contrib/tablefunc, and you're building it somewhere else. -- Craig Ringer
>> ld: file not found: ../../src/backend/postgres > > It appears to be trying to link to the postgres executable (which is > presumably built with --export-dynamic to usefully permit that). The > postgres executable doesn't appear to be there. > > At a guess, the module expects to be built from a particular location > within the postgresql source tree, probably contrib/tablefunc, and > you're building it somewhere else. Yes, as indicated, I have a macports-postgres version, and try to get the tablefunc into that... What can I do now? Do you have any suggestions? How should postgres be compiled in order to allow a later insertion of tablefunc? Thanks for any hints, Stef
Stefan Schwarzer wrote: >>> ld: file not found: ../../src/backend/postgres >> >> It appears to be trying to link to the postgres executable (which is >> presumably built with --export-dynamic to usefully permit that). The >> postgres executable doesn't appear to be there. >> >> At a guess, the module expects to be built from a particular location >> within the postgresql source tree, probably contrib/tablefunc, and >> you're building it somewhere else. > > Yes, as indicated, I have a macports-postgres version, and try to get > the tablefunc into that... `tablefunc' is part of postgresql's contrib modules. It would normally be offered by a ports system that includes postgresql. > What can I do now? Do you have any suggestions? How should postgres be > compiled in order to allow a later insertion of tablefunc? If it's not available through macports, I'd ditch the macports version of postgresql and build it, and its contrib modules, myself. However, it looks like the MacPorts port simply omits that contrib module. You should be able to re-enable it by editing the Portfile, then rebuild the port. That's assuming there's not something preventing it from being built on Mac OS X, of course. The Portfile for postgresql contains a line: set contribs "adminpack dblink fuzzystrmatch lo pg_buffercache pg_trgm tsearch2 vacuumlo xml2" so it's worth a try to append tablefunc to that list and rebuild the port. It's been ages since I've used MacPorts (I don't have a mac, so I only use it occasionally on a work box) so I can't give you detailed instructions on how to do that. Here's the current portfile: http://trac.macports.org/projects/macports/browser/trunk/dports/databases/postgresql82/Portfile -- Craig Ringer