[prev in list] [next in list] [prev in thread] [next in thread] 

List:       macports-users
Subject:    Re: Error installing sqlite-ruby
From:       Jasper Frumau <jasperfrumau () gmail ! com>
Date:       2010-12-21 10:05:50
Message-ID: AANLkTi=zk7=Pa5hQkwoQ74gGQYFDJdCKHznvDCOPZ8ja () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Installed sqlite-ruby differently:

$ pwd
/Users/me/rails/testapp
$ script/server
-bash: script/server: No such file or directory
$ rails server
Could not find gem 'sqlite3-ruby (>= 0, runtime)' in any of the gem sources
listed in your Gemfile.
Try running `bundle install`.
$ bundle install
Fetching source index for http://rubygems.org/
Enter your password to install the bundled RubyGems to your system:
Using rake (0.8.7)
Using abstract (1.0.0)
Using activesupport (3.0.3)
-------------------
Using thor (0.14.6)
Using railties (3.0.3)
Using rails (3.0.3)
Installing sqlite3-ruby (1.3.2) with native extensions
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled
gem is installed.

Only it is still running WEBrick instead of Mongrel:

$ rails server
=> Booting WEBrick
=> Rails 3.0.3 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2010-12-21 16:59:56] INFO  WEBrick 1.3.1
[2010-12-21 16:59:56] INFO  ruby 1.8.7 (2010-08-16) [i686-darwin10]
[2010-12-21 16:59:57] INFO  WEBrick::HTTPServer#start: pid=1190 port=3000
^C[2010-12-21 17:00:29] INFO  going to shutdown ...
[2010-12-21 17:00:29] INFO  WEBrick::HTTPServer#start done.
Exiting

, but I think I will be able to work that out.

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

> 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@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..
>>
>>
>>
>

[Attachment #5 (text/html)]

Installed sqlite-ruby differently:<br><br>$ pwd<br>/Users/me/rails/testapp<br>$ \
script/server<br>-bash: script/server: No such file or directory<br>$ rails \
server<br>Could not find gem &#39;sqlite3-ruby (&gt;= 0, runtime)&#39; in any of the \
gem sources listed in your Gemfile.<br>

Try running `bundle install`.<br>$ bundle install<br>Fetching source index for <a \
href="http://rubygems.org/">http://rubygems.org/</a><br>Enter your password to \
install the bundled RubyGems to your system: <br>Using rake (0.8.7) <br>

Using abstract (1.0.0) <br>Using activesupport (3.0.3) \
<br>-------------------<br>Using thor (0.14.6) <br>Using railties (3.0.3) <br>Using \
rails (3.0.3) <br>Installing sqlite3-ruby (1.3.2) with native extensions <br>Your \
bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is \
installed.<br>

<br>Only it is still running WEBrick instead of Mongrel:<br><br>$ rails \
server<br>=&gt; Booting WEBrick<br>=&gt; Rails 3.0.3 application starting in \
development on <a href="http://0.0.0.0:3000">http://0.0.0.0:3000</a><br>

=&gt; Call with -d to detach<br>=&gt; Ctrl-C to shutdown server<br>[2010-12-21 \
16:59:56] INFO   WEBrick 1.3.1<br>[2010-12-21 16:59:56] INFO   ruby 1.8.7 \
(2010-08-16) [i686-darwin10]<br>[2010-12-21 16:59:57] INFO   \
WEBrick::HTTPServer#start: pid=1190 port=3000<br>

^C[2010-12-21 17:00:29] INFO   going to shutdown ...<br>[2010-12-21 17:00:29] INFO   \
WEBrick::HTTPServer#start done.<br>Exiting<br><br>, but I think I will be able to \
work that out. <br><br><div class="gmail_quote">On Tue, Dec 21, 2010 at 4:27 PM, \
Jasper Frumau <span dir="ltr">&lt;<a \
href="mailto:jasperfrumau@gmail.com">jasperfrumau@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px \
solid rgb(204, 204, 204); padding-left: 1ex;">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...<div>

<div></div><div class="h5"><br><br><div class="gmail_quote">On Tue, Dec 21, 2010 at \
4:12 PM, Jasper Frumau <span dir="ltr">&lt;<a href="mailto:jasperfrumau@gmail.com" \
target="_blank">jasperfrumau@gmail.com</a>&gt;</span> wrote:<br>


<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px \
solid rgb(204, 204, 204); padding-left: 1ex;">I just installed rails and wanted to \
install sqlite-ruby. Got these installation errrors:<br>


<br>mymbp:~ me$ sudo gem install sqlite-ruby<br>Building native extensions.   This \
could take a while...<br>ERROR:   Error installing sqlite-ruby:<br>  ERROR: Failed to \
build gem native extension.<br><br>/opt/local/bin/ruby extconf.rb<br>checking for \
main() in -lsqlite... no<br>checking for sqlite.h... no<br>*** extconf.rb failed \
***<br>Could not create Makefile due to some reason, probably lack of<br>



necessary libraries and/or headers.   Check the mkmf.log file for more<br>details.   \
You may need configuration options.<br><br>Provided configuration options:<br>       \
--with-opt-dir<br>       --without-opt-dir<br>       --with-opt-include<br>



       --without-opt-include=${opt-dir}/include<br>       --with-opt-lib<br>       \
--without-opt-lib=${opt-dir}/lib<br>       --with-make-prog<br>       \
--without-make-prog<br>       --srcdir=.<br>       --curdir<br>       \
--ruby=/opt/local/bin/ruby<br>



       --with-sqlite-dir<br>       --without-sqlite-dir<br>       \
--with-sqlite-include<br>       --without-sqlite-include=${sqlite-dir}/include<br>    \
--with-sqlite-lib<br>       --without-sqlite-lib=${sqlite-dir}/lib<br>       \
--with-sqlitelib<br>



       --without-sqlitelib<br><br><br>Gem files will remain installed in \
/opt/local/lib/ruby/gems/1.8/gems/sqlite-ruby-2.2.3 for inspection.<br>Results logged \
to /opt/local/lib/ruby/gems/1.8/gems/sqlite-ruby-2.2.3/ext/gem_make.out<br>



<br><br>------------------------------------<br><br>$ tail gem_make.out<br>       \
--curdir<br>       --ruby=/opt/local/bin/ruby<br>       --with-sqlite-dir<br>       \
--without-sqlite-dir<br>       --with-sqlite-include<br>       \
--without-sqlite-include=${sqlite-dir}/include<br>



       --with-sqlite-lib<br>       --without-sqlite-lib=${sqlite-dir}/lib<br>       \
--with-sqlitelib<br>       \
--without-sqlitelib<br><br>------------------------------------------<br><br>$ cat \
mkmf.log<br>have_library: checking for main() in -lsqlite... -------------------- \
no<br>



<br>&quot;/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   &quot;<br>



ld: library not found for -lsqlite<br>collect2: ld returned 1 exit status<br>checked \
program was:<br>/* begin */<br>1: /*top*/<br>2: int main() { return 0; }<br>3: int \
t() { void ((*volatile p)()); p = (void ((*)()))main; return 0; }<br>



/* end */<br><br>&quot;/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   &quot;<br>



ld: library not found for -lsqlite<br>collect2: ld returned 1 exit status<br>checked \
program was:<br>/* begin */<br>1: /*top*/<br>2: int main() { return 0; }<br>3: int \
t() { main(); return 0; }<br>/* end */<br><br>&quot;/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   &quot;<br>



ld: library not found for -lsqlite<br>collect2: ld returned 1 exit status<br>checked \
program was:<br>/* begin */<br>1: int main();<br>2: /*top*/<br>3: /*<br>4:   * <a \
href="http://trac.macports.org/ticket/3604" \
target="_blank">http://trac.macports.org/ticket/3604</a><br>



5:   * gcc 4.0 on 10.4 has a problem<br>6:   */<br>7: int main() { return 0; }<br>8: \
int t() { main(); return 0; }<br>/* end \
*/<br><br>--------------------<br><br>have_header: checking for sqlite.h... \
-------------------- no<br>



<br>&quot;/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&quot;<br>



conftest.c:1:20: error: sqlite.h: No such file or directory<br>checked program \
was:<br>/* begin */<br>1: #include &lt;sqlite.h&gt;<br>/* end \
*/<br><br>--------------------<br><br>I seem to be missing libraries and headers, but \
do not know which ones and how to fix this..<br>



<br><br>
</blockquote></div><br>
</div></div></blockquote></div><br>



_______________________________________________
macports-users mailing list
macports-users@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macports-users


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic