Hello all,
I've never used the ARCHFLAGS command before and am in way over my head.
I'm struggling with getting the MySQL gem working on Snow Leopard in 64 bit.
What I'm doing is this command:
sudo env ARCHFLAGS='-arch x86_64' gem install --verbose --no-rdoc --no-ri mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
The output looks like this:
.....
make
gcc -I. -I. -I/usr/local/lib/ruby/1.8/universal-darwin8.0 -I. -DHAVE_RB_THREAD_START_TIMER -DHAVE_MYSQL_H -I/usr/local/mysql/include/mysql -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT -DDONT_DECLARE_CXA_PURE_VIRTUAL -fno-common -g -O2 -fno-common -pipe -fno-common -arch i386 -c mysql.c
cc -dynamic -bundle -undefined suppress -flat_namespace -arch i386 -L"/usr/local/lib" -o mysql_api.bundle mysql.o -lruby -L/usr/local/mysql/lib/mysql -lmysqlclient -lz -lm -lpthread -ldl -lobjc
ld: warning: in /usr/local/mysql/lib/mysql/libmysqlclient.dylib, file is not of required architecture
make install
/usr/bin/install -c -m 0755 mysql_api.bundle /usr/local/lib/ruby/gems/1.8/gems/mysql-2.8.1/lib
Successfully installed mysql-2.8.1
1 gem installed
What I see is that it specifically specifies -arch i386 even though I'm telling it not to; directly after, it gives me the warning about the file not being the required architecture, because it's not. It's 64 bit.
Running the file command gives this:
file /usr/local/mysql/lib/mysql/libmysqlclient.dylib
/usr/local/mysql/lib/mysql/libmysqlclient.dylib: Mach-O 64-bit dynamically linked shared library x86_64
So of course it's not the required architecture. It seems that the gem install is ignoring my ARCHFLAGS command. Any idea why this would be? Like I said, I'm in way over my head on this stuff :P
Thanks so much all! - Kevin