Re: Perl modules problem on OS X

From: Alex Rice <alex_rice(at)arc(dot)to>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org, mapserver-users(at)lists(dot)gis(dot)umn(dot)edu
Subject: Re: Perl modules problem on OS X
Date: 2002-08-15 15:47:30
Message-ID: 4E7FC7AE-B066-11D6-94C8-000393529642@arc.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Wednesday, August 14, 2002, at 04:07 PM, Tom Lane wrote:

> Alex Rice <alex_rice(at)arc(dot)to> writes:
>> dyld: perl multiple definitions of symbol _DLAddHead
>> /Library/Perl/darwin/auto/mapscript/mapscript.bundle definition
>> of _DLAddHead
>> /Library/Perl/darwin/auto/DBD/Pg/Pg.bundle definition of _DLAddHead
>
>> The strange thing is, of the 3 modules DBI, Pg and mapscript, all
>> 3 work OK independently, but when I use; any two them from the
>> same script, the above symbol definitions problem occurs and the
>> script dies.
>
> Hm. It would appear that all three modules have copies of libpq.a
> statically bound into them, and OS X's dynamic loader won't accept
> loading dynamic libraries with conflicting symbol names.
>
> DLAddHead is presumably just the first conflict the loader ran into
> --- if you got rid of that, it'd still fail on PQExec and the other
> symbols exported by libpq.
>
> I imagine that this can be worked around by changing the way that
> these modules are linked, but I really have no idea exactly what has
> to be done or by whom. You might try asking around among OSX gurus
> about what to do with name conflicts between libraries.

OK I managed to get DBD::Pg to link dynamically and I'm no longer
getting the error. DBD::Pg seemed to insist on linking with
libpq.a, so I hid libpq.a and then it linked with libpq.so,
apparently. No more errors!

Alex Rice, Software Developer
Architectural Research Consultants, Inc.
alex_rice(at)arc(dot)to
alrice(at)swcp(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Justin Clift 2002-08-15 15:52:11 Re: Why choose PostreSQL and not MySQL or Oracle!!
Previous Message Joe Conway 2002-08-15 15:42:51 Re: Bulk row fetching