dhosek has asked for the wisdom of the Perl Monks concerning the following question:

I'm trying to track down a problem with installing DBD::mysql on my Mac. What appears to be the issue is that mysql.so is not being created. I'm unable to tell where the file is generated via Makefile.PL/Makefile so I can track down a little closer where the problem is.

Donald Hosek, Tech Lead at oversee.net
L.A. perl people, we're hiring.
  • Comment on DBD::mysql installation problem (Mac OS X 10.5.2)

Replies are listed 'Best First'.
Re: DBD::mysql installation problem (Mac OS X 10.5.2)
by Your Mother (Archbishop) on Apr 08, 2008 at 04:53 UTC

    I have never had that suite pass its tests on OS X and I've been installing it since the Public Beta. There are several environment variables you should set if you actually want to try to get the tests passing (try it from a command line instead of the CPAN shell and check all the verbose test feedback for what you should set). I would not normally recommend this but I've done "force install" on that package (in its various versions) on OS X beta, 10, 10.1, 10.2, 10.3, 10.4, and 10.5 (on three different boxes; one Intel) and I've never had a single problem with DBI code using MySQL.

Re: DBD::mysql installation problem (Mac OS X 10.5.2)
by dragonchild (Archbishop) on Apr 08, 2008 at 13:30 UTC
    Over the past couple years, I have ignored the DBD::mysql test suite completely when installing, regardless of system. It has always worked, so long as I know to make sure that mysql and mysqlconfig are in the PATH. YMMV.

    My criteria for good software:
    1. Does it work?
    2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?
      I've resolved the issue: Apparently there's an incompatibility with the libraries which are shipped with the mySQL binary for OS X and the Leopard XCode. Rebuilding MySQL from source resolved the issue.

      Donald Hosek, Tech Lead at oversee.net
      L.A. perl people, we're hiring.
Re: DBD::mysql installation problem (Mac OS X 10.5.2)
by dhosek (Beadle) on Apr 08, 2008 at 06:03 UTC
    Just a quick note that I've been posting about this at my blog as well. The problem is actually something a bit different.

    Looking closer, I'm seeing that the .bs and .bundle files are apparently the ones that apply now. Interestingly using prove -b t/00base.t does in fact work. But make test has the same test fail...

    Ignoring that issue, I move on to the next test:

    prove -b t/10connect.t t/10connect......dyld: lazy symbol binding failed: Symbol not found: _ +mysql_server_init Referenced from: /Users/dhosek/.cpan/build/DBD-mysql-4.006-j5Hpiv/bl +ib/arch/auto/DBD/mysql/mysql.bundle Expected in: dynamic lookup dyld: Symbol not found: _mysql_server_init Referenced from: /Users/dhosek/.cpan/build/DBD-mysql-4.006-j5Hpiv/bl +ib/arch/auto/DBD/mysql/mysql.bundle Expected in: dynamic lookup t/10connect...... Failed 2/2 subtests Test Summary Report ------------------- t/10connect.t (Wstat: 5 Tests: 0 Failed: 0) Parse errors: Bad plan. You planned 2 tests but ran 0. Files=1, Tests=0, 0 wallclock secs ( 0.01 usr 0.00 sys + 0.04 cusr + 0.00 csys = 0.05 CPU) Result: FAIL
    Donald Hosek, Tech Lead at oversee.net
    L.A. perl people, we're hiring.
        Sounds that way to me too. The problem is what exactly is going on... More data:
        mysql_config Usage: /usr/local/mysql/bin/mysql_config [OPTIONS] Options: --cflags [-I/usr/local/mysql/include -Os -arch x86_64 +-fno-common] --include [-I/usr/local/mysql/include] --libs [-L/usr/local/mysql/lib -lmysqlclient -lz -lm +] --libs_r [-L/usr/local/mysql/lib -lmysqlclient_r -lz - +lm] --socket [/tmp/mysql.sock] --port [3306] --version [5.0.51a] --libmysqld-libs [-L/usr/local/mysql/lib -lmysqld -lz -lm]
        I'm noticing that /usr/local/mysql/lib does not have libm.* in it although it does have libz.a and libmysqlclient.(a|dylib).

        Donald Hosek, Tech Lead at oversee.net
        L.A. perl people, we're hiring.