ActivePerl on OS X - assistence with installation

Posted by nierop on 2007-10-26 05:44
Forums: PPM | OS: OS X

Hi all,

I am very sorry to bother you, but atm I start to pullout my hairs out of my head in frustration.

I have worked a lot using Activeperl and Komodo on a WinXP system, but recently my boss gave me a Mac PowerBook Pro that runs OS X 10.4. Needless to say that getting to grips with Unix is hard, but I have been unable to get my Perl/Komodo development environment to work. I would like to request some assistence for this.

What have I done:

1. Install ActivePerl (installs to /usr/local/ActivePerl-5.8/)
2. Run the ppm and install CGI, DBD:mysql and DBI (installs to /Users/nierop/Library/ActivePerl/lib/)

Note: I have confirmed these downloaded packages are correctly located at this location.

Now, when I want to get to work in Komodo and would like to use the newly installed packages I include in the top of my script:

use lib '/Users/nierop/Library/ActivePerl/';

use DBD::mysql;
use DBI;
use CGI;

At this point Komod0 inducates that there is a problem by indicating 'use DBD::mysql' in red.

When I press the run button nevertheless, I get the following error:

Can't load '/Users/nierop/Library/ActivePerl/lib/auto/DBD/mysql/mysql.bundle' for module DBD::mysql: dlopen(/Users/nierop/Library/ActivePerl/lib/auto/DBD/mysql/mysql.bundle, 1): no suitable image found. Did find:
/Users/nierop/Library/ActivePerl/lib/auto/DBD/mysql/mysql.bundle: unknown file type, first eight bytes: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 at /System/Library/Perl/5.8.6/darwin-thread-multi-2level/DynaLoader.pm line 230.
at /Library/WebServer/CGI-Executables/MakeDB2.pl line 8
Compilation failed in require at /Library/WebServer/CGI-Executables/MakeDB2.pl line 8.
BEGIN failed--compilation aborted at /Library/WebServer/CGI-Executables/MakeDB2.pl line 8.

I have no clue what this means, but it prevents me from moving any further.

As you may known Mac OS X comes with a preinstalled version of Perl (older version). Could it be that my system use these older version Perl executables thereby causing compatibility problems with the DBD::mysql package?

If so, how can I tell my system to use all the ActivePerl 5.8 executables instead?

Any help would be greatly appreciated.

Regards, Pim

nierop | Sun, 2007-10-28 00:56

I have found out what is the problem.

(i) I did not have Xcode tools for OS X installed and apparently this is essential for performing "make" instructions.

(ii) After installing Xcode tools I have installed DBI using CPAN. This was ok; no "make test" errors.

(iii) Installing DBD::mysql using CPAN still gave errors during "make test". I "solved" this according to http://bugs.mysql.com/bug.php?id=30160. I stil got the "make test" errors but DBD::mysql was functional nevertheless.

I hope this report will be of help to anyone else stuck with perl and OS X.

Regards, Pim