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

Hi,
I have been fruitlessly trying for days to install the Mysql::DBD on my Mac OS X Version 10.3.9
I have already installed Mysql, DBI and Data-Showtable.
I have downloaded various versions of the DBD packages, but the gist of my problem is that when I run make test, only 5% of the tests are successful and I get a million errors of this sort:

/Users/Shared/programmes/Programming/DBD-mysql-3.0002/blib/arch/auto/D +BD/mysql/mysql.bundle undefined reference to _mysql_stmt_errno expect +ed to be defined in a dynamic image /Users/Shared/programmes/Programming/DBD-mysql-3.0002/blib/arch/auto/D +BD/mysql/mysql.bundle undefined reference to _mysql_stmt_error expect +ed to be defined in a dynamic image /Users/Shared/programmes/Programming/DBD-mysql-3.0002/blib/arch/auto/D +BD/mysql/mysql.bundle undefined reference to _mysql_stmt_execute expe +cted to be defined in a dynamic image /Users/Shared/programmes/Programming/DBD-mysql-3.0002/blib/arch/auto/D +BD/mysql/mysql.bundle undefined reference to _mysql_stmt_fetch expect +ed to be defined in a dynamic image /Users/Shared/programmes/Programming/DBD-mysql-3.0002/blib/arch/auto/D +BD/mysql/mysql.bundle undefined reference to _mysql_stmt_fetch_column + expected to be defined in a dynamic image

I tried just installing the Msql-Mysql-modules-1.2219, but was getting errors already at the Makefile.pl stage.
With the package DBD-mysql-3.0002, the Makefile.PL and the make itself run without any errors after a bit of tweaking here and there.
My Perl is the Mac standard revision 5.0 version 8 subversion 1 RC3 with multilevel threading
If anyone can help, I would be very grateful: I have seen this question in a few different forums but noone seems to have got any answers to this.

Regards, Blackrussian

Edit: g0n - added code tags

2005-10-19 Retitled by g0n, as per Monastery guidelines
Original title: 'Installing MySQL::DBD on Mac OS X - Problems'

Replies are listed 'Best First'.
Re: Installing DBD::MySQL on Mac OS X - Problems
by marto (Cardinal) on Oct 19, 2005 at 09:11 UTC
    Hi blackrussian,

    Have you considered using Cpan.pm to install the module?
    See the node Re: Perl on macOSX Darwin for details.
    If you are having problems installing this by hand I think it may be worth a try.
    The module install nodes have a secton on Cpan installation.

    On a different note, should you wish to upgrade the Perl version your running have a read at this.
    I know this is not part of your question, but a few OSX users have asked me about this in the past.

    Also I notice this is your first post (under this user anyway), welcome :)
    Please read the PerlMonks FAQ if you have not done so already.

    Update: Just to be clear, I am not suggesting that your problems are related to the version of Perl you are running. I provided the link on upgrading as an aside.

    Hope this helps.

    Martin
      Hi Martin,
      thanks for your reply. Yes, I orginally tried to install using CPAN, but even CPAN doesn't seem to be working. Whenever I try to install anything I get this kind of error:
      cpan> install Net::Ping CPAN: Storable loaded ok Going to read /var/root/.cpan/Metadata Database was generated on Sat, 28 May 2005 20:56:04 GMT CPAN: LWP::UserAgent loaded ok Fetching with LWP: ftp://ftp.perl.org/pub/CPAN/authors/01mailrc.txt.gz Useless content call in void context at /Library/Perl/5.8.1/LWP/Protoc +ol/ftp.pm line 398 LWP failed with code[400] message[FTP return code 000] Fetching with Net::FTP: ftp://ftp.perl.org/pub/CPAN/authors/01mailrc.txt.gz
      etc.etc. I am not sure how to go about recompiling or resetting the CPAN module, since something seems to be fundamentally wrong here.

      Would you have any tips for me??! Thanks, BR

        Hi blackrussian,

        To reconfigure the CPAN module options type "o conf init" from the "cpan>" prompt.
        This is in the CPAN.pm documentation.
        Reselecting your mirrors may be the answer here, if you are unable to FTP any modules down.
        Can you manually ftp this file from the location in the error message?
        Let me know how you get on.

        Hope this helps.

        Martin
Re: Installing DBD::MySQL on Mac OS X - Problems
by Fang (Pilgrim) on Oct 19, 2005 at 11:03 UTC

    Hello blackrussian,

    I have been developping Perl projects on that very same platform you're using, but never encountered a problem such as yours. First and foremost, use the CPAN module as marto suggested. Next, remember that many of the tests performed by DBD::mysql need to be able to connect to the mysql server. You should have seen something like this when running perl Makefile.PL:

    I will use the following settings for compiling and testing: cflags (mysql_config) = -I/usr/local/mysql/include -Os -arch +ppc -fno-common embedded (mysql_config) = libs (mysql_config) = -L/usr/local/mysql/lib -lmysqlclient +-lz -lm mysql_config (guessed ) = mysql_config nocatchstderr (default ) = 0 nofoundrows (default ) = 0 ssl (guessed ) = 0 testdb (default ) = test testhost (default ) = testpassword (default ) = testsocket (default ) = testuser (default ) = To change these settings, see 'perl Makefile.PL --help' and 'perldoc INSTALL'.

    You can correct these settings either by adding arguments to the command, as in perl Makefile.PL --testuser=foo --testpassword=bar or by using the CPAN module configuration options: o conf makepl_arg "--testuser=foo --testpassword=bar".

    Try again with that first, knowing that you shouldn't have to update your perl version at all (I didn't need to), but that doing it could be a solution if all else fails.

    Hope this helps.

      Hi there,
      yes, I have already sorted out all my Makefile commands and have used a valid user account for testing etc.
      I really don't want to have to start mucking about with my perl installation, but I suppose I'll try it if nothing else works...

      Thanks, BR