Guest User

Untitled

a guest
Feb 20th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.70 KB | None | 0 0
  1. Installing sqlite3-ruby on Mac OS X 10.5:
  2.  
  3. stefan@macbook-pro-2:~$ sudo gem install sqlite3-ruby
  4. Building native extensions. This could take a while...
  5. ERROR: Error installing sqlite3-ruby:
  6. ERROR: Failed to build gem native extension.
  7.  
  8. /opt/local/bin/ruby extconf.rb install sqlite3-ruby
  9. checking for fdatasync() in -lrt... no
  10. checking for sqlite3.h... yes
  11. checking for sqlite3_open() in -lsqlite3... yes
  12. creating Makefile
  13.  
  14. make
  15. 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
  16. 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
  17. ld: in /usr/local/lib/libstdc++.6.dylib, file is not of required architecture
  18. collect2: ld returned 1 exit status
  19. make: *** [sqlite3_api.bundle] Error 1
  20.  
  21.  
  22. Gem files will remain installed in /opt/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.4 for inspection.
  23. Results logged to /opt/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.4/ext/sqlite3_api/gem_make.out
  24.  
  25.  
  26. Solution:
  27. Change the LIBPATH in /opt/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.4/ext/sqlite3_api/Makefile
  28.  
  29. from: "/usr/local/lib" -> "/usr/lib"
  30.  
  31. then run:
  32. sudo make && sudo make install
  33.  
  34.  
  35.  
  36. Makefile Diff:
  37. --- Makefile 2008-10-06 20:36:37.000000000 +1300
  38. +++ /Users/stefan/Makefile 2008-10-06 20:36:30.000000000 +1300
  39. @@ -69,7 +69,7 @@
  40. preload =
  41.  
  42. libpath = . $(libdir) /usr/local/lib
  43. -LIBPATH = -L"." -L"$(libdir)" -L"/usr/local/lib"
  44. +LIBPATH = -L"." -L"$(libdir)" -L"/usr/lib"
  45. DEFFILE =
  46.  
  47. CLEANFILES = mkmf.log
Add Comment
Please, Sign In to add comment