Skip to contentSkip to conversation

New: Node.js 0.12.7 fails to build on raspberry_pi defconfig

Buildroot bugzilla at busybox.net 1 participant 5 messages Oct 9, 2015 – Oct 11, 2015

lore
Share & tools
lore
#0 lore raw

https://bugs.busybox.net/show_bug.cgi?id=8391

Summary: Node.js 0.12.7 fails to build on raspberry_pi
defconfig
Product: buildroot
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P5
Component: Other
AssignedTo: unassigned at buildroot.uclibc.org
ReportedBy: tomaspollak at gmail.com
CC: buildroot at uclibc.org
Estimated Hours: 0.0

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

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#1 lore raw

[Buildroot] [Bug 8391] Node.js 0.12.7 fails to build on raspberry_pi defconfig

https://bugs.busybox.net/show_bug.cgi?id=8391

--- Comment #1 from Peter Seiderer <[email protected]> 2015-10-10 00:17:21 UTC --- 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

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#2 lore raw

[Buildroot] [Bug 8391] Node.js 0.12.7 fails to build on raspberry_pi defconfig

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=8391

--- Comment #2 from Tomas Pollak <[email protected]> 2015-10-10 00:26:53 UTC --- 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. :)

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#3 lore raw

[Buildroot] [Bug 8391] Node.js 0.12.7 fails to build on raspberry_pi defconfig

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=8391

--- Comment #3 from Peter Seiderer <[email protected]> 2015-10-11 07:35:49 UTC --- 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/

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#4 lore raw

[Buildroot] [Bug 8391] Node.js 0.12.7 fails to build on raspberry_pi defconfig

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=8391

Thomas Petazzoni <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #4 from Thomas Petazzoni <[email protected]> 2015-10-11 13:06:09 UTC --- Fixed by
http://git.buildroot.net/buildroot/commit/?id=eec69cdcaff10c6221ff0be603eacb3fdb9d6448.
Thanks Tomas for reporting the problem, and thanks to Peter for fixing it!

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.