Error installing sqlite-ruby

Jasper Frumau jasperfrumau at gmail.com
Tue Dec 21 01:27:34 PST 2010


Found some older threads similar to this issue, but so far they all only
mentioned Xcode was needed. I have the latest Xcode and the latest
MacPorts...

On Tue, Dec 21, 2010 at 4:12 PM, Jasper Frumau <jasperfrumau at gmail.com>wrote:

> I just installed rails and wanted to install sqlite-ruby. Got these
> installation errrors:
>
> mymbp:~ me$ sudo gem install sqlite-ruby
> Building native extensions.  This could take a while...
> ERROR:  Error installing sqlite-ruby:
>     ERROR: Failed to build gem native extension.
>
> /opt/local/bin/ruby extconf.rb
> checking for main() in -lsqlite... no
> checking for sqlite.h... no
> *** extconf.rb failed ***
> Could not create Makefile due to some reason, probably lack of
> necessary libraries and/or headers.  Check the mkmf.log file for more
> details.  You may need configuration options.
>
> Provided configuration options:
>     --with-opt-dir
>     --without-opt-dir
>     --with-opt-include
>     --without-opt-include=${opt-dir}/include
>     --with-opt-lib
>     --without-opt-lib=${opt-dir}/lib
>     --with-make-prog
>     --without-make-prog
>     --srcdir=.
>     --curdir
>     --ruby=/opt/local/bin/ruby
>     --with-sqlite-dir
>     --without-sqlite-dir
>     --with-sqlite-include
>     --without-sqlite-include=${sqlite-dir}/include
>     --with-sqlite-lib
>     --without-sqlite-lib=${sqlite-dir}/lib
>     --with-sqlitelib
>     --without-sqlitelib
>
>
> Gem files will remain installed in
> /opt/local/lib/ruby/gems/1.8/gems/sqlite-ruby-2.2.3 for inspection.
> Results logged to
> /opt/local/lib/ruby/gems/1.8/gems/sqlite-ruby-2.2.3/ext/gem_make.out
>
>
> ------------------------------------
>
> $ tail gem_make.out
>     --curdir
>     --ruby=/opt/local/bin/ruby
>     --with-sqlite-dir
>     --without-sqlite-dir
>     --with-sqlite-include
>     --without-sqlite-include=${sqlite-dir}/include
>     --with-sqlite-lib
>     --without-sqlite-lib=${sqlite-dir}/lib
>     --with-sqlitelib
>     --without-sqlitelib
>
> ------------------------------------------
>
> $ cat mkmf.log
> have_library: checking for main() in -lsqlite... -------------------- no
>
> "/usr/bin/gcc-4.2 -o conftest -I. -I/opt/local/lib/ruby/1.8/i686-darwin10
> -I. -I/usr/local -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE
> -I/opt/local/include -O2 -arch x86_64  -fno-common -pipe -fno-common
> conftest.c  -L. -L/opt/local/lib -L/usr/local -L. -L/opt/local/lib -arch
> x86_64  -arch x86_64   -lruby-static -lsqlite  -lpthread -ldl -lobjc  "
> ld: library not found for -lsqlite
> collect2: ld returned 1 exit status
> checked program was:
> /* begin */
> 1: /*top*/
> 2: int main() { return 0; }
> 3: int t() { void ((*volatile p)()); p = (void ((*)()))main; return 0; }
> /* end */
>
> "/usr/bin/gcc-4.2 -o conftest -I. -I/opt/local/lib/ruby/1.8/i686-darwin10
> -I. -I/usr/local -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE
> -I/opt/local/include -O2 -arch x86_64  -fno-common -pipe -fno-common
> conftest.c  -L. -L/opt/local/lib -L/usr/local -L. -L/opt/local/lib -arch
> x86_64  -arch x86_64   -lruby-static -lsqlite  -lpthread -ldl -lobjc  "
> ld: library not found for -lsqlite
> collect2: ld returned 1 exit status
> checked program was:
> /* begin */
> 1: /*top*/
> 2: int main() { return 0; }
> 3: int t() { main(); return 0; }
> /* end */
>
> "/usr/bin/gcc-4.2 -o conftest -I. -I/opt/local/lib/ruby/1.8/i686-darwin10
> -I. -I/usr/local -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE
> -I/opt/local/include -O2 -arch x86_64  -fno-common -pipe -fno-common
> conftest.c  -L. -L/opt/local/lib -L/usr/local -L. -L/opt/local/lib -arch
> x86_64  -arch x86_64   -lruby-static -lsqlite  -lpthread -ldl -lobjc  "
> ld: library not found for -lsqlite
> collect2: ld returned 1 exit status
> checked program was:
> /* begin */
> 1: int main();
> 2: /*top*/
> 3: /*
> 4:  * http://trac.macports.org/ticket/3604
> 5:  * gcc 4.0 on 10.4 has a problem
> 6:  */
> 7: int main() { return 0; }
> 8: int t() { main(); return 0; }
> /* end */
>
> --------------------
>
> have_header: checking for sqlite.h... -------------------- no
>
> "/usr/bin/gcc-4.2 -E -I. -I/opt/local/lib/ruby/1.8/i686-darwin10 -I.
> -I/usr/local -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE
> -I/opt/local/include -O2 -arch x86_64  -fno-common -pipe -fno-common
> conftest.c -o conftest.i"
> conftest.c:1:20: error: sqlite.h: No such file or directory
> checked program was:
> /* begin */
> 1: #include <sqlite.h>
> /* end */
>
> --------------------
>
> I seem to be missing libraries and headers, but do not know which ones and
> how to fix this..
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-users/attachments/20101221/2ab6a232/attachment.html>


More information about the macports-users mailing list