do_mysql fails to compile on OSX
Reported by Alex Coles | May 12th, 2008 @ 03:05 PM
Experiencing the following issue when trying to build do_mysql:
http://pastie.caboo.se/private/b...
My version of MySQL is as follows:
mysql Ver 14.12 Distrib 5.0.45, for apple-darwin9.0.0 (i686) using EditLine wrapper
I had previously experienced a similar error, which was solved by making sure the mysql/bin was in my $PATH.
I have tried installing with various options:
sudo gem install pkg/do_mysql-0.9.0.gem -- --with-mysql-dir=/usr/local/mysql
sudo env ARCHFLAGS="-arch i386" rake compile -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
but to no avail.
Comments and changes to this ticket
-
Luis Lavena May 14th, 2008 @ 09:35 PM
From the pastie:
... -arch i386 -arch x86_64 -arch ppc7400 -arch ppc64 ... have the same architectures (ppc7400) and can't be in the same fat output fileIt seems ruby is trying to create a universal binary when the mysql binaries are not universal?
Can you confirm if the mysql installation is universal or just i686?
-
Alex Coles May 15th, 2008 @ 12:38 PM
- → Title changed from DO_mysql fails to compile on OS to do_mysql fails to compile on OS
The MySQL binaries I built are NOT universal.
In fact, if I remember correctly, I followed the recipe over here: http://hivelogic.com/articles/20...
As an update, I managed to get it installed with the following:
sudo env ARCHFLAGS="-arch i386" rake installHowever, it fails with the previous error, if I just try to perform a compile:
sudo env ARCHFLAGS="-arch i386" rake compile -
Luis Lavena May 16th, 2008 @ 01:38 AM
- → Title changed from do_mysql fails to compile on OS to do_mysql fails to compile on OSX
Alex,
mkmf (called from extconf) is trying to use the flags used to build Ruby to build also the extension.
So:
Ruby: fat (universal)
MySQL: i386 (no universal)
do_mysql: fat (due mkmf params).
I can't reproduce that (since I don't have a mac) but I can bet is a recipe for failure.
Did you manually installed Ruby (bya macports or compiled by hand) instead of the one supplied by Apple?
-
Alex Coles May 16th, 2008 @ 03:07 AM
Ruby is the version bundled with OS X (1.8.6 patch 111), and is a UB:
/usr/bin/ruby: Mach-O universal binary with 2 architectures /usr/bin/ruby (for architecture ppc7400): Mach-O executable ppc /usr/bin/ruby (for architecture i386): Mach-O executable i386My MySQL is i386, as you said.
-
Corey Donohoe May 17th, 2008 @ 12:27 PM
Works fine here.
mpro% which ruby
/opt/local/bin/ruby
mpro% ruby --version
ruby 1.8.6 (2007-09-24 patchlevel 111) [i686-darwin9.2.2]
mpro% which mysql5
/opt/local/bin/mysql5
mpro% mysql5 --version
mysql5 Ver 14.12 Distrib 5.0.51, for apple-darwin9.2.2 (i686) using EditLine wrapper
-
Corey Donohoe May 17th, 2008 @ 12:32 PM
Luis requested a little more info from my setup.
mpro% file /opt/local/bin/mysql5
/opt/local/bin/mysql5: Mach-O executable i386
mpro% file /opt/local/bin/ruby
/opt/local/bin/ruby: Mach-O executable i386
-
Bernerd Schaefer June 9th, 2008 @ 12:38 PM
- → State changed from new to hold
It seems that this is no longer an issue, is this correct? I'll place this on hold for now.
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
