D
Doug Livesey
Hi -- I'm having trouble getting the mysql gem to install on an OS X
Leopard machine.
Typical output I get from the console is this:
<CONSOLE>
esft 523 $ sudo env ARCHFLAGS="-arch i386" gem install mysql --
--with-mysql-include=/usr/local/mysql/include
--with-mysql-lib=/usr/local/mysql/lib
Password:
Building native extensions. This could take a while...
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.
/usr/local/bin/ruby extconf.rb install mysql --
--with-mysql-include=/usr/local/mysql/include
--with-mysql-lib=/usr/local/mysql/lib
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lm... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lz... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lsocket... no
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lnsl... no
checking for mysql_query() in -lmysqlclient... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/local/bin/ruby
--with-mysql-config
--without-mysql-config
--with-mysql-dir
--without-mysql-dir
--with-mysql-include=${mysql-dir}/include
--with-mysql-lib=${mysql-dir}/lib
--with-mysqlclientlib
--without-mysqlclientlib
--with-mlib
--without-mlib
--with-mysqlclientlib
--without-mysqlclientlib
--with-zlib
--without-zlib
--with-mysqlclientlib
--without-mysqlclientlib
--with-socketlib
--without-socketlib
--with-mysqlclientlib
--without-mysqlclientlib
--with-nsllib
--without-nsllib
--with-mysqlclientlib
--without-mysqlclientlib
Gem files will remain installed in
/usr/local/lib/ruby/gems/1.8/gems/mysql-2.7 for inspection.
Results logged to
/usr/local/lib/ruby/gems/1.8/gems/mysql-2.7/gem_make.out
</CONSOLE>
And when I look in the mkmf.log file, at the end of a very long series
of entries, I see this:
<LOG>
"gcc -o conftest -I. -I/usr/local/lib/ruby/1.8/universal-darwin8.0 -I.
-I/usr/local/mysql/include -I/usr/local/include -g -O2 -fno-common
-pipe -fno-common conftest.c -L"/usr/local/lib"
-L"/usr/local/mysql/lib" -L"/usr/local/lib" -L"/usr/local/lib/mysql"
-arch i386 -lz -lm -lruby-static -lmysqlclient -lz -lm -lpthread -ldl
-lobjc "
ld: warning in /usr/local/mysql/lib/libmysqlclient.dylib, file is not of
required architecture
Undefined symbols:
"_mysql_query", referenced from:
_t in ccxGmlzF.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
checked program was:
/* begin */
1: /*top*/
2: int main() { return 0; }
3: int t() { mysql_query(); return 0; }
/* end */
--------------------
</LOG>
Can anyone offer me any advice on getting this to work?
Cheers,
Doug.
Leopard machine.
Typical output I get from the console is this:
<CONSOLE>
esft 523 $ sudo env ARCHFLAGS="-arch i386" gem install mysql --
--with-mysql-include=/usr/local/mysql/include
--with-mysql-lib=/usr/local/mysql/lib
Password:
Building native extensions. This could take a while...
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.
/usr/local/bin/ruby extconf.rb install mysql --
--with-mysql-include=/usr/local/mysql/include
--with-mysql-lib=/usr/local/mysql/lib
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lm... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lz... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lsocket... no
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lnsl... no
checking for mysql_query() in -lmysqlclient... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/local/bin/ruby
--with-mysql-config
--without-mysql-config
--with-mysql-dir
--without-mysql-dir
--with-mysql-include=${mysql-dir}/include
--with-mysql-lib=${mysql-dir}/lib
--with-mysqlclientlib
--without-mysqlclientlib
--with-mlib
--without-mlib
--with-mysqlclientlib
--without-mysqlclientlib
--with-zlib
--without-zlib
--with-mysqlclientlib
--without-mysqlclientlib
--with-socketlib
--without-socketlib
--with-mysqlclientlib
--without-mysqlclientlib
--with-nsllib
--without-nsllib
--with-mysqlclientlib
--without-mysqlclientlib
Gem files will remain installed in
/usr/local/lib/ruby/gems/1.8/gems/mysql-2.7 for inspection.
Results logged to
/usr/local/lib/ruby/gems/1.8/gems/mysql-2.7/gem_make.out
</CONSOLE>
And when I look in the mkmf.log file, at the end of a very long series
of entries, I see this:
<LOG>
"gcc -o conftest -I. -I/usr/local/lib/ruby/1.8/universal-darwin8.0 -I.
-I/usr/local/mysql/include -I/usr/local/include -g -O2 -fno-common
-pipe -fno-common conftest.c -L"/usr/local/lib"
-L"/usr/local/mysql/lib" -L"/usr/local/lib" -L"/usr/local/lib/mysql"
-arch i386 -lz -lm -lruby-static -lmysqlclient -lz -lm -lpthread -ldl
-lobjc "
ld: warning in /usr/local/mysql/lib/libmysqlclient.dylib, file is not of
required architecture
Undefined symbols:
"_mysql_query", referenced from:
_t in ccxGmlzF.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
checked program was:
/* begin */
1: /*top*/
2: int main() { return 0; }
3: int t() { mysql_query(); return 0; }
/* end */
--------------------
</LOG>
Can anyone offer me any advice on getting this to work?
Cheers,
Doug.