Hi, I'm currently building a buildroot image (from git HEAD) for a raspberry_pi board, but when trying to build the nodejs package (ver 0.12.7) the compiler fails at some point on deps/v8/source with the following error: "Your CPU's ARM architecture is not supported yet" This seems to be caused by the compiler not being able to determine the right ARM version when compiling. If I cd to output/build/nodejs-0.12.7 dir and run: CXXFLAGS="-march=armv6" make It builds correctly. I've been looking at the package/nodejs/nodejs.mk file but haven't been able to figure where to put this to get the package to build. Any pointers? Thanks and congrats for your work! Tom
Hello Tom, the problem is not the compiler, but the node.js code implementing its own atomic helpers (instead of using proper library calls), the same code is used (and fixed) in some other google code base, see eg. [1]. The buildroot rpi compiler defines __ARM_ARCH_6ZK__, see: $ ./host/usr/bin/arm-buildroot-linux-gnueabi-g++ -dM -E - < /dev/null | grep ARM_ARCH #define __ARM_ARCH_ISA_ARM 1 #define __ARM_ARCH_ISA_THUMB 1 #define __ARM_ARCH 6 #define __ARM_ARCH_6ZK__ 1 Maybe there is a newer version of node.js? Or add __ARM_ARCH_6ZK__ at the right places of the nodejs-0.12.7/deps/v8/src/base/atomicops_internals_arm_gcc.h file... Regards, Peter [1] https://groups.google.com/a/chromium.org/forum/#!topic/chromium-reviews/sgJEpULO5Xc
Thanks for the heads Peter. Now, given that the compiler _is_ able to build the package just by setting -march=armv6, wouldn't it be easier to simply include that parameter in the configure options instead of modifying the source code itself? Thanks again PS. I'll also take a shot at building node v4.1.2 and see if it works. There's a lot of new stuff in there so I'll keep my fingers crossed. :)
Hello Tom, I think it is the difference between workaround and fix ;-) Should be fixed by [1], but a patch supporting nodejs 4.1.2 for buildroot would be welcome... Regards, Peter [1] https://patchwork.ozlabs.org/patch/528714/
Fixed by http://git.buildroot.net/buildroot/commit/?id=eec69cdcaff10c6221ff0be603eacb3fdb9d6448. Thanks Tomas for reporting the problem, and thanks to Peter for fixing it!