Thread: Problem compiling PostgreSQL 8.2.3 on RedHat Enterprise Server 2.1?
When I try to compile I get the following error...: gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -fno-strict-aliasing -fpic -DFRONTEND -I. -I../../../src/include -D_GNU_SOURCE -I../../../src/port -c -o pgstrcasecmp.o pgstrcasecmp.c rm -f thread.c && ln -s ../../../src/port/thread.c. gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -fno-strict-aliasing -fpic -DFRONTEND -I. -I../../../src/include -D_GNU_SOURCE -I../../../src/port -c -o thread.o thread.c rm -f strlcpy.c && ln -s ../../../src/port/strlcpy.c . gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -fno-strict-aliasing -fpic -DFRONTEND -I. -I../../../src/include -D_GNU_SOURCE -I../../../src/port -c -o strlcpy.o strlcpy.c ar crs libpq.a fe-auth.o fe-connect.o fe-exec.o fe-misc.o fe-print.o fe-lobj.o fe-protocol2.o fe-protocol3.o pqexpbuffer.o pqsignal.o fe-secure.o md5.o ip.o wchar.o encnames.o noblock.o pgstrcasecmp.o thread.o strlcpy.o ranlib libpq.a echo '{ global:' >exports.list gawk '/^[^#]/ {printf "%s;\n",$1}' exports.txt >>exports.list echo ' local: *; };' >>exports.list gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -fno-strict-aliasing -fpic -shared -Wl,-soname,libpq.so.5 -Wl,--version-script=exports.list fe-auth.o fe-connect.o fe-exec.o fe-misc.o fe-print.o fe-lobj.o fe-protocol2.o fe-protocol3.o pqexpbuffer.o pqsignal.o fe-secure.o md5.o ip.o wchar.o encnames.o noblock.o pgstrcasecmp.o thread.o strlcpy.o -L../../../src/port -lssl -lcrypto -lcrypt -Wl,-rpath,'/usr/local/pgsql/lib' -o libpq.so.5.0 /usr/bin/ld:exports.list:1:parse error in VERSION script collect2: ld returned 1 exit status make[3]: *** [libpq.so.5.0] Error 1 make[3]: Leaving directory `/usr/local/src/postgresql-8.2.3/src/interfaces/libpq' make[2]: *** [all] Error 2 make[2]: Leaving directory `/usr/local/src/postgresql-8.2.3/src/interfaces' make[1]: *** [all] Error 2 make[1]: Leaving directory `/usr/local/src/postgresql-8.2.3/src' make: *** [all] Error 2 How do I fix this? Regards, BTJ -- ----------------------------------------------------------------------------------------------- Bjørn T Johansen btj@havleik.no ----------------------------------------------------------------------------------------------- Someone wrote: "I understand that if you play a Windows CD backwards you hear strange Satanic messages" To which someone replied: "It's even worse than that; play it forwards and it installs Windows" -----------------------------------------------------------------------------------------------
=?UTF-8?Q?Bj=C3=B8rn?= T Johansen <btj@havleik.no> writes: > When I try to compile I get the following error...: > /usr/bin/ld:exports.list:1: parse error in VERSION script > collect2: ld returned 1 exit status > make[3]: *** [libpq.so.5.0] Error 1 That ancient version of ld doesn't understand version scripts of the syntax used today. You could figure out what syntax it does understand and then tweak src/interfaces/libpq/Makefile to generate the right thing. Or you could just rip out this whole conditional section and not bother with restricting symbol visibility: ifeq ($(PORTNAME), linux) $(shlib): exports.list exports.list: exports.txt echo '{ global:' >$@ $(AWK) '/^[^#]/ {printf "%s;\n",$$1}' $< >>$@ echo ' local: *; };' >>$@ exported_symbols_list = -Wl,--version-script=exports.list endif I'm a bit curious though why you want to run a modern version of Postgres on such an ancient platform ... newer Linuxen are a *whole* lot better than AS2.1. regards, tom lane
On Sat, 21 Apr 2007 12:01:46 -0400 Tom Lane <tgl@sss.pgh.pa.us> wrote: > =?UTF-8?Q?Bj=C3=B8rn?= T Johansen <btj@havleik.no> writes: > > When I try to compile I get the following error...: > > /usr/bin/ld:exports.list:1: parse error in VERSION script > > collect2: ld returned 1 exit status > > make[3]: *** [libpq.so.5.0] Error 1 > > That ancient version of ld doesn't understand version scripts of the > syntax used today. You could figure out what syntax it does understand > and then tweak src/interfaces/libpq/Makefile to generate the right thing. > Or you could just rip out this whole conditional section and not bother > with restricting symbol visibility: > > ifeq ($(PORTNAME), linux) > $(shlib): exports.list > > exports.list: exports.txt > echo '{ global:' >$@ > $(AWK) '/^[^#]/ {printf "%s;\n",$$1}' $< >>$@ > echo ' local: *; };' >>$@ > > exported_symbols_list = -Wl,--version-script=exports.list > endif > > I'm a bit curious though why you want to run a modern version of > Postgres on such an ancient platform ... newer Linuxen are a *whole* > lot better than AS2.1. > > regards, tom lane This is because the server is running a webapp that was installed 4-5 years ago and we have now rewritten the webapp usingmore modern frameworks, etc and just installed this new webapp in production. But since the server has been behaving really well,we did not see any reasons to do anything with the OS as well (at least before we tried to install PostgreSQL...) But perhaps we should think about upgrading the OS as well.... BTJ