Continue to export pqsignal() from libpq.so? - Mailing list pgsql-hackers

From Tom Lane
Subject Continue to export pqsignal() from libpq.so?
Date
Msg-id 26575.1363545190@sss.pgh.pa.us
Whole thread Raw
List pgsql-hackers
I just noticed that libpq no longer builds on my OS X machine:

Undefined symbols for architecture x86_64: "_pqsignal", referenced from:    -exported_symbol[s_list] command line
option
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make[3]: *** [libpq.5.6.dylib] Error 1

It appears that (1) pqsignal() is not needed in libpq itself if you're
building with ENABLE_THREAD_SAFETY on, and (2) this causes OS X's linker
to not bind it into the shlib from libpgport.a, even though it's needed
according to the exported-symbols list.  (It kinda looks like this is
happening on my Linux box too, but the Linux linker doesn't complain
about the unsatisfied reference :-(.)

The easiest fix for this would be to remove pqsignal from the
exports.txt list for libpq.  Now that we have it in libpgport, there's
no need so far as our own code goes for libpq to provide it, and it was
never an "official" part of the API for libpq.so.  However that fix is
potentially an ABI break if anything else is (perhaps unintentionally)
depending on pqsignal.

If we don't do that then we need some kluge to force it to be bound into
the shlib even though it's not used therein.

Thoughts?
        regards, tom lane



pgsql-hackers by date:

Previous
From: Guillaume Lelarge
Date:
Subject: Re: [COMMITTERS] pgsql: Move pqsignal() to libpgport.
Next
From: Boszormenyi Zoltan
Date:
Subject: Re: Strange Windows problem, lock_timeout test request