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

10.3: DBD::mysql install trouble and fix UNIX
It seems with every release, DBD::mysql does not install be it via CPAN or manual compile. Panther ships with perl 5.8.1 RC3, multi-threads enabled. Previous hints posted on how to upgrade from Jaguar's perl version of 5.6 to 5.8.0 warned that multi-threading was not supported by DBD::mysql, and further searching showed that multi-threading was supported if you were to revert gcc to 2.95 for the compile. None of these hints will help with Panther...

I started searching some email archives and came up with a few posting the same errors I was experiencing but no solutions. So I started hacking away by following all past tips on compiling DBD::mysql for OSX 10.2 and perl 5.8.0 with no success. I then remembered installing Bundle::Msql at one point on a different system and decided to try that ... success!

Read on for more on the situation, and official word from Apple on a solution...

Bundle::Msql installs the DBD::mysql package but seems to do it differently than DBD::mysql itself. I sent my success scenario to the macosx@perl.org list (list archive) and received an interesting reply that may very well apply to more than just DBD::mysql:
On 10/15/03 5:58 PM, "Edward Moy" wrote:

We recently discovered the DBD::mysql problem as well. The patch is to edit /System -> Library -> Perl -> 5.8.1 -> darwin-thread-multi-2level -> Config.pm, replacing:
ld='MACOSX_DEPLOYMENT_TARGET=10.3 cc'
with
ld='env MACOSX_DEPLOYMENT_TARGET=10.3 cc'
Unfortunately, this change is too late to get into Panther.
---------------------------------------------------------------
Edward Moy
Apple
I have now tested this under perl installed by Panther and it seems to solve the problem ... one thing to note is that I read elsewhere that fink updates @INC and that some packages installed by fink may cause conflicts; specifically noted was Storable.

This hint is nowhere near a nicely detailed outline of how to make things work, but the emails posted to the macosx@perl.org list should shed some light...
    •    
  • Currently 2.50 / 5
  You rated: 1 / 5 (8 votes cast)
 
[34,684 views]  

10.3: DBD::mysql install trouble and fix | 20 comments | Create New Account
Click here to return to the '10.3: DBD::mysql install trouble and fix' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
used this, installed perfect...
Authored by: inblosam on Oct 27, '03 09:14:51AM
I used this and everything installed perfectly. I didn't try it without it, so nothing to personally compare it to. I'm assuming everyone is still using the 10.2 mysql distribution because that is all there is, right? I am up and running after about 15 minutes of loading stuff (including modules, mysql, doing privileges, etc.).

Gotta love that Panther is built on a unix flavor.

[ Reply to This | # ]
panther + perl doesn't work (even after adding 'env')?
Authored by: softenzyme on Oct 28, '03 12:19:57PM

Not sure why, but I have absolutely no luck, and I was wondering if I could get any pointers from anyone...

Clean installed Panther on a G4, and wanted to go back to running a Movable Type server on it, and so needed to use Perl/DBD::mysql. Perl is apparently there, as expected. I applied the ld='env..." modification to Config.pm, and ran perl -MCPAN -e shell to get DBD::mysql.

No luck, says it can't find perl.h and I should have sources in some recognizable location. It happens with anything else I try to install as well.

Any ideas? It was a completely clean install, default options...I'm totally clueless.

Panther is great except for the one thing I do most with my computer.



[ Reply to This | # ]
panther + perl doesn't work (even after adding 'env')?
Authored by: Anonymous on Oct 28, '03 04:54:07PM

Similar problem here with installing a different Perl module. I've been poking around for a few hours, and read somewhere that by default Panther's build of Perl 5.8.1 using a threading model that can cause problems. I found an installation package for installing without threading, but ran into problems with undefined symbols:


dyld: perl Undefined symbols:
_Perl_sv_2pv
_Perl_sv_catpvn
_Perl_sv_pvn_force
_perl_get_sv
Trace/BPT trap

So I'm still messing with install options. I will post here when I figure it out.



[ Reply to This | # ]
Failed on make test
Authored by: yhsun on Nov 03, '03 12:40:51PM

I got it compiled just fine, but failed at make test.

This is what I have :
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00base...........ok
t/10dsnlist........ok
t/20createdrop.....ok
t/30insertfetch....ok
t/40bindparam......ok
t/40blobs..........ok
t/40listfields.....ok
t/40nulls..........ok
t/40numrows........ok
t/50chopblanks.....ok
t/50commit.........ok
t/60leaks..........skipped
all skipped: $ENV{SLOW_TESTS} is not set or Proc::ProcessTable not installed
t/ak-dbd...........ok
t/akmisc...........ok
t/dbdadmin.........ok
t/insertid.........ok
t/mysql............FAILED tests 46-48
Failed 3/68 tests, 95.59% okay
t/mysql2...........ok
Failed Test Stat Wstat Total Fail Failed List of Failed
-------------------------------------------------------------------------------
t/mysql.t 68 3 4.41% 46-48
1 test skipped.
Failed 1/18 test scripts, 94.44% okay. 3/767 subtests failed, 99.61% okay.
make: *** [test_dynamic] Error 2



[ Reply to This | # ]
Failed on make test
Authored by: ilovja on Nov 04, '03 04:34:18AM
I had suffered from the same problem. Probably, you have seen something like the following message at the end of your installation try.
Running make install... make test had returned bad status, won't install without force
You can ignore minor failures which occured during the test and install with force using manual installation. Get DBD::mysql module from CPAN. extract it to the temp directory.

perl Makefile.PL
perl -pi -e 's/MACOSX/env MACOSX/' Makefile
make test
make install
My purpose of getting DBD::mysql was running MovableType. After I installed DBD::mysql with force, I tested posting/rebuilding using all the MT-related data restored from my backup. And it worked. However, it was a basic test. I might run into another problem from now on. Try this at your own risk.

[ Reply to This | # ]
Thanks--it works!
Authored by: lemur on Nov 13, '03 01:30:12PM

After slogging at this for two days with latest version of Perl on a fresh from scratch install of Panther + dev tools, I found this thread.
The env hack to Config.pm and the advice about the force install for DBD:mysql worked for me. Haven't tested extensively, but perl and mysql are now on speaking terms.



[ Reply to This | # ]
No Luck
Authored by: HappyTheMan on Sep 23, '04 10:38:18AM

I'm using Mac OS X 10.3.5. I have made the modification to the Config.pm file (ie, adding 'env'). But when attempting to install DBI for Moveable Type 3.11 - I still get the error telling me that /System/Library/Perl/5.8.1/darwin-thread-multi-2level/CORE/perl.h canot be found. I looked - it isn't there.

When i tried to force the install as per the instructions above - still nothing.

This is a LOT of effort to install Moveable Type. Too much. It looks like a Great blog server.... BUT I'LL NEVER KNOW!

I've read that Apple is including a blog server, based on Blojsom, in Tiger Server (Mac OS X 10.4). Thats still eight months (or more) away.

I looked into installing Blojsom and it was sufficiently complex that I checked out Movable Type. My experience trying to install Movable Type is driving me to find another blog server. Wordpress looks nice; maybe I'll try that now.

I'm despairing of ever making a blog-based site work. PostNuke and similar CMS solutions are easy to install and configure, in my experience. Why the #%&$ are these blog solutions so difficult?

Peter

---

--
Peter Norman
St. John's, Newfoundland, Canada

"Anyone who has never experienced the bitterness of despair
has missed life's significance." Soren K



[ Reply to This | # ]
No Luck
Authored by: PeteVerdon on Sep 23, '04 05:52:42PM

It's not a lot of effort to install Moveable Type, it's a lot of effort to install a Perl module. Any system, weblog or CMS, that needs that module will be equally hard to install. (Postnuke, of course, uses PHP rather than Perl so this doesn't apply, but that's not because it's a CMS system rather than a weblog one.)



[ Reply to This | # ]
panther + perl doesn't work (even after adding 'env')?
Authored by: JohnAlbin on Nov 04, '03 06:05:24PM

In addition to the ld='env ...' fix, you need to install the Developer Tools from the "Mac OS X Xcode Tools" Install CD.

Then everything will work fine. It did for me.



[ Reply to This | # ]
Still trouble for me
Authored by: sscotti on Apr 03, '04 11:41:41PM

I am trying to install DBD::mysql on Panther 10.3.3 and I am having trouble. This is my error:

Executing /usr/bin/perl Makefile.PL && make ..

I will use the following settings for compiling and testing:

cflags (mysql_config) = -I/usr/include/mysql -O3 -fno-omit-frame-pointer -arch i386 -arch p
pc -pipe
libs (mysql_config) = -arch i386 -arch ppc -pipe -L/usr/lib/mysql -lmysqlclient -lz -lm
nocatchstderr (default ) = 0
nofoundrows (default ) = 0
ssl (guessed ) = 0
testdb (default ) = test
testhost (default ) =
testpassword (default ) =
testuser (default ) =

To change these settings, see 'perl Makefile.PL --help' and
'perldoc INSTALL'.

Checking if your kit is complete...
Looks good
Unrecognized argument in LIBS ignored: '-arch'
Unrecognized argument in LIBS ignored: 'i386'
Unrecognized argument in LIBS ignored: '-arch'
Unrecognized argument in LIBS ignored: 'ppc'
Unrecognized argument in LIBS ignored: '-pipe'
Using DBI 1.42 (for perl 5.008001 on darwin-thread-multi-2level) installed in /Library/Perl/5.8.1/da
rwin-thread-multi-2level/auto/DBI
Writing Makefile for DBD::mysql
cp lib/Bundle/DBD/mysql.pm blib/lib/Bundle/DBD/mysql.pm
cp lib/DBD/mysql/GetInfo.pm blib/lib/DBD/mysql/GetInfo.pm
cp lib/Mysql/Statement.pm blib/lib/Mysql/Statement.pm
cp lib/Mysql.pm blib/lib/Mysql.pm
cp lib/DBD/mysql.pm blib/lib/DBD/mysql.pm
cp lib/DBD/mysql/INSTALL.pod blib/lib/DBD/mysql/INSTALL.pod
cc -c -I/Library/Perl/5.8.1/darwin-thread-multi-2level/auto/DBI -I/usr/include/mysql -O3 -fno-omit-
frame-pointer -arch i386 -arch ppc -pipe -g -pipe -pipe -fno-common -DPERL_DARWIN -no-cpp-precomp -f
no-strict-aliasing -I/usr/local/include -Os -DVERSION=\"2.9003\" -DXS_VERSION=\"2.9003\" "-I/Syst
em/Library/Perl/5.8.1/darwin-thread-multi-2level/CORE" dbdimp.c
cc: cannot read specs file for arch `i386'
make: *** [dbdimp.o] Error 1


Any help appreciated. I think I am running gcc 3.



[ Reply to This | # ]
Still trouble for me
Authored by: shwetank on Nov 10, '05 06:57:27AM

i am getting the same error messages myself.

I have been following the instructions on "http://maczealots.com/tutorials/movabletype/panther/"

is there a workaround for this?

thanks
shwetank



[ Reply to This | # ]
10.3: DBD::mysql install trouble and fix
Authored by: intrntmn on Jan 03, '04 10:49:48PM

I have tried this with no success. Can someone please help.

TIA

Jack



[ Reply to This | # ]
10.3: DBD::mysql install trouble and fix
Authored by: sscotti on Apr 03, '04 11:27:11PM

I am having trouble installing DBD:mysql as well. I am running Panther 10.3.3 and the system is otherwise working. My last make file follows:

cp lib/DBD/mysql.pm blib/lib/DBD/mysql.pm
cp lib/Mysql/Statement.pm blib/lib/Mysql/Statement.pm
cp lib/DBD/mysql/INSTALL.pod blib/lib/DBD/mysql/INSTALL.pod
cp lib/Mysql.pm blib/lib/Mysql.pm
cp lib/DBD/mysql/GetInfo.pm blib/lib/DBD/mysql/GetInfo.pm
cp lib/Bundle/DBD/mysql.pm blib/lib/Bundle/DBD/mysql.pm
cc -c -I/Library/Perl/5.8.1/darwin-thread-multi-2level/auto/DBI -I/usr/include/mysql -O3 -fno-omit-frame-pointer -arch ppc -pipe -g -pipe -pipe -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -I/usr/local/include -Os -DVERSION=\"2.9003\" -DXS_VERSION=\"2.9003\" "-I/System/Library/Perl/5.8.1/darwin-thread-multi-2level/CORE" dbdimp.c
/usr/bin/perl -p -e "s/~DRIVER~/mysql/g" /Library/Perl/5.8.1/darwin-thread-multi-2level/auto/DBI/Driver.xst > mysql.xsi
/usr/bin/perl /System/Library/Perl/5.8.1/ExtUtils/xsubpp -typemap /System/Library/Perl/5.8.1/ExtUtils/typemap mysql.xs > mysql.xsc && mv mysql.xsc mysql.c
Warning: duplicate function definition 'do' detected in mysql.xs, line 192
Warning: duplicate function definition 'rows' detected in mysql.xs, line 290
cc -c -I/Library/Perl/5.8.1/darwin-thread-multi-2level/auto/DBI -I/usr/include/mysql -O3 -fno-omit-frame-pointer -arch ppc -pipe -g -pipe -pipe -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -I/usr/local/include -Os -DVERSION=\"2.9003\" -DXS_VERSION=\"2.9003\" "-I/System/Library/Perl/5.8.1/darwin-thread-multi-2level/CORE" mysql.c
Running Mkbootstrap for DBD::mysql ()
chmod 644 mysql.bs
rm -f blib/arch/auto/DBD/mysql/mysql.bundle
LD_RUN_PATH="/usr/lib" /usr/bin/perl myld env MACOSX_DEPLOYMENT_TARGET=10.3 cc' -bundle -undefined dynamic_lookup -L/usr/local/lib dbdimp.o mysql.o -o blib/arch/auto/DBD/mysql/mysql.bundle -L/usr/lib/mysql -lmysqlclient -lz -lm
/bin/sh: -c: line 1: unexpected EOF while looking for matching `''
/bin/sh: -c: line 2: syntax error: unexpected end of file
make: *** [blib/arch/auto/DBD/mysql/mysql.bundle] Error 2


I downloaded the source, executed perl makefile.pl and then manually removed three instances of -arch i386 from the makefile and then ran make. The above output is what I got.

Any help appreciated. P.S.: I already changed the config.pm file for PERL.



[ Reply to This | # ]
Architecture problem?
Authored by: shacker on Jun 10, '04 06:13:49PM

I had MT working fine under Jaguar Server. Upgraded to Panther Server and got the dreaded "Can't locate DBD/mysql.pm in @INC" problem. Even though mysql.pm is still there from before the upgrade, perl can no longer see it.

I've installed DBI and DBD::mysql from the .pkg files. I've made the "env" tweak to Config.pm. I've upgraded perl to 5.8.4 . I've tried installing them CPAN. With CPAN, I can get DBI to build and install, but with DBD::mysql, the build fails with

cc -c -I/Library/Perl/5.8.4/darwin-2level/auto/DBI -I/usr/include/mysql -O3 -fno-omit-frame-pointer -arch i386 -arch ppc -pipe -pipe -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -I/usr/local/include -Os -DVERSION=\"2.1028\" -DXS_VERSION=\"2.1028\" "-I/System/Library/Perl/5.8.4/darwin-2level/CORE" dbdimp.c
cc: cannot read specs file for arch `i386'
make: *** [dbdimp.o] Error 1

This implies that it's failing because it's trying to compile for Intel. I removed the '-arch i386' parts from the Makefile. But when I do that, the build fails with other errors. I'm at the end of my rope and have a rather large MT installation that's totally hosed. Any suggestions appreciated.



[ Reply to This | # ]
10.3: DBD::mysql install trouble and fix
Authored by: cool_fritz on Jun 23, '04 10:39:33PM

I tried the Config.pm change - didn't work. Then I installed with force - also no luck. Then I tried the install in Webadmin. It worked. Running 10.3.4.



[ Reply to This | # ]
10.3: DBD::mysql install trouble and fix
Authored by: unforeseen:X11 on Jun 27, '04 07:29:20AM

thank you, had the same problem, couldnt install neither with cpan nor manually.

now, with the changes to the Config.pm, it works just fine on 10.3.4
(note: the "make test" returned 99.34% errors. i guess that's because i didn't pass him some mysql-arguments like user:pass; anyway, the sudo make install performed just fine and so far, my scripts work)

the hint with webmin is interesting, will check that now.



[ Reply to This | # ]
No Luck
Authored by: nieko baarda on Oct 27, '04 05:32:55PM

Hallo,
There is no Config.pm in /library/perl/5.8.1/darwin-thread-multi-2level
I' ve tried the suggestion: perl -pi -e's/MACOSX/env MACOSX/' Makefile before $ make and $ make install

The message after $ make install is:
Files found in blib/arch: installing files in blib/lib into architecture dependent library tree
Installing /man/man3/Bundle::DBD::mysql.3pm
Installing /man/man3/DBD::mysql.3pm
Installing /man/man3/DBD::mysql::INSTALL.3pm
Installing /man/man3/Mysql.3pm
Writing ///Library/Perl/5.8.1/darwin-thread-multi-2level/auto/DBD/mysql/.packlist
Appending installation info to ///System/Library/Perl/5.8.1/darwin-thread-multi-2level/perllocal.pod
$

But the $dbh instruction for connecting to a mysql database (in a webpage) which make use of DBD::mysql (and test it) failed.

Perl is running OK

There are many suggestions for installing DBD::msql on Panther 10.3.5 but I can't find the one I need for fixing the problem.

Who fixed this problem?



[ Reply to This | # ]
No Luck
Authored by: LogStew on Nov 17, '04 02:15:41PM

config.pm is in /system/library/perl/5.8.1/darwin-thread-multi-2level.
Hope this helps some



[ Reply to This | # ]
10.3: DBD::mysql install trouble and fix
Authored by: rcasey on Nov 11, '04 06:30:38PM

Dude, you rock. I am installing Bugzilla on a Solaris 9 system, running Perl 5.8.5 and an already existing Mysql 3.23.xx server. At first, I installed the Bundle::Bugzilla package, but it failed on the DBD::Mysql install. I then tried doing a CPAN install of just the DBD:Mysql package would 'make', but 'make test' would fail and then going ahead with the install resulted in a broken package.

I performed a CPAN install of Bundle::Msql and selected the option to just install Mysql. It went through without a hitch and it even provided prompts for me to specify database name and user settings to test the database with. I am now well on my way to getting Bugzilla up and running. Bundle::Msql seems to be the way to go!



[ Reply to This | # ]
10.3: DBD::mysql install trouble and fix
Authored by: Superboy on Dec 31, '04 09:45:51AM

I have gotten the DBI::MySQL, etc installs to work by totally deleting ( :-O ) the Apple installation of Perl. I have downloaded Perl 5.8.6, which is much newer than Apple's version from here: http://www.perl.com/CPAN/src/stable.tar.gz
I then installed that, and everyting works great!



[ Reply to This | # ]