Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Installing sqlite3-ruby on Mac OS X 10.5:
- stefan@macbook-pro-2:~$ sudo gem install sqlite3-ruby
- Building native extensions. This could take a while...
- ERROR: Error installing sqlite3-ruby:
- ERROR: Failed to build gem native extension.
- /opt/local/bin/ruby extconf.rb install sqlite3-ruby
- checking for fdatasync() in -lrt... no
- checking for sqlite3.h... yes
- checking for sqlite3_open() in -lsqlite3... yes
- creating Makefile
- make
- gcc -I. -I. -I/opt/local/lib/ruby/1.8/i686-darwin9.2.0 -I. -DHAVE_SQLITE3_H -I/usr/local/include -fno-common -D_XOPEN_SOURCE=1 -fno-common -pipe -fno-common -c sqlite3_api_wrap.c
- cc -dynamic -bundle -undefined suppress -flat_namespace -o sqlite3_api.bundle sqlite3_api_wrap.o -L"." -L"/opt/local/lib" -L"/usr/local/lib" -L. -lruby -lsqlite3 -lpthread -ldl -lobjc
- ld: in /usr/local/lib/libstdc++.6.dylib, file is not of required architecture
- collect2: ld returned 1 exit status
- make: *** [sqlite3_api.bundle] Error 1
- Gem files will remain installed in /opt/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.4 for inspection.
- Results logged to /opt/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.4/ext/sqlite3_api/gem_make.out
- Solution:
- Change the LIBPATH in /opt/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.4/ext/sqlite3_api/Makefile
- from: "/usr/local/lib" -> "/usr/lib"
- then run:
- sudo make && sudo make install
- Makefile Diff:
- --- Makefile 2008-10-06 20:36:37.000000000 +1300
- +++ /Users/stefan/Makefile 2008-10-06 20:36:30.000000000 +1300
- @@ -69,7 +69,7 @@
- preload =
- libpath = . $(libdir) /usr/local/lib
- -LIBPATH = -L"." -L"$(libdir)" -L"/usr/local/lib"
- +LIBPATH = -L"." -L"$(libdir)" -L"/usr/lib"
- DEFFILE =
- CLEANFILES = mkmf.log
Add Comment
Please, Sign In to add comment