ruby's gem install bson_ext error

If you are new to Linux or new to Sabayon Linux and just not sure where to post, here ya go. Post without fear of being told to RTFM :-)

Moderator: Moderators

ruby's gem install bson_ext error

Postby xyz » Wed Apr 10, 2013 5:49

Hi, I tried to install MongoDB driver for Ruby but unfortunately I got errors:
Code: Select all
 gem19 install mongoid mongo bson_ext
Successfully installed mongoid-3.1.2
Successfully installed mongo-1.8.4
Building native extensions.  This could take a while...
ERROR:  Error installing bson_ext:
        ERROR: Failed to build gem native extension.

        /usr/bin/ruby19 extconf.rb
checking for asprintf()... *** 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}/
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=/usr/bin/ruby19
/usr/lib64/ruby/1.9.1/mkmf.rb:381:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
        from /usr/lib64/ruby/1.9.1/mkmf.rb:461:in `try_link0'
        from /usr/lib64/ruby/1.9.1/mkmf.rb:476:in `try_link'
        from /usr/lib64/ruby/1.9.1/mkmf.rb:619:in `try_func'
        from /usr/lib64/ruby/1.9.1/mkmf.rb:894:in `block in have_func'
        from /usr/lib64/ruby/1.9.1/mkmf.rb:790:in `block in checking_for'
        from /usr/lib64/ruby/1.9.1/mkmf.rb:284:in `block (2 levels) in postpone'
        from /usr/lib64/ruby/1.9.1/mkmf.rb:254:in `open'
        from /usr/lib64/ruby/1.9.1/mkmf.rb:284:in `block in postpone'
        from /usr/lib64/ruby/1.9.1/mkmf.rb:254:in `open'
        from /usr/lib64/ruby/1.9.1/mkmf.rb:280:in `postpone'
        from /usr/lib64/ruby/1.9.1/mkmf.rb:789:in `checking_for'
        from /usr/lib64/ruby/1.9.1/mkmf.rb:893:in `have_func'
        from extconf.rb:3:in `<main>'


Gem files will remain installed in /usr/local/lib64/ruby/gems/1.9.1/gems/bson_ext-1.8.4 for inspection.
Results logged to /usr/local/lib64/ruby/gems/1.9.1/gems/bson_ext-1.8.4/ext/cbson/gem_make.out
2 gems installed
Installing ri documentation for mongoid-3.1.2...
Installing ri documentation for mongo-1.8.4...
Installing RDoc documentation for mongoid-3.1.2...
Installing RDoc documentation for mongo-1.8.4...


What could be the problem?

Thank you in advance
xyz
Simple Hen
 
Posts: 48
Joined: Wed Mar 28, 2012 10:09

Re: ruby's gem install bson_ext error

Postby Ryuno-Ki » Wed Apr 10, 2013 7:48

What's in the mkmf.log file?
HP-Pavilion ◆ AMD Athlon™ 64 Processor 4000+ ◆ GeForce 6150SE nForce 430 ◆ 1 GiB RAM
German Wiki translator ◆ Want to contribute on the wiki? Ask the Bureaucrats!
Please, mark solved threads ◆ Posts unread and unansweredPackage requests ◆ Sabayon XI with MATE
Ryuno-Ki
Technological Hen
 
Posts: 437
Joined: Mon Feb 27, 2012 22:15
Location: Southern Germany

Re: ruby's gem install bson_ext error

Postby xyz » Thu Apr 11, 2013 0:39

Code: Select all
$ cat /usr/local/lib64/ruby/gems/1.9.1/gems/bson_ext-1.8.4/ext/cbson/mkmf.log                                                                       
have_func: checking for asprintf()... -------------------- yes                                                                                                                     
                                                                                                                                                                                   
"x86_64-pc-linux-gnu-gcc -o conftest -I/usr/include/ruby-1.9.1/x86_64-linux -I/usr/include/ruby-1.9.1/ruby/backward -I/usr/include/ruby-1.9.1 -I.    -O2 -march=x86-64 -pipe -fno-strict-aliasing -fPIC conftest.c  -L. -L/usr/lib64 -Wl,-R/usr/lib64 -L. -Wl,-O1 -Wl,--as-needed -rdynamic -Wl,-export-dynamic -Wl,--no-undefined     -Wl,-R -Wl,/usr/lib64 -L/usr/lib64 -lruby19  -lpthread -lrt -ldl -lcrypt -lm   -lc"
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main() {return 0;}
/* end */

"x86_64-pc-linux-gnu-gcc -o conftest -I/usr/include/ruby-1.9.1/x86_64-linux -I/usr/include/ruby-1.9.1/ruby/backward -I/usr/include/ruby-1.9.1 -I.    -O2 -march=x86-64 -pipe -fno-strict-aliasing -fPIC conftest.c  -L. -L/usr/lib64 -Wl,-R/usr/lib64 -L. -Wl,-O1 -Wl,--as-needed -rdynamic -Wl,-export-dynamic -Wl,--no-undefined     -Wl,-R -Wl,/usr/lib64 -L/usr/lib64 -lruby19  -lpthread -lrt -ldl -lcrypt -lm   -lc"
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: /*top*/
4: int main() {return 0;}
5: int t() { void ((*volatile p)()); p = (void ((*)()))asprintf; return 0; }
/* end */

--------------------

have_header: checking for ruby/st.h... -------------------- yes

"x86_64-pc-linux-gnu-gcc -E -I/usr/include/ruby-1.9.1/x86_64-linux -I/usr/include/ruby-1.9.1/ruby/backward -I/usr/include/ruby-1.9.1 -I.    -O2 -march=x86-64 -pipe -fno-strict-aliasing -fPIC  conftest.c -o conftest.i"
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <ruby/st.h>
/* end */

--------------------

have_header: checking for ruby/regex.h... -------------------- yes

"x86_64-pc-linux-gnu-gcc -E -I/usr/include/ruby-1.9.1/x86_64-linux -I/usr/include/ruby-1.9.1/ruby/backward -I/usr/include/ruby-1.9.1 -I.    -O2 -march=x86-64 -pipe -fno-strict-aliasing -fPIC  conftest.c -o conftest.i"
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <ruby/regex.h>
/* end */

--------------------

have_header: checking for ruby/encoding.h... -------------------- yes

"x86_64-pc-linux-gnu-gcc -E -I/usr/include/ruby-1.9.1/x86_64-linux -I/usr/include/ruby-1.9.1/ruby/backward -I/usr/include/ruby-1.9.1 -I.    -O2 -march=x86-64 -pipe -fno-strict-aliasing -fPIC  conftest.c -o conftest.i"
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <ruby/encoding.h>
/* end */

--------------------
xyz
Simple Hen
 
Posts: 48
Joined: Wed Mar 28, 2012 10:09


Return to Beginners|Newbies Area

Who is online

Users browsing this forum: No registered users and 2 guests

cron