in reply to DynaLoader DBD::mysql and Solaris 2.7
I fixed this. It seems that the Solaris 2.7 and 2.8 linkers have a subtle difference. I'm using gcc but I'm assuming it uses the native linker somewhere. I used to know this stuff when I coded C, but Perl spoiled me ... At any rate, my linker line looked like this on each system:
I had to change the Solaris 2.7 line to this:LD_RUN_PATH="/usr/lib:/usr/local/lib" /usr/local/bin/perl myld gcc -G + -L/usr/local/lib dbdimp.o mysql.o -o blib/arch/auto/DBD/mysql/mysql. +so -lmysqlclient -lcrypt -lgen -lsocket -lnsl -lm -lz
In other words, 2.7 wants an explicit *.a listed as part of the objects that make up the mysql.so shared library. 2.8 seems smart enough to know that if there's only a *.a to pull it in regardless of where it is on the linker command line. Note that there is no libmysqlclient.so on either system. I even built one on the 2.7 machine and that also failed.LD_RUN_PATH="/usr/lib:/usr/local/lib" /usr/local/bin/perl myld gcc -G + -L/usr/local/lib dbdimp.o mysql.o /usr/local/mysql/lib/libmysqlclien +t.a -o blib/arch/auto/DBD/mysql/mysql.so -lcrypt -lgen -lsocket -lns +l -lm -lz
For the record, in case some other unfortunate soul loses his weekend like I did over this, I changed one line in the generated Makefile (line 106 of mine):
where it was:OBJECT = $(O_FILES) /usr/local/mysql/lib/libmysqlclient.a
OBJECT = $(O_FILES)
I'm not seeing right now how to incorporate this into Makefile.PL or into the mysql_config file that's used. Not sure I care at this point.
|
|---|