3

Environment

  • TARGET Single board computer: FriendlyARM mini210s
  • TARGET Linux : 3.0.8 armv7l
  • Cross compiling on vagrant box Ubuntu Precise64

Cross-compiling with GCC 4.5.1

  • arm-none-linux-gnueabi-gcc (ctng-1.8.1-FA) 4.5.1

arm-none-linux-gnueabi-gcc --verbose

Using built-in specs.
COLLECT_GCC=arm-none-linux-gnueabi-gcc
COLLECT_LTO_WRAPPER=/opt/FriendlyARM/toolschain/4.5.1/libexec/gcc/arm-none-linux-gnueabi/4.5.1/lto-wrapper
Target: arm-none-linux-gnueabi
Configured with: /work/toolchain/build/src/gcc-4.5.1/configure --build=i686-build_pc-linux-gnu --host=i686-build_pc-linux-gnu --target=arm-none-linux-gnueabi --prefix=/opt/FriendlyARM/toolschain/4.5.1 --with-sysroot=/opt/FriendlyARM/toolschain/4.5.1/arm-none-linux-gnueabi/sys-root --enable-languages=c,c++ --disable-multilib --with-cpu=arm1176jzf-s --with-tune=arm1176jzf-s --with-fpu=vfp --with-float=softfp --with-pkgversion=ctng-1.8.1-FA --with-bugurl=http://www.arm9.net/ --disable-sjlj-exceptions --enable-__cxa_atexit --disable-libmudflap --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --with-gmp=/work/toolchain/build/arm-none-linux-gnueabi/build/static --with-mpfr=/work/toolchain/build/arm-none-linux-gnueabi/build/static --with-ppl=/work/toolchain/build/arm-none-linux-gnueabi/build/static --with-cloog=/work/toolchain/build/arm-none-linux-gnueabi/build/static --with-mpc=/work/toolchain/build/arm-none-linux-gnueabi/build/static --with-libelf=/work/toolchain/build/arm-none-linux-gnueabi/build/static --enable-threads=posix --with-local-prefix=/opt/FriendlyARM/toolschain/4.5.1/arm-none-linux-gnueabi/sys-root --disable-nls --enable-symvers=gnu --enable-c99 --enable-long-long
Thread model: posix
gcc version 4.5.1 (ctng-1.8.1-FA) 

I am getting an error and the message "Your version of GCC does not report the FP ABI compiled for."

Hereafter the steps I went through:

Get node.js

wget http://nodejs.org/dist/v0.10.35/node-v0.10.35.tar.gz 
tar xzvf node-v0.10.35.tar.gz 
cd node-v0.10.35/

Setting environment

export PATH=$PATH:/opt/FriendlyARM/toolschain/4.5.1/bin
export PKG_CONFIG_PATH=/usr/arm-linux-gnueabi/lib/pkgconfig 
export CC=/opt/FriendlyARM/toolschain/4.5.1/bin/arm-none-linux-gnueabi-gcc
export CXX=/opt/FriendlyARM/toolschain/4.5.1/bin/arm-none-linux-gnueabi-g++
export AR=/opt/FriendlyARM/toolschain/4.5.1/bin/arm-none-linux-gnueabi-ar
export RANLIB=/opt/FriendlyARM/toolschain/4.5.1/bin/arm-none-linux-gnueabi-ranlib
export LINK="${CXX}"
export CCFLAGS="-march=armv7-a -mtune=cortex-a8 -mfpu=vfp -mfloat-abi=hard -DUSE_EABI_HARDFLOAT"
export CXXFLAGS="-march=armv7-a -mtune=cortex-a8 -mfpu=vfp -mfloat-abi=hard -DUSE_EABI_HARDFLOAT"
export OPENSSL_armcap=7
export GYPFLAGS="-Darmeabi=hard -Dv8_use_arm_eabi_hardfloat=true -Dv8_can_use_vfp3_instructions=true -Dv8_can_use_vfp2_instructions=true -Darm7=1"
export VFP3=on
export VFP2=on
export PREFIX_DIR=/usr/arm-linux-gnueabi

Configure

vagrant@vagrant:~/node-v0.10.35$ ./configure --without-snapshot --without-ssl --dest-cpu=arm --dest-os=linux --with-arm-float-abi=hard --prefix="${PREFIX_DIR}"

 { 'target_defaults': { 'cflags': [],
                       'default_configuration': 'Release',
                       'defines': [],
                       'include_dirs': [],
                       'libraries': []},
  'variables': { 'arm_fpu': 'vfpv2',
                 'arm_neon': 0,
                 'armv7': 0,
                 'clang': 0,
                 'gcc_version': 45,
                 'host_arch': 'arm',
                 'node_install_npm': 'true',
                 'node_prefix': '/usr/arm-linux-gnueabi',
                 'node_shared_cares': 'false',
                 'node_shared_http_parser': 'false',
                 'node_shared_libuv': 'false',
                 'node_shared_openssl': 'false',
                 'node_shared_v8': 'false',
                 'node_shared_zlib': 'false',
                 'node_tag': '',
                 'node_unsafe_optimizations': 0,
                 'node_use_dtrace': 'false',
                 'node_use_etw': 'false',
                 'node_use_openssl': 'false',
                 'node_use_perfctr': 'false',
                 'node_use_systemtap': 'false',
                 'openssl_no_asm': 0,
                 'python': '/usr/bin/python',
                 'target_arch': 'arm',
                 'v8_enable_gdbjit': 0,
                 'v8_no_strict_aliasing': 1,
                 'v8_use_arm_eabi_hardfloat': 'true',
                 'v8_use_snapshot': 'false',
                 'want_separate_host_toolset': 0}}
creating  ./config.gypi
creating  ./config.mk

The Issue

After running make I am getting the following message:

Your version of GCC does not report the FP ABI compiled for.

vagrant@vagrant:~/node-v0.10.35$ make -j 2
make -C out BUILDTYPE=Release V=1
make[1]: Entering directory `/home/vagrant/node-v0.10.35/out'
  /opt/FriendlyARM/toolschain/4.5.1/bin/arm-none-linux-gnueabi-g++ '-DENABLE_DEBUGGER_SUPPORT' '-DENABLE_EXTRA_CHECKS' '-DV8_TARGET_ARCH_ARM' '-DUSE_EABI_HARDFLOAT=1' '-DCAN_USE_VFP2_INSTRUCTIONS' -I../deps/v8/src  -Wall -Wextra -Wno-unused-parameter -pthread -fno-strict-aliasing -mfloat-abi=hard -O2 -fno-strict-aliasing -fno-tree-vrp -fno-omit-frame-pointer -fno-rtti -fno-exceptions -MMD -MF /home/vagrant/node-v0.10.35/out/Release/.deps//home/vagrant/node-v0.10.35/out/Release/obj.target/v8_base/deps/v8/src/platform-linux.o.d.raw -march=armv7-a -mtune=cortex-a8 -mfpu=vfp -mfloat-abi=hard -DUSE_EABI_HARDFLOAT -c -o /home/vagrant/node-v0.10.35/out/Release/obj.target/v8_base/deps/v8/src/platform-linux.o ../deps/v8/src/platform-linux.cc
  /opt/FriendlyARM/toolschain/4.5.1/bin/arm-none-linux-gnueabi-g++ '-DENABLE_DEBUGGER_SUPPORT' '-DENABLE_EXTRA_CHECKS' '-DV8_TARGET_ARCH_ARM' '-DUSE_EABI_HARDFLOAT=1' '-DCAN_USE_VFP2_INSTRUCTIONS' -I../deps/v8/src  -Wall -Wextra -Wno-unused-parameter -pthread -fno-strict-aliasing -mfloat-abi=hard -O2 -fno-strict-aliasing -fno-tree-vrp -fno-omit-frame-pointer -fno-rtti -fno-exceptions -MMD -MF /home/vagrant/node-v0.10.35/out/Release/.deps//home/vagrant/node-v0.10.35/out/Release/obj.target/v8_base/deps/v8/src/platform-posix.o.d.raw -march=armv7-a -mtune=cortex-a8 -mfpu=vfp -mfloat-abi=hard -DUSE_EABI_HARDFLOAT -c -o /home/vagrant/node-v0.10.35/out/Release/obj.target/v8_base/deps/v8/src/platform-posix.o ../deps/v8/src/platform-posix.cc
../deps/v8/src/platform-linux.cc:223:2: error: #error "Your version of GCC does not report the FP ABI compiled for." "Please report it on this issue" "http://code.google.com/p/v8/issues/detail?id=2140"
../deps/v8/src/platform-linux.cc: In static member function 'static bool v8::internal::OS::ArmUsingHardFloat()':
../deps/v8/src/platform-linux.cc:230:1: warning: no return statement in function returning non-void
make[1]: *** [/home/vagrant/node-v0.10.35/out/Release/obj.target/v8_base/deps/v8/src/platform-linux.o] Error 1
make[1]: *** Waiting for unfinished jobs....
../deps/v8/src/platform-posix.cc: In static member function 'static int v8::internal::OS::VSNPrintF(v8::internal::Vector<char>, const char*, va_list)':
../deps/v8/src/platform-posix.cc:338:5: note: the mangling of 'va_list' has changed in GCC 4.4
make[1]: Leaving directory `/home/vagrant/node-v0.10.35/out'
make: *** [node] Error 2

The issue seems to be related to hard abi vs soft abi ... and I don't know what difference it makes.

What is hard abi? and do I need it for node.js cross-compillation?

UPDATE Cross-compiling with GCC 4.6.3

  • arm-linux-gnueabihf-g++ (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3

Env

export CC=/usr/bin/arm-linux-gnueabihf-gcc
export CXX=/usr/bin/arm-linux-gnueabihf-g++
export AR=/usr/bin/arm-linux-gnueabihf-ar
export RANLIB=/usr/bin/arm-linux-gnueabihf-ranlib

I run the same configure command and then make and I am getting a different error this time:

/usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../../arm-linux-gnueabihf/bin/ld: warning: ld-linux.so.3, needed by /usr/lib/gcc/arm-linux-gnueabihf/4.6/libstdc++.so, not found (try using -rpath or -rpath-link)
/home/vagrant/node-v0.10.35/out/Release/obj.target/node/src/node.o: In function `node::Init(int, char**)':
node.cc:(.text+0x2be0): undefined reference to `node::SSL2_ENABLE'
node.cc:(.text+0x2c00): undefined reference to `node::SSL3_ENABLE'
collect2: ld returned 1 exit status
make[1]: *** [/home/vagrant/node-v0.10.35/out/Release/node] Error 1
make[1]: Leaving directory `/home/vagrant/node-v0.10.35/out'
make: *** [node] Error 2
  • 1
    What is your gcc version? Run gcc --version. Even better, what is the output of gcc --verbose? – thiagowfx Jan 5 '15 at 15:23
  • Updated question with the details you asked for. – zabumba Jan 5 '15 at 15:51
  • 1
    I believe the output is fine. What if you change the configure options to --with-arm-float-abi=soft or --with-arm-float-abi=softfp? Also, could you point out where you downloaded this gcc toolchain? – thiagowfx Jan 5 '15 at 17:22
  • Looks like I may need to look for a more recent version of GCC that's all – zabumba Jan 5 '15 at 17:28
  • 1
    I downloaded the 4.4.3 version from their website but couldn't compile it too. However, I got different error messages. But I still recommend you to try with the soft option. Make sure to do a make clean before re-compiling. – thiagowfx Jan 5 '15 at 19:15
2

Using GCC 4.5.1 - FAIL

arm-none-linux-gnueabi-gcc (ctng-1.8.1-FA) 4.5.1 does not report the FP ABI compiled for, as mentioned in the error message. Read more about the issue

I have tried to use ./configure --with-arm-float-abi=softpf and soft as suggested by Robert or Thiago. I didn't follow this path all the way.

Environment

export PATH=$PATH:/opt/FriendlyARM/toolschain/4.5.1/bin
export PKG_CONFIG_PATH=/usr/arm-linux-gnueabi/lib/pkgconfig 
export CC=/opt/FriendlyARM/toolschain/4.5.1/bin/arm-none-linux-gnueabi-gcc
export CXX=/opt/FriendlyARM/toolschain/4.5.1/bin/arm-none-linux-gnueabi-g++
export AR=/opt/FriendlyARM/toolschain/4.5.1/bin/arm-none-linux-gnueabi-ar
export RANLIB=/opt/FriendlyARM/toolschain/4.5.1/bin/arm-none-linux-gnueabi-ranlib
export LINK="${CXX}"
export CCFLAGS="-march=armv7-a -mtune=cortex-a8 -mfpu=vfp -mfloat-abi=soft "
export CXXFLAGS="-march=armv7-a -mtune=cortex-a8 -mfpu=vfp -mfloat-abi=soft "
export OPENSSL_armcap=7
export GYPFLAGS="-Darmeabi=soft -Dv8_use_arm_eabi_hardfloat=false -Dv8_can_use_vfp3_instructions=true -Dv8_can_use_vfp2_instructions=true -Darm7=1"
export VFP3=on
export VFP2=on
export PREFIX_DIR=/usr

Configure

  ./configure --without-snapshot --dest-cpu=arm --dest-os=linux --with-arm-float-abi=soft --prefix="${PREFIX_DIR}" 

"Your version of GCC does not report the FP ABI compiled for" error

vagrant@vagrant:~/node-v0.10.35$ make
make -C out BUILDTYPE=Release V=1
make[1]: Entering directory `/home/vagrant/node-v0.10.35/out'
  /opt/FriendlyARM/toolschain/4.5.1/bin/arm-none-linux-gnueabi-g++ '-DENABLE_DEBUGGER_SUPPORT' '-DENABLE_EXTRA_CHECKS' '-DV8_TARGET_ARCH_ARM' '-DUSE_EABI_HARDFLOAT=0' -I../deps/v8/src  -Wall -Wextra -Wno-unused-parameter -pthread -fno-strict-aliasing -O2 -fno-strict-aliasing -fno-tree-vrp -fno-omit-frame-pointer -fno-rtti -fno-exceptions -MMD -MF /home/vagrant/node-v0.10.35/out/Release/.deps//home/vagrant/node-v0.10.35/out/Release/obj.target/v8_base/deps/v8/src/platform-linux.o.d.raw -march=armv7-a -mtune=cortex-a8 -mfpu=vfp -mfloat-abi=soft  -c -o /home/vagrant/node-v0.10.35/out/Release/obj.target/v8_base/deps/v8/src/platform-linux.o ../deps/v8/src/platform-linux.cc
../deps/v8/src/platform-linux.cc:223:2: error: #error "Your version of GCC does not report the FP ABI compiled for." "Please report it on this issue" "http://code.google.com/p/v8/issues/detail?id=2140"
../deps/v8/src/platform-linux.cc: In static member function 'static bool v8::internal::OS::ArmUsingHardFloat()':
../deps/v8/src/platform-linux.cc:230:1: warning: no return statement in function returning non-void
make[1]: *** [/home/vagrant/node-v0.10.35/out/Release/obj.target/v8_base/deps/v8/src/platform-linux.o] Error 1
make[1]: Leaving directory `/home/vagrant/node-v0.10.35/out'
make: *** [node] Error 2

Using GCC 4.6.3 - CROSS-COMPILATION PASS

Removed the --without-ssl in my configure command and it compiled well (no errors) with arm-linux-gnueabihf-g++ (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3

vagrant@vagrant:~/node-v0.10.35$ ./configure --without-snapshot --dest-cpu=arm --dest-os=linux --with-arm-float-abi=hard --prefix="${PREFIX_DIR}"

It compiles and runs well on the target!

However npm shows errors posted question here

1

Seems like you are telling it you want the vector floating point unit (-mfpu=vfp), but that GCC should generate hard floating point instructions (-mfloat-abi=hard -DUSE_EABI_HARDFLOAT).

From GCC ARM options:

Using -mfloat-abi=hard with VFP coprocessors is not supported. Use -mfloat-abi=softfp with the appropriate -mfpu option to allow the compiler to generate code that makes use of the hardware floating-point capabilities for these CPUs.

I use the following options with the TI AM3505 (Cortex A8 + FPU) and it compiles ok (GCC 4.8.2):

-march=armv7-a -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a8

  • this helped understanding better the issue, but I still wasn't able to compile. I am getting the same message. Let me try harder and will let you know. – zabumba Jan 5 '15 at 23:33
  • 1
    I would try dropping back to just -march=armv7-a -mfloat-abi=softfp for CCFLAGS and CXXFLAGS. My build system (yocto) doesn't even generate GYPFLAGS so I'm not sure what to suggest there; they looks like v8 optimizations and you can probably just leave them out entirely. (What is generating the environment variables?) – Robert Calhoun Jan 6 '15 at 0:53
  • 1
    I guess you are past the fp issue (looks like ./configure --with-arm-float-abi=softpf is the best way to fix that.) and are having problems with your cross-compile sysroot. When you cross compile you have to tell the linker where your shared libraries are. What build system are you using? – Robert Calhoun Jan 6 '15 at 1:30
  • I am building on Precise64 and the target is Linux 3.0.8 armv7l. I have tried your suggestion but no success so far (same error message GCC does not report the FP ABI). I'd really like to have it work with GCC 4.5.1, because it is the Toolchain I have used to compile other utilities. Besides the node executable I was able to produce using GCC 4.6 doesn't run on my target (yet another issue) – zabumba Jan 6 '15 at 14:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.