Hi,
I've same problem and couldnt solve the problem... Is there any solution?? 
please help.

2 Eylül 2013 Pazartesi 16:13:06 UTC+3 tarihinde mark sayer yazdı:
>
>
> Howdy -
>  
> I'm having problems building native gems. When rubygem tries to make the 
> native extension, I get an error saying string.h is not found.
>  
> I've compiled a basic C program with string.h to make sure all my default 
> GCC include paths are right and it works fine. But I've tried to build 3 
> gems now (I'm after mysql - but I've also tried json and others) all of 
> which fail during make saying string.h not found.
>  
> I'm running
>  
> BeagleBon Black with Angtsrom 2012.12
> Ruby 1.9.3p194
> rubygem 1.8.23
>  
> I've installed the libc and other required development packaged using 
> opkg. As stated I can compile C programs using GCC okay and I have verified 
> string.h is available and basic string io functionality works in compiled C 
> program.s
>  
> Here's the output from gem install mysql
>  
> Building native extensions.  This could take a while...
> ERROR:  Error installing mysql:
>         ERROR: Failed to build gem native extension.
>         /usr/bin/ruby extconf.rb
> checking for mysql_ssl_set()... *** 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=/usr/bin/ruby
>         --with-mysql-config
>         --without-mysql-config
> /usr/lib/ruby/mkmf.rb:381:in `try_do': The compiler failed to generate an 
> executable file. (RuntimeError)
> You have to install development tools first.
>         from /usr/lib/ruby/mkmf.rb:461:in `try_link0'
>         from /usr/lib/ruby/mkmf.rb:476:in `try_link'
>         from /usr/lib/ruby/mkmf.rb:619:in `try_func'
>         from /usr/lib/ruby/mkmf.rb:894:in `block in have_func'
>         from /usr/lib/ruby/mkmf.rb:790:in `block in checking_for'
>         from /usr/lib/ruby/mkmf.rb:284:in `block (2 levels) in postpone'
>         from /usr/lib/ruby/mkmf.rb:254:in `open'
>         from /usr/lib/ruby/mkmf.rb:284:in `block in postpone'
>         from /usr/lib/ruby/mkmf.rb:254:in `open'
>         from /usr/lib/ruby/mkmf.rb:280:in `postpone'
>         from /usr/lib/ruby/mkmf.rb:789:in `checking_for'
>         from /usr/lib/ruby/mkmf.rb:893:in `have_func'
>         from extconf.rb:45:in `<main>'
>
> Gem files will remain installed in 
> /usr/lib/ruby/gems/1.9.1/gems/mysql-2.9.1 for inspection.
> Results logged to 
> /usr/lib/ruby/gems/1.9.1/gems/mysql-2.9.1/ext/mysql_api/gem_make.out
>  
> Here's the mkmf.log file from the gem install mysql:
>  
> "arm-angstrom-linux-gnueabi-gcc  -march=armv7-a     -mthumb-interwork 
> -mfloat-ab
> i=softfp -mfpu=neon -mtune=cortex-a8 
> --sysroot=/build/v2012.12/build/tmp-angstro
> m_v2012_12-eglibc/sysroots/beaglebone -o conftest 
> -I/usr/include/ruby-1.9.1/arm-
> linux-eabi -I/usr/include/ruby-1.9.1/ruby/backward 
> -I/usr/include/ruby-1.9.1 -I.
>   -D_FILE_OFFSET_BITS=64  -I/usr/include/mysql  -pipe -g 
> -feliminate-unused-debu
> g-types   -DUNIV_LINUX -O2 -pipe -g -feliminate-unused-debug-types -fPIC 
> conftes
> t.c  -L. -L/usr/lib -L. -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed 
> -rdynamic -
> Wl,-export-dynamic    -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed 
> -rdynamic -L/
> usr/lib -lmysqlclient -lz -lcrypt -lnsl -lm  -lruby  -lpthread -lrt -ldl 
> -lcrypt
>  -lm   -lc"
> In file included from /usr/include/ruby-1.9.1/ruby.h:32:0,
>                  from conftest.c:1:
> /usr/include/ruby-1.9.1/ruby/ruby.h:48:21: fatal error: string.h: No such 
> file o
> r directory
> compilation terminated.
> checked program was:
> /* begin */
> 1: #include "ruby.h"
> 2:
> 3: int main() {return 0;}
> /* end */
>
> Any ideas why I might be getting this error? Mu assumption is that the 
> compiler flags set by extconf.rb are somehow excluding the paths for 
> dtring.h includes on the agnstrom distro? But I'm lost here - any pointers 
> welcome.
>  
> Thanks,
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to