Continue to export pqsignal() from libpq.so?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)postgreSQL(dot)org
Subject: Continue to export pqsignal() from libpq.so?
Date: 2013-03-17 18:33:10
Message-ID: 26575.1363545190@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Browse pgsql-hackers by date

  From Date Subject
Next Message Boszormenyi Zoltan 2013-03-17 19:06:13 Re: Strange Windows problem, lock_timeout test request
Previous Message Guillaume Lelarge 2013-03-17 18:17:28 Re: [COMMITTERS] pgsql: Move pqsignal() to libpgport.