I'm getting the following error when trying to install the Sqlite3 gem on OS X Lion with XCode 4.2 installed:
$ gem install sqlite3
Building native extensions. This could take a while...
ERROR: Error installing sqlite3:
ERROR: Failed to build gem native extension.
/Users/me/.rvm/rubies/ruby-1.9.3-p0/bin/ruby extconf.rb
checking for sqlite3.h... yes
checking for sqlite3_libversion_number() in -lsqlite3... yes
checking for rb_proc_arity()... yes
checking for sqlite3_initialize()... yes
checking for sqlite3_backup_init()... yes
checking for sqlite3_column_database_name()... no
checking for sqlite3_enable_load_extension()... yes
checking for sqlite3_load_extension()... yes
creating Makefile
make
compiling backup.c
make: /usr/bin/gcc-4.2: No such file or directory
make: *** [backup.o] Error 1
Would linking to /usr/bin/llvm-gcc-4.2 be the only fix (seems a little hack-y)? Or am I missing something?
It would appear that XCode 4.2 doesn't install gcc-4.2
, but instead llvm-gcc-4.2
. Clearly Apple feels that LLVM is mature enough to superseed GCC.
There are two options I can think of. You should be able to choose either and be OK.
Use this GCC installer.
Symlink LLVM using sudo ln -s /usr/bin/llvm-gcc-4.2 /usr/bin/gcc-4.2
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With