rubyjs / therubyracer

Embed the V8 Javascript Interpreter into Ruby
1.66k stars 192 forks source link

Fails to build on armhf, linking failure due to missing -fPIC in build #294

Closed rhertzog closed 10 years ago

rhertzog commented 10 years ago

On a Kali Linux 1.0.6 armhf system, which is very close to Debian 7 Wheezy, therubyracer fails to build. It can be seen in this build log for example: http://repo.kali.org/build-logs/beef-xss_0.4.4.9+0~git1395812733.dde007-1-kali-bleeding-edge-armhf-20140326-004718.849.log

Here's the relevant extract:

Installing therubyracer (0.12.1) with native extensions 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

        /usr/bin/ruby1.9.1 extconf.rb 
checking for main() in -lpthread... yes
creating Makefile

make
make[2]: Entering directory `/«BUILDDIR»/beef-xss-0.4.4.9+0~git1395812733.dde007/bundle/ruby/1.9.1/gems/therubyracer-0.12.1/ext/v8'
compiling value.cc
[...]
compiling template.cc
linking shared-object v8/init.so
/usr/bin/ld: /«BUILDDIR»/beef-xss-0.4.4.9+0~git1395812733.dde007/bundle/ruby/1.9.1/gems/libv8-3.16.14.3/vendor/v8/out/arm.release/obj.target/tools/gyp/libv8_base.a(api.o): relocation R_ARM_THM_MOVW_ABS_NC against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/«BUILDDIR»/beef-xss-0.4.4.9+0~git1395812733.dde007/bundle/ruby/1.9.1/gems/libv8-3.16.14.3/vendor/v8/out/arm.release/obj.target/tools/gyp/libv8_base.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[2]: *** [init.so] Error 1
make[2]: Leaving directory `/«BUILDDIR»/beef-xss-0.4.4.9+0~git1395812733.dde007/bundle/ruby/1.9.1/gems/therubyracer-0.12.1/ext/v8'

I'm available to provide further information and to try out any patch.

rhertzog commented 10 years ago

Sorry, seems to be a duplicate of #255