Skip site navigation (1) Skip section navigation (2)

Cleaning up multiply-defined-symbol warnings on OS X

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-patches(at)postgreSQL(dot)org
Subject: Cleaning up multiply-defined-symbol warnings on OS X
Date: 2006-04-20 01:16:02
Message-ID: 5733.1145495762@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-patches
Recent versions of Darwin spew a lot of multiply-defined-symbol warnings
while building Postgres, mostly because the programs in src/bin import
both libpq and libpgport, and libpq includes copies of many of the
libpgport files.  Since the libpgport routines aren't officially part of
the libpq API, it'd be better if those symbols weren't visible from
outside libpq.  The attached patch makes this so, using the already
existing exports.txt list as the definition of libpq's official API.

I found while testing the patch that we have one API leak in current
sources: ecpglib is depending on the libpq-exported pqGetpwuid()
because src/port/path.c requires it but src/port/thread.c isn't included
into ecpglib.  The patch corrects this oversight.  This BTW is
sufficient reason for a libpq major version bump if we apply this patch;
we learned that lesson last time we fixed an API leak.  (Did we already
bump libpq's major version for 8.2?  I don't recall.)

The reason I didn't go ahead and apply this is that I'm wondering if
there's some more-portable solution that would work for other platforms
besides Darwin.  I seem to recall that we've discussed the point before,
but no patch has been forthcoming.

Comments?

			regards, tom lane

Responses

pgsql-patches by date

Next:From: Theo SchlossnagleDate: 2006-04-20 02:54:27
Subject: BUG #2401: spinlocks not available on amd64
Previous:From: Tom LaneDate: 2006-04-19 23:18:40
Subject: Re: [PATCH] Reduce noise from tsort

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group