Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider different C lib as "cross-compile" #10271

Closed
piranna opened this issue Dec 14, 2016 · 1 comment
Closed

Consider different C lib as "cross-compile" #10271

piranna opened this issue Dec 14, 2016 · 1 comment
Labels
build Issues and PRs related to build files or the CI.

Comments

@piranna
Copy link
Contributor

piranna commented Dec 14, 2016

I'm using an own cross-toolchain to compile Node.js using musl from a Ubuntu glib-based system. Thing is that I get always the next error:

/bin/sh: 1: /home/piranna/Proyectos/nodejs/deps/node/out/Release/mkpeephole: not found

The file is there, but since I'm using the cross-toolchain to compile Node.js, mkpeephole gets to be compiled with it too because I'm cross-compiling from LInux x86_64 GLib to Linux x86_64 musl, and at configure script it's only being considered the CPU architecture to detect if it's being done a cross-compilation. I would consider adding other heuristics to check if a cross-compilation is being done, specially the C standard lib being used but also the operating system and others, or alternatively add an option to set explicitly that a cross-compilation is being done.

@addaleax addaleax added the build Issues and PRs related to build files or the CI. label Dec 14, 2016
@piranna
Copy link
Contributor Author

piranna commented Dec 16, 2016

I have found that the pull-request #10287 is not just enough, because the system libraries and headers are still needed to make the compilation successful. By default both ./configure and make are using the globally installed C/C++ compilers and there's no way to set an alternative toolchain or sysroot, so while up to Node.js 6.x it's just enough by executing ./configure setting the $CC and $CXX environment variables, now it doesn't work due to mkpeephole before it needs to be executed on the host system. I have found too that also some components of the final Node.js binary are being build with the global C/C++ compiler, so or I'm doing something totally wrong, or the Node.js cross-compilation support is plainly broken :-/

piranna added a commit to piranna/node that referenced this issue Dec 26, 2016
Adds --cross-compiling and --no-cross-compiling flags

Fixes: nodejs#10271
evanlucas pushed a commit that referenced this issue Jan 3, 2017
Adds --cross-compiling and --no-cross-compiling flags

Fixes: #10271
PR-URL: #10287
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
evanlucas pushed a commit that referenced this issue Jan 4, 2017
Adds --cross-compiling and --no-cross-compiling flags

Fixes: #10271
PR-URL: #10287
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
MylesBorins pushed a commit that referenced this issue Jan 23, 2017
Adds --cross-compiling and --no-cross-compiling flags

Fixes: #10271
PR-URL: #10287
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
MylesBorins pushed a commit that referenced this issue Jan 23, 2017
Adds --cross-compiling and --no-cross-compiling flags

Fixes: #10271
PR-URL: #10287
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
MylesBorins pushed a commit that referenced this issue Jan 23, 2017
Adds --cross-compiling and --no-cross-compiling flags

Fixes: #10271
PR-URL: #10287
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
MylesBorins pushed a commit that referenced this issue Jan 24, 2017
Adds --cross-compiling and --no-cross-compiling flags

Fixes: #10271
PR-URL: #10287
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
MylesBorins pushed a commit that referenced this issue Jan 24, 2017
Adds --cross-compiling and --no-cross-compiling flags

Fixes: #10271
PR-URL: #10287
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
MylesBorins pushed a commit that referenced this issue Jan 31, 2017
Adds --cross-compiling and --no-cross-compiling flags

Fixes: #10271
PR-URL: #10287
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
MylesBorins pushed a commit that referenced this issue Feb 1, 2017
Adds --cross-compiling and --no-cross-compiling flags

Fixes: #10271
PR-URL: #10287
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues and PRs related to build files or the CI.
Projects
None yet
Development

No branches or pull requests

2 participants