libv8 version 3.4.14.21-5 failed to build on armel

Bug #898558 reported by James Page
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libv8 (Ubuntu)
Fix Released
Medium
James Page

Bug Description

Error from build log:

g++ -o obj/release/arm/lithium-gap-resolver-arm.os -c -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -Wall -Wno-psabi -fno-rtti -fno-exceptions -fvisibility=hidden -fno-tree-sink -mno-thumb-interwork -Wall -Werror -W -Wno-unused-parameter -Wno-unused-but-set-variable -Wnon-virtual-dtor -Wno-abi -pedantic -mfloat-abi=soft -O2 -fomit-frame-pointer -fdata-sections -ffunction-sections -ansi -fPIC -D_FORTIFY_SOURCE=2 -DCAN_USE_UNALIGNED_ACCESSES=0 -DUSE_EABI_HARDFLOAT=0 -DV8_TARGET_ARCH_ARM -DV8_SHARED -DENABLE_DEBUGGER_SUPPORT -Isrc -I. src/arm/lithium-gap-resolver-arm.cc
g++ -o obj/release/arm/macro-assembler-arm.os -c -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -Wall -Wno-psabi -fno-rtti -fno-exceptions -fvisibility=hidden -fno-tree-sink -mno-thumb-interwork -Wall -Werror -W -Wno-unused-parameter -Wno-unused-but-set-variable -Wnon-virtual-dtor -Wno-abi -pedantic -mfloat-abi=soft -O2 -fomit-frame-pointer -fdata-sections -ffunction-sections -ansi -fPIC -D_FORTIFY_SOURCE=2 -DCAN_USE_UNALIGNED_ACCESSES=0 -DUSE_EABI_HARDFLOAT=0 -DV8_TARGET_ARCH_ARM -DV8_SHARED -DENABLE_DEBUGGER_SUPPORT -Isrc -I. src/arm/macro-assembler-arm.cc
src/arm/macro-assembler-arm.cc:56:2: error: #error "flag -mthumb-interwork missing"
scons: *** [obj/release/arm/macro-assembler-arm.os] Error 1
scons: building terminated because of errors.
make: *** [debian/stamp-scons-build] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2

https://launchpadlibrarian.net/86095234/buildlog_ubuntu-precise-armel.libv8_3.4.14.21-5_FAILEDTOBUILD.txt.gz

Tags: ftbfs armel
James Page (james-page)
tags: added: armel ftbfs
Changed in libv8 (Ubuntu):
importance: Undecided → Medium
assignee: nobody → James Page (james-page)
Revision history for this message
James Page (james-page) wrote :

I think that this is related to http://code.google.com/p/v8/issues/detail?id=590

Ubuntu support armv7 + and by default compiles with thumb2 support; as a result I think that -mno-thumb-interwork, in debian/rules causes a problem on Ubuntu which does not happen in Debian.

James Page (james-page)
Changed in libv8 (Ubuntu):
status: New → Confirmed
status: Confirmed → In Progress
Revision history for this message
kapouer (kapouer) wrote :

With the move to gyp builds, debian libv8 >= 3.5 will probably break again what's done here and now.
Is there a way to know that arch is armv7 when built within ubuntu ?
In debian we know that by checking DEB_HOST_ARCH == armhf and setting appropriate flags (in debian/rules)

Revision history for this message
James Page (james-page) wrote :

@kapouer

We could make the check to set the -mno-thumb-interwork flag on armel conditional on distribution i.e. use "dpkg-vendor --derives-from ubuntu" to determine whether to use -mno-thumb-interwork or -mthumb-interwork.

Revision history for this message
kapouer (kapouer) wrote :

On debian i have :
http://wiki.debian.org/ArmHardFloatPort
"Currently the Debian armhf port requires at least an ARMv7 CPU with Thumb-2 and VFP3D16."

Where can i find similar information for ubuntu ?
Besides thumb, there is also vfpv3 support that is better set in debian/rules than detected by v8 build system.

Revision history for this message
James Page (james-page) wrote :

@kapouer - https://wiki.ubuntu.com/ARM provides information about ARM on Ubuntu.

Revision history for this message
James Page (james-page) wrote :

So I've rebuilt for Ubuntu with:

 -mthumb-interwork (default)
 v8armeabi := softfp (instead of soft) to enable VFP
 unalignedaccess=on (default)

Builds OK; however I get a random set of test fail/CRASH during testing.

Might be related to the hardware I'm using; looking into this further.

Revision history for this message
James Page (james-page) wrote :

So the test failures look like problems with my local hardware; testing on one of the Ubuntu porter boxes went fine.

I'll re-test on the second porter box before uploading.

Revision history for this message
kapouer (kapouer) wrote :

OK,
as i said, libv8 3.5 will build using gyp : options have changed,
so it may be good to investigate now ? I could even add a condition
in debian/rules so you don't have to change it ?

Here are the actual debian/rules part involved (you can see the whole
at the package's git repo master branch) :

ifeq (armhf, $(DEB_HOST_ARCH))
CXXFLAGS += -fno-tree-sink
CXXFLAGS += -Wno-psabi
# enable armv7 vfpv3
GYPFLAGS += -Darmv7=1 -Darm_fpu=vfpv3 -Darm_neon=0 -Dv8_use_arm_eabi_hardfloat=true
endif

ifeq (armel, $(DEB_HOST_ARCH))
DEB_MAKE_EXTRA_ARGS += vfp3=off
CXXFLAGS += -fno-tree-sink
CXXFLAGS += -Wno-psabi
# Disable thumb-interworking because v8 supports it only on >= armv5t.
# http://code.google.com/p/v8/issues/detail?id=590
CXXFLAGS += -mno-thumb-interwork
# disable armv7, use softfloat
GYPFLAGS += -Darmv7=0 -Dv8_can_use_unaligned_accesses=false -Dv8_use_arm_eabi_hardfloat=false
endif

Jérémy.

Revision history for this message
James Page (james-page) wrote :

Built on the panda porter as well; guess my pandaboard must not be working quite right

Revision history for this message
James Page (james-page) wrote :

Hi Jérémy

Adding some rules in the Debian packaging to cope with the Ubuntu minimum target and features for armel would be great (no delta!); Looking at the 3.4 packaging I think this should be pretty easy to work into debian/rules:

ifeq (armhf, $(DEB_HOST_ARCH))
CXXFLAGS += -fno-tree-sink
CXXFLAGS += -Wno-psabi
# enable armv7 vfpv3
GYPFLAGS += -Darmv7=1 -Darm_fpu=vfpv3 -Darm_neon=0 -Dv8_use_arm_eabi_hardfloat=true
endif

ifeq (armel, $(DEB_HOST_ARCH))
CXXFLAGS += -fno-tree-sink
CXXFLAGS += -Wno-psabi
ifeq ($(shell dpkg-vendor --is ubuntu && echo true),true)
# Ubuntu targets armv7+ with VFP and thumb2 support by default for armel
GYPFLAGS += -Darmv7=1 -Darm_fpu=vfpv3 -Dv8_use_arm_eabi_hardfloat=false
else
DEB_MAKE_EXTRA_ARGS += vfp3=off
# Disable thumb-interworking because v8 supports it only on >= armv5t.
# http://code.google.com/p/v8/issues/detail?id=590
CXXFLAGS += -mno-thumb-interwork
# disable armv7, use softfloat
GYPFLAGS += -Darmv7=0 -Dv8_can_use_unaligned_accesses=false -Dv8_use_arm_eabi_hardfloat=false
endif
endif

I've not tested the above but I think it should broadly work (I think I've mimiced this in the 3.4 package to resolve the current FTBFS); happy to give it a test with the 3.5 package in the next few days on Ubuntu precise to see if it works OK.

Cheers

James

Revision history for this message
James Page (james-page) wrote : Re: [Bug 898558] Re: libv8 version 3.4.14.21-5 failed to build on armel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Hi Jérémy

On 02/12/11 22:03, Jérémy Lal wrote:
> Anyway the default value for arm_neon = 0, but it must be specified
> when armv7=1, because v8 upstream is setting non-overridable
> default values that debian had to override. Do you think it should
> be arm_neon = 0 or 1 ?

If libv8 supports runtime detection of neon extensions then we should
enabled this option; if not then it should be disabled at compile time
as not all platforms targeted by Ubuntu and Debian support this extension.

Cheers

James

- --
James Page
Ubuntu Core Developer
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBCAAGBQJO3JEoAAoJEL/srsug59jDBzsP/17s9NMCZ6DQgaw8YqlkQGAm
l5YbtdE8Vyg6TfQTUVRDryMMPXcU8xCtr/OUBn3qyM/r6mRJJeBo+9HDZqPtFoQJ
0rO2JJlX2NWOAvJ5fawC+fNHIHvx5FHZXGmcX1nxBMoC1ITEJ1ghXKGYW5F6C5nu
E/YqoRO7MBmBIp0h39t/s6PzO0FXOIEI1SiueY+bAB5NBNPFWDw080UEEvis+I7n
trXXfQno5lUrvY6ncB63yxzPXbe6hOcW6lOCAVl5AyZNZGtXQRVBMjf4Y284Lker
9WL6PoBWnQTHlDYWkbSRo9IUcbSElQQqak05LfB/UcMO0/x2HrJtbMHWVr/Dk2+R
jByDKaSWVcw0sPWk18iN0n0NHC23hKXHS9C2AAXitthf0UG5hjolX04jvSSGZIU+
1Eh5iNv5Bs1IqBEGrx6tS7g4WzD0AkK6QR2kQ3ejEWt/SWvs7rkQ2ryI3Ms3OC/5
hUzByXhsejfoYx9q4znyzcn73WwesWdv0scU89bCq/wXWW7SIPTQg0G1pqGf59h5
BRCG6K1LdaVzQc6nbcsiScsrSmqeHYHeM2xZGnRX0zigxI+ByLy8Y4xFEjAFKxE0
NgOyr7RNlhqrdPjnzjHeDvlYMJ3fkDyfl/BknOz3E4VNtRZ4avb04YuLnswcLU8J
zvN6Mxz6X9YACFYS7Lap
=hiT6
-----END PGP SIGNATURE-----

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libv8 - 3.4.14.21-5ubuntu1

---------------
libv8 (3.4.14.21-5ubuntu1) precise; urgency=low

  * Resolve FTBFS on Ubuntu armel (LP: #898558):
    - d/rules: Update rules for armel to support armv7+ with VFP and
      thumb2 enabled by default for Ubuntu.
 -- James Page <email address hidden> Mon, 05 Dec 2011 09:05:31 +0000

Changed in libv8 (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
James Page (james-page) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 05/12/11 09:49, Jérémy Lal wrote:
> libv8 is designed to detect all these things at runtime, however,
> we currently build it *with* snapshot, meaning the snapshot must be
> built with the greatest common features. We end up with these three
> archs and setups : debian armel : armv4t, thumb-interworking, soft
> float. But thumb-interworking needs BLX, only supported on armv5,
> so it is disabled. ubuntu armel : armv7, vfpv3 but soft float,
> arm_neon=0 debian armhf : armv7, vfpv3 with hard float (hence the
> name of the port), arm_neon=0

Ubuntu are in the process for bootstrapping armhf for precise; I think
the armhf settings for Debian will transfer OK to Ubuntu.

> I'll include your debian/rules fix for ubuntu in the next release.

Great - thats really helpful! If you want me to give it a test pls
let me know.

Thanks for your help in resolving this!

James

- --
James Page
Ubuntu Core Developer
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBCAAGBQJO3JSZAAoJEL/srsug59jD9HMQANUBqq5l0L4lcXp06Brs9LOJ
biV3DvtUHSBh8l8oGDJLKTxKeyIar2X3Ll4+IAq/9kJTHlNXXIwvK6pzqy5CG15Y
AE8lv4Llac3aedJZml9OabD1jc+9Ud4kgJG4Bh8GEywRJOXl6y9oDO36L5aVCilj
f2ndqDB2czJmR6GnmorYuUufzpu8PvkKFgm1vHgqC/XBrVruNld8C20JywarBSmt
DSwPpiOogBvSGyJQEMMPG9X2pSxELuYO6OtB0Mg9KFQbYBqwWApIez2LoNbTP5L9
cfNh5gEBTal9/k5+4OBZSfiPygFZRhx13+lIUlllNzq3aw6yQDEUA+yA3KvriuYW
PX1CoqJHFytjNqFCXijjtktqY4ovfZUZI2T5lB/s2zH7ZYrIk9io+WDqRDspHtG4
NYlRfoZoNhhQmJRWy8plgCzNGxciCFNZ+81O6OtfxuA5UNgiG/2A4Tss75u4EYZC
dI5yiuLdcje86gjL1PCVc76/714u30E0JqXJ1yM3xU61Aouuo8qDbx/oR5zTfITv
U259OSUEv4QUbLr7/7ewOm1ci387AmcGv0SSgTY19LyJ5cR62fvQMK8LNTHWVmYv
PoOXGR8htVuQrScGF9lbGOycoftv0aCTwCFH9gHMTyzRbDN/5GVdAqJWu8Zbc10q
HQ3O4nJMmoYjr8M4Sl4A
=RLgw
-----END PGP SIGNATURE-----

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.