I was able to advance with the mysql gem but somehow '-arch i386' is making its 
way into my build pipeline, despite building for x86_64. extconf.rb seems to 
store the wrong flags into the Makefile.

Any suggestions how to fix this?

        Thanks, Joel

---

biggie:mysql-gem joelr$ ARCHFLAGS="-arch x86_64" macrake ARCHFLAGS="-arch 
x86_64"
(in /Users/joelr/Work/ruby/mysql-gem)
rake-compiler must be configured first to enable cross-compilation
rake-compiler must be configured first to enable cross-compilation
mkdir -p tmp/universal-darwin10.0/mysql_api/1.9.0
cd tmp/universal-darwin10.0/mysql_api/1.9.0
/Library/Frameworks/MacRuby.framework/Versions/0.6/usr/bin/macruby -I. 
../../../../ext/mysql_api/extconf.rb
checking for mysql_ssl_set()... no
checking for rb_str_set_len()... yes
checking for rb_thread_start_timer()... no
checking for mysql.h... yes
creating Makefile
cd -
cd tmp/universal-darwin10.0/mysql_api/1.9.0
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i386-apple-darwin10.0.0
gmake
/usr/bin/gcc -I. 
-I/Library/Frameworks/MacRuby.framework/Versions/0.6/usr/include/ruby-1.9.0/universal-darwin10.0
 
-I/Library/Frameworks/MacRuby.framework/Versions/0.6/usr/include/ruby-1.9.0/ruby/backward
 -I/Library/Frameworks/MacRuby.framework/Versions/0.6/usr/include/ruby-1.9.0 
-I../../../../ext/mysql_api -DHAVE_RB_STR_SET_LEN -DHAVE_MYSQL_H  
-I/usr/local/mysql/include  -g -Os -arch x86_64 -fno-common   
-D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ 
-DIGNORE_SIGHUP_SIGQUIT  -DDONT_DECLARE_CXA_PURE_VIRTUAL -fno-common 
-fexceptions -fno-common -pipe -O3 -g -Wall -Wno-parentheses -arch i386 -arch 
x86_64 -o mysql.o -c ../../../../ext/mysql_api/mysql.c
...
/usr/bin/gcc -dynamic -bundle -undefined suppress -flat_namespace -arch i386 
-arch x86_64 -o mysql_api.bundle mysql.o -L. 
-L/Library/Frameworks/MacRuby.framework/Versions/0.6/usr/lib   -arch i386 -arch 
x86_64  -lmacruby -L/usr/local/mysql/lib -lmysqlclient -lz -lm     -lmygcc   
ld: warning: in /usr/local/mysql/lib/libmysqlclient.dylib, file was built for 
unsupported file format which is not the architecture being linked (i386)
ld: warning: in /usr/local/mysql/lib/libmygcc.a, file was built for unsupported 
file format which is not the architecture being linked (i386)
cd -
cp tmp/universal-darwin10.0/mysql_api/1.9.0/mysql_api.bundle 
lib/mysql_api.bundle
/Library/Frameworks/MacRuby.framework/Versions/0.6/usr/bin/macruby -w 
-Ilib:bin:test:. -e 'require "rubygems"; require "test/unit"; require 
"test/test_mysql.rb"' -- 
unknown: warning: instance variable @post_install_hooks not initialized
unknown: warning: instance variable @post_uninstall_hooks not initialized
unknown: warning: instance variable @pre_uninstall_hooks not initialized
unknown: warning: instance variable @pre_install_hooks not initialized
unknown: warning: instance variable @suffix_pattern not initialized
unknown: warning: instance variable @path not initialized
unknown: warning: instance variable @home not initialized
/Library/Frameworks/MacRuby.framework/Versions/0.6/usr/lib/ruby/1.9.0/test/unit/assertions.rb:31:
 warning: shadowing outer local variable - line
Loaded suite -e
Started
.EEunknown: [BUG] Bus Error
MacRuby version 0.6 (ruby 1.9.0) [universal-darwin10.0, x86_64]

rake aborted!
Command failed with status (): [/Library/Frameworks/MacRuby.framework/Vers...]
macruby(94810,0x7fff703d4be0) malloc: *** error for object 0x10a4b4e78: 
incorrect checksum for freed object - object was probably modified after being 
freed.
*** set a breakpoint in malloc_error_break to debug
Abort trap
biggie:mysql-gem joelr$ 

---
http://twitter.com/wagerlabs

_______________________________________________
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

Reply via email to