You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Build failure when cross-compiling for ARM/Android #4860
Changes introduced with v4.2.4 broke the ARM/Android build. The following error occurs:
./out/Release/mksnapshot: 1: ./out/Release/mksnapshot: Syntax error: word unexpected (expecting ")")
The issue is that mksnapshot has been compiled for the ARM/Android target, but is then being executed on the Linux (x86) host. Building and compiling node for Linux in a separate directory then copying over the mksnapshot utility to the cross-compile folder and re-running make allows the build to finish properly.
The error is misleading, attempting to run the mksnapshot ARM/Android binary without any options gives a different error message that properly describes the issue.
bash: ./out/Release/mksnapshot: cannot execute binary file: Exec format error
I'm not sure why error message from the build script gives a syntax error instead.
I fixed cross compilation for ARM with snapshots, but haven't been able to try Android. I do not know any reason why it should not work, should be just adapting the android-configure script. CFLAGS can be a problem, though.
Activity
MylesBorins commentedon Jan 25, 2016
@camz did v4.2.3 work as expected?
camz commentedon Jan 25, 2016
Yes, v.4.2.3 builds as expected. Using the following commands:
MylesBorins commentedon Jan 25, 2016
/cc @nodejs/build @jasnell
richardlau commentedon Jan 25, 2016
v4.2.4 was the first release where snapshots were properly enabled (49b3c3b).
richardlau commentedon Jan 25, 2016
See also nodejs/build#266
joaocgreis commentedon Jan 25, 2016
This has been noticed in the comments starting at nodejs/build#266 (comment) .
I fixed cross compilation for ARM with snapshots, but haven't been able to try Android. I do not know any reason why it should not work, should be just adapting the
android-configurescript.CFLAGScan be a problem, though.rvagg commentedon Mar 22, 2016
I'm seeking some feedback about how Node.js is used on Android if anyone watching this thread would like to tell us about it: nodejs/build#359
bnoordhuis commentedon May 2, 2016
android-configure passes
--without-snapshotto configure as of 271201f so I don't think there is anything left to do. Closing.fornwall commentedon May 2, 2016
@bnoordhuis Is there an open issue about not being able to build with snapshots on Android, or should one be created?