Hello, I have a problem with Perl 5.6.0 on OS X 10.1.5. I am 
using the Mapscript perl module and I need to connect to 
PostgreSQL from the same script. I tried DBI/DBD::Pg and I also 
have tried the Pg module that comes with PostgreSQL. Both fail at 
runtime with "multiple definitions of symbol" error. At appears 
all of these modules, and Perl itself, have been compiled with 
-flat_namespace. All of these modules seem to work fine 
independently. However, when mapscript module is combined with Pg 
or DBD::Pg, it fails.

Any suggestions would be appreciated.

--script 1 --
#!/usr/bin/perl
use mapscript;
use Pg;
$conn = Pg::connectdb("dbname=aps");
die("ok");

--output of script 1--
loading libraries for image: perl
loading library: /System/Library/Perl/darwin/CORE/libperl.dylib
loading library: /usr/lib/libSystem.B.dylib
loading libraries for image: 
/System/Library/Perl/darwin/CORE/libperl.dylib
loading libraries for image: /usr/lib/libSystem.B.dylib
loading libraries for image: 
/Library/Perl/darwin/auto/mapscript/mapscript.bundle
loading library: /usr/lib/libz.1.1.3.dylib
loading libraries for image: /usr/lib/libz.1.1.3.dylib
loading libraries for image: /Library/Perl/darwin/auto/Pg/Pg.bundle
dyld: perl multiple definitions of symbol _DLAddHead
/Library/Perl/darwin/auto/mapscript/mapscript.bundle definition 
of _DLAddHead
/Library/Perl/darwin/auto/Pg/Pg.bundle definition of _DLAddHead

-- script 2--
#!/usr/bin/perl
use mapscript;
use DBI;
print join("\n", DBI->data_sources('Pg'));
die("ok");

-- output of script 2--
loading libraries for image: perl
loading library: /System/Library/Perl/darwin/CORE/libperl.dylib
loading library: /usr/lib/libSystem.B.dylib
loading libraries for image: 
/System/Library/Perl/darwin/CORE/libperl.dylib
loading libraries for image: /usr/lib/libSystem.B.dylib
loading libraries for image: 
/Library/Perl/darwin/auto/mapscript/mapscript.bundle
loading library: /usr/lib/libz.1.1.3.dylib
loading libraries for image: /usr/lib/libz.1.1.3.dylib
loading libraries for image: /Library/Perl/darwin/auto/DBI/DBI.bundle
loading libraries for image: /Library/Perl/darwin/auto/DBD/Pg/Pg.bundle
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


Alex Rice, Software Developer
Architectural Research Consultants, Inc.
[EMAIL PROTECTED]
[EMAIL PROTECTED]


Reply via email to