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:

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
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 /usr/local/mysql/lib/libmysqlclien +t.a -o blib/arch/auto/DBD/mysql/mysql.so -lcrypt -lgen -lsocket -lns +l -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.

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):

OBJECT = $(O_FILES) /usr/local/mysql/lib/libmysqlclient.a
where it was:
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.


In reply to Re: DynaLoader DBD::mysql and Solaris 2.7 by steves
in thread DynaLoader DBD::mysql and Solaris 2.7 by steves

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.