Repository navigation
Build failures with ninja #9861
Copy link
Copy link
Closed
Labels
buildIssues and PRs related to Node.js builds or CI infrastructure.Issues and PRs related to Node.js builds or CI infrastructure.confirmed-bugIssues and PRs for confirmed bugs.Issues and PRs for confirmed bugs.
Description
- Version: master
- Platform: Linux
- Subsystem: build, ninja
Versions
- ccache 3.3.3
- ninja 1.7.2
Worth raising an issue to cover ninja build issues in these comments, reported by @sam-github and @kenany.
Info:
(copied from above thread)
Git bisect shows breaking commit as: e03a7b2
$ ./configure && tools/gyp_node.py -f ninja && ninja -C out/Release
...
[2248/2248] LINK node
FAILED: node
ccache g++ -pthread -rdynamic -m64 -Wl,--whole-archive,obj.target/deps/openssl/libopenssl.a -Wl,--no-whole-archive -Wl,-z,noexecstack -Wl,--whole-archive libv8_base.a -Wl,--no-whole-archive -pthread -o node -Wl,--start-group obj/src/node.debug-agent.o obj/src/node.async-wrap.o obj/src/node.env.o obj/src/node.fs_event_wrap.o obj/src/node.cares_wrap.o obj/src/node.connection_wrap.o obj/src/node.connect_wrap.o obj/src/node.handle_wrap.o obj/src/node.js_stream.o obj/src/node.node.o obj/src/node.node_buffer.o obj/src/node.node_config.o obj/src/node.node_constants.o obj/src/node.node_contextify.o obj/src/node.node_file.o obj/src/node.node_http_parser.o obj/src/node.node_javascript.o obj/src/node.node_main.o obj/src/node.node_os.o obj/src/node.node_revert.o obj/src/node.node_url.o obj/src/node.node_util.o obj/src/node.node_v8.o obj/src/node.node_stat_watcher.o obj/src/node.node_watchdog.o obj/src/node.node_zlib.o obj/src/node.node_i18n.o obj/src/node.pipe_wrap.o obj/src/node.signal_wrap.o obj/src/node.spawn_sync.o obj/src/node.string_bytes.o obj/src/node.stream_base.o obj/src/node.stream_wrap.o obj/src/node.tcp_wrap.o obj/src/node.timer_wrap.o obj/src/node.tty_wrap.o obj/src/node.process_wrap.o obj/src/node.udp_wrap.o obj/src/node.uv.o obj/src/node.util.o obj/src/node.string_search.o obj/src/node.inspector_agent.o obj/src/node.inspector_socket.o obj/src/node.node_crypto.o obj/src/node.node_crypto_bio.o obj/src/node.node_crypto_clienthello.o obj/src/node.tls_wrap.o obj/src/node.backtrace_posix.o obj/deps/v8/src/libv8_libplatform.a obj/tools/icu/libicui18n.a obj/deps/v8_inspector/src/inspector/libstandalone_inspector.a obj/deps/openssl/libopenssl.a obj/deps/zlib/libzlib.a obj/deps/http_parser/libhttp_parser.a obj/deps/cares/libcares.a obj/deps/uv/libuv.a obj/deps/v8/src/libv8_base.a obj/deps/v8/src/libv8_libbase.a obj/deps/v8/src/libv8_libsampler.a obj/tools/icu/libicuucx.a obj/tools/icu/libicudata.a obj/tools/icu/libicustubdata.a obj/deps/v8/src/libv8_snapshot.a -Wl,--end-group -ldl -lrt -lm
g++: error: libv8_base.a: No such file or directory
ninja: build stopped: subcommand failed.Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
buildIssues and PRs related to Node.js builds or CI infrastructure.Issues and PRs related to Node.js builds or CI infrastructure.confirmed-bugIssues and PRs for confirmed bugs.Issues and PRs for confirmed bugs.
Activity
gibfahn commentedon Nov 30, 2016
I think this may be a linux specific issue, I'm not having an issue on macOS Sierra (ccache 3.3.2, ninja 1.7.1), current master (330e63c).
doc: add "building node with ninja" guide
Fishrock123 commentedon Dec 2, 2016
cc @bnoordhuis since you made that commit.
It still builds fine for me on OS X 10.10.5
bnoordhuis commentedon Dec 5, 2016
ninja-on-linux probably puts the .a in a different location when standalone_static_library is on. Long shot but does this patch help?
kenany commentedon Dec 5, 2016
@bnoordhuis With the patch:
spacekitteh commentedon Dec 8, 2016
I'm experiencing this error while trying to patch Nixos's nodejs distribution to use the OS's v8 install. I can't figure out how to change the dependency on
/out/Release/obj.target/deps/v8/tools/gyp/libv8_base.a.bnoordhuis commentedon Dec 8, 2016
With the patch, libv8_base.a is referenced twice in the link step with different paths:
obj.target/deps/v8/src/libv8_base.avs.obj/deps/v8/src/libv8_base.a. Second take:Actually, I suspect this patch makes things needlessly complex. Third take:
Please let me know whether they work for you.
kenany commentedon Dec 8, 2016
@bnoordhuis Second take:
Third take:
bnoordhuis commentedon Dec 8, 2016
Okay, I'm going to leave this one for someone who cares about ninja. At least you know where to look now. :-)
kenany commentedon Feb 13, 2017
@bnoordhuis I've worked upon your second take and have arrived at the following patch which appears to fix the issue. Worthy of a PR?:
bnoordhuis commentedon Feb 13, 2017
Looks reasonable to me as long as the make-based build keeps working.
Untested, but perhaps you can even get rid of the
GENERATOR=="ninja"conditional and simply define OBJ_DIR and V8_BASE like this:kenany commentedon Feb 13, 2017
Unfortunately doesn't seem to work :(
Details
But yeah, the diff I posted still passes
make clean && make && make test.bnoordhuis commentedon Feb 13, 2017
Replacing
<(OBJ_DIR)with<(INTERMEDIATE_DIR)/../..in V8_BASE would probably do the trick but you're welcome to PR your changes either way.build: fix building with ninja on linux
build: fix building with ninja on linux
build: fix building with ninja on linux