Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Make DBI and DBD work with multithreaded Perl 5.8.0 UNIX

After finding a hint on the site about doing a clean install of Perl 5.8.0 on OS X 10.2 and being very happy that the described method actually left me with a fully working Perl 5.8.0 installation, I realized I had done a threaded install, instead of a non-threaded one. So far on OS X the preference has been to do a non-threaded install because certain Perl modules in the DBI and DBD families would not compile correctly. This problem seemed to be isolated to OS X. Needing to install DBI and DBD::mysql, and not wanting to do a whole reinstall of Perl, I came upon this url. It's a Google cache URL; hope that works for everyone.

Basically what the writer says and what I have verified to be correct, is that there are some issues with the newer GCC3 compiler that is installed with the OS X 10.2 Dev Tools which prevent these modules from compiling correctly. However, changing the "cc" directive (which is softlinked to gcc3) in the Makefile to gcc2 (the older gcc 2.9.x version) will allow a successful compile and subsequent installation of the DBI and DBD::mysql modules.

These are the two I needed for my purposes; I cannot vouch for other DBD modules to have the same rate of success, but at least this saved me from reinstalling Perl.

I hope this helps someone out there, it sure helped me.

    •    
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[8,881 views]  

Make DBI and DBD work with multithreaded Perl 5.8.0 | 4 comments | Create New Account
Click here to return to the 'Make DBI and DBD work with multithreaded Perl 5.8.0' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
True for a number of perl modules!
Authored by: wkoffel on Jun 18, '03 02:44:01PM

I've found that quite a few perl modules fail to compile with the latest gcc3 on Mac OSX (10.2.6 in my case). They tend to fail with "bus error" which is very unhelpful indeed, and means that the compiler crashed, as opposed to the source code for the modules being buggy or unsupported under OSX.

For the record, the preferred way to change compilers (straight from Apple) is

$ sudo /usr/sbin/gcc_select 2 ( to switch to gcc2 )
$ sudo /usr/sbin/gcc_select 3 ( to switch back to gcc3 )

In addition, I've found that changing the symlink /usr/bin/gcc to point at either gcc2 or gcc3 works as well, and as the hint suggests, changing the compiler listing in the Makefile should also work, although hunting down what might be multiple cases of this in a source package might be less reliable.



[ Reply to This | # ]
True for a number of perl modules!
Authored by: rlaycock on Jun 26, '03 11:24:44AM

I had the same problem with the DBD Bundle. I remapped the alias and the install ran fine; no more "bus error". Still it failed at the very end. It said my server wasn't running. I assume that's MySQL. I'm on 4.0.13 and it certainly was on. I was installing the very latest bundle version which Rob @ heavyhosting had recommended I get off CPAN for v4.

Any idea what the heck is preventing this damn thing from installing? I'm thinking it could be a permission thing. I ran "sudo" of course and my root user is set in MySQL.

Rich.



[ Reply to This | # ]
True for a number of perl modules!
Authored by: rlaycock on Jun 28, '03 12:07:13PM

Update:

I had to remove the password on the MySQL "root" user. Even then the CPAN Bundle didn't complete but the downloaded modules from CPAN ran separately did. I used DBD-mysql-2.1028 & DBI-1.37.

Richard L.



[ Reply to This | # ]
Make DBI and DBD work with multithreaded Perl 5.8.0
Authored by: maparent on Jul 27, '03 10:09:02AM

Did anybody try with the gcc3.3 update?



[ Reply to This | # ]