Thread: 8.3.-build fails due parse error in VERSION script

8.3.-build fails due parse error in VERSION script

From
peter pilsl
Date:
#make
<skip>
make[3]: Entering directory
`/opt_noraid/src/postgresql-8.3.0/src/interfaces/libpq'
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
-L/usr/local/lib -lssl -lcrypto -lcrypt
-Wl,-rpath,'/usr/local/pgsql8.3/lib' -o libpq.so.5.1
/usr/bin/ld:exports.list:1: parse error in VERSION script
collect2: ld returned 1 exit status
make[3]: *** [libpq.so.5.1] Error 1


The machine is a very old machine, that uses GNU ld 2.11.90.0.8 but it
was able to compile and run postgres8.0.13 without any troubles.

And I dont want to upgrade binutils (and probably the whole server)
until I have to.


The problem is probably with the format of exports.list.  In 8.3.0 a
file exports.list is created by the make-process with a gawk-command out
of exports.txt if it does not exist yet (see output of my make-command
above) and this exports.list then makes the troubles.

In 8.0.13 there is only exports.txt and no exports.list and during make
no exports.list is created.

To me it seems that exports.list is kind of new format of exports.txt
(if you compare the two files: same content in different format) and I
wonder if I can tell 8.3.0 to use the old exports.txt-file/format
instead of new exports.list.


I found a similar problem in the pgsql-hacker-list with 8.2beta2 at
http://archives.postgresql.org/pgsql-hackers/2006-10/msg01507.php
and Tom Lane suggested in a follow-up, that there could be a strip-down
in postgres-requirements on exports.list.


thnx,
peter







Re: 8.3.-build fails due parse error in VERSION script

From
Peter Eisentraut
Date:
Am Dienstag, 5. Februar 2008 schrieb peter pilsl:
> The machine is a very old machine, that uses GNU ld 2.11.90.0.8 but it
> was able to compile and run postgres8.0.13 without any troubles.

Yes, it is a known problem that "old" Linux systems can't build newer
PostgreSQL releases.  You can edit the makefile and remove the export list,
but there is no simpler or better-defined way available.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

Re: 8.3.-build fails due parse error in VERSION script

From
Richard Huxton
Date:
peter pilsl wrote:
>
> #make

> /usr/bin/ld:exports.list:1: parse error in VERSION script
> collect2: ld returned 1 exit status
> make[3]: *** [libpq.so.5.1] Error 1
>
> The machine is a very old machine, that uses GNU ld 2.11.90.0.8 but it
> was able to compile and run postgres8.0.13 without any troubles.
>
> And I dont want to upgrade binutils (and probably the whole server)
> until I have to.
>
> The problem is probably with the format of exports.list.  In 8.3.0 a
> file exports.list is created by the make-process with a gawk-command out
> of exports.txt if it does not exist yet (see output of my make-command
> above) and this exports.list then makes the troubles.
>
> In 8.0.13 there is only exports.txt and no exports.list and during make
> no exports.list is created.

I've worked around this by removing the offending lines from the
Makefiles in question.

You're looking for lines resembling:
   exported_symbols_list = -Wl,--version-script=exports.list
There are in platform-specific sections so make sure you get the linux
ones. There were half a dozen makefiles that needed lines commenting out.

Maybe someone of a more developer background can comment on any risks,
but it didn't seem to cause any problems for me. Happily for me, that
server is being replaced in the immediate future, so it's not something
I'll have to do again.

--
   Richard Huxton
   Archonet Ltd