Repository navigation
Failed to compile from source for armv7l (busybox) on #7173
Description
Activity
- addedbuildIssues and PRs related to Node.js builds or CI infrastructure.Issues and PRs related to Node.js builds or CI infrastructure.armIssues and PRs related to the ARM architecture.Issues and PRs related to the ARM architecture.i18n-apiIssues and PRs related to Node.js internationalization support.Issues and PRs related to Node.js internationalization support.
on Jun 6, 2016 I'm not saying it's the cause, but if you want to build with
-mfloat-abi=softfp, you should at least pass--with-arm-float-abi=softfpto configure. If you can't get icu to build, see if--without-intlworks.Just to be clear, you're compiling on the target machine itself, right? You're not cross-compiling?
/cc @srl295
I would assume they are cross-compiling if they're setting those environment variables.
Reacted by michael-tsWe are cross-compiling, @mscdex is correct. I will try to set the flag variable and will report on the results shortly. Thanks
So the
/var/jenkins_home/jobs/Node/workspace/out/Release/icupkgfile should be run on the host architecture. Is it possible to verify the architecture of that file?
edit Fromicu-generic.gyp:'target_name': 'icupkg', 'toolsets': [ 'host' ],so,
icupkgought to be built for the host side.Actually, I can skip the
icutrimstep for the small ICU builds and save us some build time, but I am not sure if it will necessarily fix the issue here.If someone can get instructions for setting up the cross-compilation environment I could try to debug this some also.
@bnoordhuis, I've tried to compile with the correct flags as you've specified and results were successful.
Host System:Linux 38f5fc85140e 3.13.0-61-generic #100-Ubuntu SMP
configure line
./configure --without-snapshot --dest-cpu=arm --dest-os=linux --with-arm-float-abi=softfp --without-intl
To set it for cross compiling, I believe all you need to do is to point env. variables like in the issue that I've posted above
thank you
Reacted by Lorenzo Brutti@mrvini ok - what packages do i need?
edit and can you also try compiling with--with-intl=full-icu --download=all? This will download the full ICU and build it in a slightly different code path. while i'm debugging this it could add a data point.@srl295, we are using timesys distribution, and the entire distribution is 530MB, I can attached what's in bin folder if that's sufficient (its only 37MB). We are using timesys embedded linux flavor on the top of busybox. Please let me know
@mrvini I mean - what do I need to compile on the host?
@srl295 , I've added flags that you've recommended
./configure --without-snapshot --dest-cpu=arm --dest-os=linux --with-arm-float-abi=softfp --with-intl=full-icu --download=all;now I see slightly different error
../../deps/icu/source/data/in/icudt57l.dat "/var/jenkins_home/jobs/Node/workspace/out/Release/obj/gen/icudt57l.dat" /var/jenkins_home/jobs/Node/workspace/out/Release/icupkg: 1: /var/jenkins_home/jobs/Node/workspace/out/Release/icupkg: Syntax error: word unexpected (expecting ")") tools/icu/icudata.target.mk:13: recipe for target '/var/jenkins_home/jobs/Node/workspace/out/Release/obj/gen/icudt57l.dat' failed
when I specify small-icu, the error changes
'../../deps/icu-small/source/data/in/icudt57l.dat', 'locales': 'en,root', 'endian': 'little', 'tmpdir': '/var/jenkins_home/jobs/Node/workspace/out/Release/obj/gen/icutmp'} icu_small.json: icutrim.py config: Trim down ICU to just a certain locale set, needed for node.js use. FAILED: /var/jenkins_home/jobs/Node/workspace/out/Release/icupkg -tl ../../deps/icu-small/source/data/in/icudt57l.dat /var/jenkins_home/jobs/Node/workspace/out/Release/obj/gen/icutmp/icudt57l.dat
in terms of the variables that I'm settings before I run the .configure script, they are the following
#!/bin/sh export AR=~/timesys/bin/armv7l-timesys-linux-gnueabi-ar export CC=~/timesys/bin/armv7l-timesys-linux-gnueabi-gcc export CXX=~/timesys/bin/armv7l-timesys-linux-gnueabi-g++ export LINK=~/timesys/bin/armv7l-timesys-linux-gnueabi-g++ export TARGET_ARCH="-march=armv7l" export TARGET_TUNE="-mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -mthumb-interwork -mno-thumb" #DEFINE FLAGS export CXX_TARGET_ARCH="-march-armv7l" export V8_TARGET_ARCH="-march-armv7l"
to compile on the host, I think you need to be able to set up timesys distribution on your machine,, i think bin folder the bin folder for me takes 37MB. I'll check if that's available from timesys website ( i doubt though), those were given to me.
I (maybe) got setup for cross compiling on raspberry pi (set AR/CC/CXX/LINK), and was able to reproduce:
./out/Release/icupkg: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.3, for GNU/Linux 3.2.0, BuildID[sha1]=364920e9400e9bb597ff0829c9fc56b9026a1ab5, not strippedSo what gives here? Why was icupkg compiled for the target when it's clearly
toolset: host?
Looking…Reacted by mrvini- addedconfirmed-bugIssues and PRs for confirmed bugs.Issues and PRs for confirmed bugs.
on Jun 7, 2016 16 remaining items
@mrvini Good to know, thanks for the summary!
@mrvini you have
--with-intl=full-icu --download=all- that's great, gives you the full i18n data. You can also just omit those flags and you'll get the default for node, English only.thanks @srl295 , got u
@joaocgreis I am trying to get the Intl feature working on android with the suggestions above.
sudo dpkg --add-architecture i386 sudo apt-get install gcc-multilib g++-multilibexport CXX_host="g++ -m32" export CC_host="gcc -m32" export LINK_host="g++ -m32"But I get the following error on the ICU part:
g++ -m32 -rdynamic -fPIE -pie -o /home/nodejs/node/out/Release/iculslocs /home/nodejs/node/out/Release/obj.host/iculslocs/tools/icu/iculslocs.o /home/nodejs/node/out/Release/obj.host/iculslocs/tools/icu/no-op.o /home/nodejs/node/out/Release/obj.host/tools/icu/libicutools.a -llog /usr/bin/ld: cannot find -llogTo my knowledge -llog is a android specific library, so how to ensure the flag is not provided to the host toolchain? I found it being set in common.gypi, but I have no clue how to make the switch.
@nappy this seems like a separate issue.
common.gypihas[ 'OS=="android"', { 'defines': ['_GLIBCXX_USE_C99_MATH'], 'libraries': [ '-llog' ], }],seems like it may need a conditional there? Perhaps it's yet another latent bug that building with intl exposes?
I tried to compile by removing the
--without-intloption,CONFIGURE_ARGS = --dest-cpu=$(DEST_CPU) --dest-os=linux \ --shared-openssl --shared-openssl-includes="$(STAGING_DIR)/usr/include" --shared-openssl-libpath="$(STAGING_DIR)/usr/lib" \ --shared-zlib --shared-zlib-includes="$(STAGING_DIR)/usr/include" --shared-zlib-libpath="$(STAGING_DIR)/usr/lib" \ --v8-options="--max_old_space_size=20 --initial_old_space_size=4 --max_semi_space_size=2 --max_executable_size=5" \ --without-snapshot --with-mips-arch-variant=r2 --with-mips-fpu-mode=fp32 --with-mips-float-abi=softinstalled 32bit libs with,
sudo dpkg --add-architecture i386 sudo apt-get install gcc-multilib g++-multilibset *_host flags as noted above,
export CXX_host="g++ -m32" export CC_host="gcc -m32" export LINK_host="g++ -m32"and got this error :
g++ -m32 -pthread -rdynamic -o /home/hk/p/openwrt-tessel/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/node-v6.5.0/out/Release/genccode -Wl,--start-group /home/hk/p/openwrt-tessel/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/node-v6.5.0/out/Release/obj.host/genccode/deps/icu-small/source/tools/genccode/genccode.o /home/hk/p/openwrt-tessel/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/node-v6.5.0/out/Release/obj.host/genccode/tools/icu/no-op.o /home/hk/p/openwrt-tessel/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/node-v6.5.0/out/Release/obj.host/tools/icu/libicutools.a -Wl,--end-group -L/home/hk/p/openwrt-tessel/openwrt/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/usr/lib -lz -lssl -lcrypto /usr/bin/ld: skipping incompatible /home/hk/p/openwrt-tessel/openwrt/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/usr/lib/libz.so when searching for -lz /usr/bin/ld: skipping incompatible /home/hk/p/openwrt-tessel/openwrt/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/usr/lib/libz.a when searching for -lz /usr/bin/ld: cannot find -lz /usr/bin/ld: skipping incompatible /home/hk/p/openwrt-tessel/openwrt/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/usr/lib/libssl.so when searching for -lssl /usr/bin/ld: skipping incompatible /home/hk/p/openwrt-tessel/openwrt/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/usr/lib/libssl.a when searching for -lssl /usr/bin/ld: cannot find -lssl /usr/bin/ld: skipping incompatible /home/hk/p/openwrt-tessel/openwrt/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/usr/lib/libcrypto.so when searching for -lcrypto /usr/bin/ld: skipping incompatible /home/hk/p/openwrt-tessel/openwrt/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/usr/lib/libcrypto.a when searching for -lcrypto /usr/bin/ld: cannot find -lcrypto collect2: error: ld returned 1 exit status tools/icu/genccode.host.mk:136: recipe for target '/home/hk/p/openwrt-tessel/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/node-v6.5.0/out/Release/genccode' failed make[4]: *** [/home/hk/p/openwrt-tessel/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/node-v6.5.0/out/Release/genccode] Error 1 make[4]: Leaving directory '/home/hk/p/openwrt-tessel/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/node-v6.5.0/out' Makefile:66: recipe for target 'node' failed make[3]: *** [node] Error 2 make[3]: Leaving directory '/home/hk/p/openwrt-tessel/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/node-v6.5.0' Makefile:67: recipe for target '/home/hk/p/openwrt-tessel/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/node-v6.5.0/.built' failed make[2]: *** [/home/hk/p/openwrt-tessel/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/node-v6.5.0/.built] Error 2 make[2]: Leaving directory '/home/hk/p/openwrt-tessel/package/node/node' package/Makefile:191: recipe for target 'package/feeds/tessel/node/compile' failed make[1]: *** [package/feeds/tessel/node/compile] Error 2 make[1]: Leaving directory '/home/hk/p/openwrt-tessel/openwrt' /home/hk/p/openwrt-tessel/openwrt/include/toplevel.mk:181: recipe for target 'package/node/compile' failed make: *** [package/node/compile] Error 2Any idea ?
@huseyinkozan Either install those libraries or omit
--shared-openssl,--shared-zlib, etc. if you don't have them?@bnoordhuis I did:
CONFIGURE_ARGS = --dest-cpu=$(DEST_CPU) --dest-os=linux \ --shared-openssl --shared-openssl-includes="$(STAGING_DIR)/usr/include" --shared-openssl-libpath="$(STAGING_DIR)/usr/lib" \ --shared-zlib --shared-zlib-includes="$(STAGING_DIR)/usr/include" --shared-zlib-libpath="$(STAGING_DIR)/usr/lib" \ --v8-options="--max_old_space_size=20 --initial_old_space_size=4 --max_semi_space_size=2 --max_executable_size=5" \ --without-snapshot --with-mips-arch-variant=r2 --with-mips-fpu-mode=fp32 --with-mips-float-abi=softHmm, sorry. Miss understand.
They are built, but I thing they built against target, not host (or vice versa).ICU needs to link and run code on both host and target. Can you make sure the libraries are available on both?
Yes, I have both at host and target.
I tried two different ways; --with-intl=sysyem-icu, and exporting *_host variables with default icu options. One of them fails at genccode, other fails at execinfo.h. Dont remember which one is.
Found execinfo.h issue : #8233. Trying ...
- Ok so the execinfo issue is not icu related right?
Yes. I give up with icu. I built with
--without-intloption. My trials are here :
https://github.com/huseyinkozan/openwrt-tessel/tree/node-6.5.0
I am trying to compile node version 6.2.1 for armv7l (tried using out of the box one before, it would not run for me at all). While I was successfully able to compile all versions prior 6.2.0 (i.e. from 4.x -6.1), 6.2.0 and 6.2.1 start giving me a problem with icu and throws the following error
Options: {'verbose': 1, 'filterfile': 'icu_small.json', 'toolpath': '/var/jenkins_home/jobs/Node/workspace/out/Release', 'deltmpdir': 1, 'outfile': 'icudt57l.dat', 'datfile': '../../deps/icu-small/source/data/in/icudt57l.dat', 'locales': 'en,root', 'endian': 'little', 'tmpdir': '/var/jenkins_home/jobs/Node/workspace/out/Release/obj/gen/icutmp'} icu_small.json: icutrim.py config: Trim down ICU to just a certain locale set, needed for node.js use. FAILED: /var/jenkins_home/jobs/Node/workspace/out/Release/icupkg -tl ../../deps/icu-small/source/data/in/icudt57l.dat /var/jenkins_home/jobs/Node/workspace/out/Release/obj/gen/icutmp/icudt57l.dat tools/icu/icudata.target.mk:13: recipe for target '/var/jenkins_home/jobs/Node/workspace/out/Release/obj/gen/icutmp/icudt57l.dat' failed make[1]: *** [/var/jenkins_home/jobs/Node/workspace/out/Release/obj/gen/icutmp/icudt57l.dat] Error 1The script that i am using to build it is the following:
Am I missing some kind of dependencies? Please advise if