-
Notifications
You must be signed in to change notification settings - Fork 30.7k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Failed to compile from source for armv7l (busybox) on #7173
Comments
I'm not saying it's the cause, but if you want to build with 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. |
We are cross-compiling, @mscdex is correct. I will try to set the flag variable and will report on the results shortly. Thanks |
So the
so, Actually, I can skip the 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 |
@mrvini ok - what packages do i need? |
@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:
So what gives here? Why was icupkg compiled for the target when it's clearly |
Hello, [0] https://tessel.io/blog/113259439202/tessel-2-hardware-overview |
@huseyinkozan You can disable with |
//cc @nodejs/build |
@joaocgreis I figure you might be an ideal person to have a look here since you're our resident cross-compiling expert |
Host arch detection is done using whatever is in the @mrvini can you add This works well with the Raspberry Pi tools for |
@srl295 If I disable it, will the APIs depends that work ? |
Thanks @joaocgreis , so I"ve tried to add the flag that you've asked for export CXX_host="g++ -m32" getting an error In file included from /usr/include/stdint.h:25:0,
from /usr/lib/gcc/x86_64-linux-gnu/4.9/include/stdint.h:9,
from ../deps/icu/source/common/unicode/ptypes.h:66,
from ../deps/icu/source/common/unicode/umachine.h:44,
from ../deps/icu/source/common/unicode/utypes.h:36,
from ../deps/icu/source/tools/toolutil/ppucd.cpp:15:
/usr/include/features.h:374:25: fatal error: sys/cdefs.h: No such file or directory
# include <sys/cdefs.h>
^
compilation terminated.
tools/icu/icutools.host.mk:530: recipe for target '/var/jenkins_home/jobs/Node/workspace/out/Release/obj.host/icutools/deps/icu/source/tools/toolutil/ppucd.o' failed |
@joaocgreis thanks! @mrvini ok, so now we're getting somewhere, I suppose. You may be missing some of the m32 header files Anyway - I'll test when I get a chance @huseyinkozan if you disable it then some APIs such as |
@srl295 Firstly, I tried to package icu as an extarnal library and build Node with I will try to build with |
@huseyinkozan try this - |
@srl295 I called the command :
But I couldnt find [0] how to use pkg-config at this OpenWRT Makefile : |
Building with |
@huseyinkozan — welcome. Note: This isn't really a new requirement — but it seems that only the ICU build process actually requires these to be set properly. |
I've tried your suggestion and set additional flags export TARGET_ARCH="-march=armv7l"
export TARGET_TUNE="-mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -mthumb-interwork -mno-thumb"
export CXX_TARGET_ARCH="-march-armv7l"
export V8_TARGET_ARCH="-march-armv7l"
export CXX_host="g++ -m32"
#export CXX_host="g++"
export CC_host="gcc"
export LINK_host="g++" i got the error when I set export CXX_host="g++ -m32" MMD -MF /var/jenkins_home/jobs/Node/workspace/out/Release/.deps//var/jenkins_home/jobs/Node/workspace/out/Release/obj.host/icutools/deps/icu/source/tools/toolutil/ppucd.o.d.raw -c -o /var/jenkins_home/jobs/Node/workspace/out/Release/obj.host/icutools/deps/icu/source/tools/toolutil/ppucd.o ../deps/icu/source/tools/toolutil/ppucd.cpp
In file included from /usr/include/stdint.h:25:0,
from /usr/lib/gcc/x86_64-linux-gnu/4.9/include/stdint.h:9,
from ../deps/icu/source/common/unicode/ptypes.h:66,
from ../deps/icu/source/common/unicode/umachine.h:44,
from ../deps/icu/source/common/unicode/utypes.h:36,
from ../deps/icu/source/tools/toolutil/ppucd.cpp:15:
/usr/include/features.h:374:25: fatal error: sys/cdefs.h: No such file or directory
# include <sys/cdefs.h>
^
compilation terminated. when I set CXX_host="g++" instead, i am getting the following error "/var/jenkins_home/jobs/Node/workspace/out/Release/obj.target/deps/v8/tools/gyp/libv8_nosnapshot.a" "/var/jenkins_home/jobs/Node/workspace/out/Release/libv8_nosnapshot.a")
g++ -pthread -rdynamic -o /var/jenkins_home/jobs/Node/workspace/out/Release/genccode -Wl,--start-group /var/jenkins_home/jobs/Node/workspace/out/Release/obj.host/genccode/deps/icu/source/tools/genccode/genccode.o /var/jenkins_home/jobs/Node/workspace/out/Release/obj.host/genccode/tools/icu/no-op.o /var/jenkins_home/jobs/Node/workspace/out/Release/obj.host/tools/icu/libicutools.a -Wl,--end-group
/var/jenkins_home/jobs/Node/workspace/out/Release/obj.host/tools/icu/libicutools.a: error adding symbols: Archive has no index; run ranlib to add one
collect2: error: ld returned 1 exit status
do the flags looks ok? or I am missing some? |
@joaocgreis , @srl295 thanks it make sense now and it works :) 👍 just in case anyone might be interested in the future, as @joaocgreis mentioned, install multilib first sudo dpkg --add-architecture i386
sudo apt-get install gcc-multilib g++-multilib and the flags are the following export TARGET_ARCH="-march=armv7l"
export TARGET_TUNE="-mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -mthumb-interwork -mno-thumb"
export CXX_TARGET_ARCH="-march-armv7l"
export V8_TARGET_ARCH="-march-armv7l"
export CXX_host="g++ -m32"
export CC_host="gcc -m32"
export LINK_host="g++ -m32"
./configure --without-snapshot --dest-cpu=arm --dest-os=linux --with-arm-float-abi=softfp --with-intl=full-icu --download=all; |
@mrvini Good to know, thanks for the summary! |
@mrvini you have |
thanks @srl295 , got u |
@joaocgreis I am trying to get the Intl feature working on android with the suggestions above.
But I get the following error on the ICU part:
To 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.
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
installed 32bit libs with,
set *_host flags as noted above,
and got this error :
Any idea ? |
@huseyinkozan Either install those libraries or omit |
@bnoordhuis I did:
|
Hmm, sorry. Miss understand. |
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 |
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
The script that i am using to build it is the following:
Am I missing some kind of dependencies? Please advise if
The text was updated successfully, but these errors were encountered: