libv8 fails to build on armel systems #121

Closed
rhertzog opened this Issue Apr 4, 2014 · 9 comments

2 participants

@rhertzog

libv8 fails to build on a Kali Linux armel system. Such a system is very close to a Debian 7 armel system. An example of build failure can be seen in http://repo.kali.org/build-logs/beef-xss_0.4.4.9+0~git1395812733.dde007-1-kali-bleeding-edge-armel-20140326-004720.862.log. Here's the relevant part of the log:

Installing libv8 (3.16.14.3) with native extensions 
�[33mGem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

        /usr/bin/ruby1.9.1 extconf.rb 
creating Makefile
Compiling v8 for arm
Using python 2.7.3
Using compiler: /usr/bin/g++
/usr/bin/ld: error: /«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/preparser/preparser/preparser-process.o uses VFP register arguments, /«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/preparser does not
/usr/bin/ld: failed to merge target specific data of file /«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/preparser/preparser/preparser-process.o
[...]
collect2: ld returned 1 exit status
make[3]: *** [/«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/preparser] Error 1
make[2]: *** [arm.release] Error 2
/«BUILDDIR»/beef-xss-0.4.4.9+0~git1395812733.dde007/bundle/ruby/1.9.1/gems/libv8-3.16.14.3/ext/libv8/location.rb:36:in `block in verify_installation!': libv8 did not install properly, expected binary v8 archive '/«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'to exist, but it was not found (Libv8::Location::Vendor::ArchiveNotFound)
    from /«BUILDDIR»/beef-xss-0.4.4.9+0~git1395812733.dde007/bundle/ruby/1.9.1/gems/libv8-3.16.14.3/ext/libv8/location.rb:35:in `each'
    from /«BUILDDIR»/beef-xss-0.4.4.9+0~git1395812733.dde007/bundle/ruby/1.9.1/gems/libv8-3.16.14.3/ext/libv8/location.rb:35:in `verify_installation!'
    from /«BUILDDIR»/beef-xss-0.4.4.9+0~git1395812733.dde007/bundle/ruby/1.9.1/gems/libv8-3.16.14.3/ext/libv8/location.rb:26:in `install!'
    from extconf.rb:7:in `<main>'

I'm available to provide further information or to try out patches. Thanks in advance!

@ignisf
Collaborator

Hello,

  1. Can you please paste the whole error message.
  2. Can you test as described here: #98 (comment)
@ignisf ignisf added this to the 3.27 milestone Jun 17, 2014
@ignisf ignisf self-assigned this Jun 17, 2014
@ignisf
Collaborator

Thanks!

@ignisf ignisf modified the milestone: trunk, 3.27 Nov 16, 2014
@ignisf
Collaborator

@rhertzog could you paste the output of gcc -dM -E - < /dev/null | grep ARM_ARCH?

@rhertzog

So on a Kali system (Debian 7 based, using gcc 4.6) you get this:

(kali-armel-sbuild)root@arm02:~# gcc -dM -E - < /dev/null | grep ARM_ARCH
#define __ARM_ARCH_4T__ 1

On a Kali Rolling system based on Debian 8 Jessie (with gcc 4.9) you get this:

(kali-rolling-armel-sbuild)root@arm02:~# gcc -dM -E - < /dev/null | grep ARM_ARCH
#define __ARM_ARCH_ISA_ARM 1
#define __ARM_ARCH_ISA_THUMB 1
#define __ARM_ARCH 4
#define __ARM_ARCH_4T__ 1

All the former tests were made with a Kali system (i.e. Debian 7 based).

@ignisf
Collaborator

Unfortunately this architecture is not supported by the upstream v8 😞
v8 supports armv5 and on

@ignisf
Collaborator

Not sure why would Kali be based on a softfloat little endian image of Debian.
Closing as an upstream issue.

@ignisf ignisf closed this Nov 17, 2014
@rhertzog

FWIW that's the way the "armel" architecture is defined to support many old legacy arm systems. Kali also has the "armhf" architecture with hardfloat support (and armv7 ABI). BTW where did you see that upstream only supports armv5 and up? Because the libv8 package in Debian does compile on armel... see https://buildd.debian.org/status/package.php?p=libv8-3.14 and https://tracker.debian.org/pkg/libv8-3.14

But maybe that requirement got introduced in a more recent version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment