Accueil > Bugzilla, Mozilla > Installing DBD::mysql: what a pain!

Installing DBD::mysql: what a pain!

I wanted to test Bugzilla on Windows 7 using Perl 5.12.0. I first installed ActivePerl 5.12.0. Unfortunately, DBD::mysql is missing from the PPM repository. So I installed Microsoft Visual C++ 2010 express to use nmake.exe and compile DBD::mysql myself, but it keeps throwing errors:

C:\Users\buclin\Downloads\dbd-mysql>"\Program Files\Microsoft Visual Studio 10.0\VC\bin\nmake.exe"

Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
Copyright (C) Microsoft Corporation. Tous droits réservés.

syntax error at -e line 1, near "‘755′)"
Missing right curly or square bracket at -e line 1, at end of line
Execution of -e aborted due to compilation errors.
NMAKE : fatal error U1077: ‘C:\Perl\bin\perl.exe’ : code retour ‘0xff’
Stop.

I then installed Strawberry Perl 5.12.0, which already has DBD::mysql, but now I get the following error when accessing Bugzilla from the web browser:

Software error:

install_driver(mysql) failed: Can’t load ‘C:/strawberry/perl/vendor/lib/auto/DBD/mysql/mysql.dll’ for module DBD::mysql: load_file: Le module spécifié est introuvable at C:/strawberry/perl/lib/DynaLoader.pm line 200.
at (eval 938) line 3
Compilation failed in require at (eval 938) line 3.
Perhaps a required shared library or dll isn’t installed where expected
at Bugzilla/DB.pm line 1095

I wasted several hours playing with ActivePerl, Strawberry Perl and Visual C++, with no success. :( Someone, please compile DBD::mysql successfully and put it in the ActivePerl PPM repository! Thanks!

About these ads
Catégories:Bugzilla, Mozilla
  1. 16 mai 2010 à 8:26  

    Maybe install ActivePerl 5.10.1.1007? It’s a simple "ppm install DBD::mysql" then.

  2. Frédéric Buclin
    16 mai 2010 à 10:57  

    I know, but my goal is to test Bugzilla against Perl 5.12. I had Perl 5.10.x for a long time (and things were indeed working nicely, including DBD::mysql). :)

  3. glob
    16 mai 2010 à 12:40  

    strawberryperl 5.12 includes a precompiled DBD::mysql.

  4. Frédéric Buclin
    16 mai 2010 à 12:55  

    I know. That’s the one which throws the error above. :(

  5. glob
    16 mai 2010 à 1:40  

    you’ll need libmysql.dll in your path, or in your auto/DBD/mysql directory.
    strawberryperl was expecting this file to be libmysql_.dll, don’t know why :)

    • Frédéric Buclin
      16 mai 2010 à 1:57  

      Hum, I copied libmySQL.dll from MySQL into auto/DBD/mysql/, but this has no effect. Why does it need this file when the one it’s complaining about, i.e. mysql.dll, is already in auto/DBD/mysql/?. Could this be a problem with my version of MySQL, 5.5.3?

  6. Frédéric Buclin
    17 mai 2010 à 11:20  

    For the record, and thanks to glob, the way to fix the problem with Strawberry Perl is to copy C:\strawberry\c\bin\libmysql_.dll to C:\strawberry\perl\vendor\lib\auto\DBD\mysql\libmysql_.dll. Yay!

    • sunny
      11 septembre 2013 à 6:59  

      Thanks Federic. YOur response saved my day. Thanks a ton! It works

  7. 28 mai 2010 à 5:28  

    Best to put the MySQL DLLs in Perl’s bin\MSWin32… directory, not in auto, and make sure that this is in your (Windows) PATH.

    I don’t use Strawberry, but I did compile this module just fine with a MinGW Perl and it does work for me, with the DLL in Perl’s architecture specific binary folder.

  8. 3 juin 2010 à 7:08  

    Frédéric: Glad to hear you got the problem solved… I’ll make sure the file is installed copied in future versions of Strawberry Perl.

    As for the question about why it’s built as libmysql_.dll – it’s so any other libmysql.dll that may be on the system does not conflict with it.

  9. 27 août 2010 à 4:20  

    thanks for installing DBD guide.

  10. Rakyat Betul
    10 octobre 2013 à 8:35  

    Thanks Frédéric.. you saved my arse… thank you very much!

  11. louis
    25 mars 2014 à 12:24  

    legend, probably needs adding to bugzilla wiki for strawberry perl build notes

  1. No trackbacks yet.

Laisser un commentaire

Entrez vos coordonnées ci-dessous ou cliquez sur une icône pour vous connecter:

Logo WordPress.com

Vous commentez à l'aide de votre compte WordPress.com. Déconnexion / Changer )

Image Twitter

Vous commentez à l'aide de votre compte Twitter. Déconnexion / Changer )

Photo Facebook

Vous commentez à l'aide de votre compte Facebook. Déconnexion / Changer )

Photo Google+

Vous commentez à l'aide de votre compte Google+. Déconnexion / Changer )

Connexion à %s

Suivre

Recevez les nouvelles publications par mail.