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

Missing static library libc++.a prevents building libnode.so #156

Closed
ayushmanchhabra opened this issue Oct 18, 2022 · 7 comments
Closed

Comments

@ayushmanchhabra
Copy link

ayushmanchhabra commented Oct 18, 2022

I've documented this issue in the mailing list. I opened an issue since I believe there could be a bug.

Node compiles for me but fails at the SOLINK stage.

[1720/1720] SOLINK lib/libnode.so
FAILED: lib/libnode.so lib/libnode.so.TOC
if [ ! -e lib/libnode.so -o ! -e lib/libnode.so.TOC ]; then /home/ayushmxn/nw/nwjs/src/third_party/llvm-build/Release+Asserts/bin/clang++ -shared -pthread -rdynamic -m64 --sysroot=/home/ayushmxn/nw/nwjs/src/build/linux/debian_sid_amd64-sysroot -nostdlib++ -L../nw/lib/ -lnw -Wl,--whole-archive ../nw/obj/buildtools/third_party/libc++abi/libc++abi.a ../nw/obj/buildtools/third_party/libc++/libc++.a -Wl,--no-whole-archive -Wl,-z,relro -Wl,-z,now -Wl,--gc-sections -pthread -o lib/libnode.so -Wl,-soname=libnode.so @lib/libnode.so.rsp && { readelf -d lib/libnode.so | grep SONAME ; nm -gD -f p lib/libnode.so | cut -f1-2 -d' '; } > lib/libnode.so.TOC; else /home/ayushmxn/nw/nwjs/src/third_party/llvm-build/Release+Asserts/bin/clang++ -shared -pthread -rdynamic -m64 --sysroot=/home/ayushmxn/nw/nwjs/src/build/linux/debian_sid_amd64-sysroot -nostdlib++ -L../nw/lib/ -lnw -Wl,--whole-archive ../nw/obj/buildtools/third_party/libc++abi/libc++abi.a ../nw/obj/buildtools/third_party/libc++/libc++.a -Wl,--no-whole-archive -Wl,-z,relro -Wl,-z,now -Wl,--gc-sections -pthread -o lib/libnode.so -Wl,-soname=libnode.so @lib/libnode.so.rsp && { readelf -d lib/libnode.so | grep SONAME ; nm -gD -f p lib/libnode.so | cut -f1-2 -d' '; } > lib/libnode.so.tmp && if ! cmp -s lib/libnode.so.tmp lib/libnode.so.TOC; then mv lib/libnode.so.tmp lib/libnode.so.TOC ; fi; fi
clang: error: no such file or directory: '../nw/obj/buildtools/third_party/libc++/libc++.a'
ninja: build stopped: subcommand failed.

According to the error message, the static library libc++.a is not being built. Directly trying to build it also does not work.

cd $HOME/nwjs/src && ninja -C out/nw/obj/buildtools/third_party/libc++ -f libc++.ninja
ninja: Entering directory `out/nw/obj/buildtools/third_party/libc++'
ninja: error: libc++.ninja:9: unknown build rule 'cxx'
build obj/buildtools/third_party/libc++/libc++/algorithm.o: cxx ../../bu...
                                                          ^ near here

That leads to me to conclude that there may be an error in the BUILD.gn file but I haven't been able to pinpoint it yet.

UPDATE: also noticed that libcpp.lib is not being built which seems to be required for Node.

cc @rogerwang

@ayushmanchhabra ayushmanchhabra changed the title Missing static library prevents building libnode.so Missing static library libc++.a prevents building libnode.so Oct 18, 2022
@frank-dspeed
Copy link

@ayushmXn what is the exact use case of your App that you run in NWJS you should maybe switch today if possible to puppeteer and use the puppeteer launch option to start chromium you can then ask me for the right command line flags to get the window setup that you want to have. if you want to exchange data between the node and the main context use

background we have thrown carlo into puppeteer that includes a JS based IPC binding to chromium without a websocket server via the devtools protocol https://github.com/GoogleChromeLabs/carlo/

page.evalFunction(()=>somethingInthePageDom)

@ayushmanchhabra
Copy link
Author

That didn't help but thanks for the info.

@frank-dspeed
Copy link

ok then i want to answer that it says you got no build rule for cxx so your missing parameters maybe you did not use repo tools or something other wrong.

example build rule you need to create one called cxx or get the product of cxx some how

ExternalProject_Add(extProject
    GIT_REPOSITORY <GIT_URL>
    CMAKE_CACHE_ARGS "-
    DCMAKE_INSTALL_PREFIX:STRING=${CMAKE_INSTALL_PREFIX}"
    BUILD_BYPRODUCTS ${CMAKE_INSTALL_PREFIX}/lib/libext.so
)
add_library(extLib SHARED IMPORTED)
add_dependencies(extLib extProject)
set_target_properties(extLib
    PROPERTIES IMPORTED_LOCATION ${CMAKE_INSTALL_PREFIX}/lib/libext.so
)

target_link_libraries(project extLib)

@ayushmanchhabra
Copy link
Author

Thanks! That gives an idea of where to look.

@ayushmanchhabra
Copy link
Author

From the commit history of nw70 branch looks like this may have been resolved. I'll keep this open until I can verify this on my local nw69 branch.

@frank-dspeed
Copy link

@ayushmXn yes roger found the error

@frank-dspeed
Copy link

but chromium was blocked last days anyway i am waiting for some commits to land since 2 weeks

Who	When (UTC)	Message
[mliedtke](mailto:mliedtke@google.com)	Thu, 27 Oct 13:04	open (0b251add reverted)
[luci-notify](mailto:luci-notify@appspot.gserviceaccount.com)	Thu, 27 Oct 11:32	Tree is closed (Automatic: "Check - d8 - code_serializer", "Check - isolates", "Bisect 0b251add", "Bisect 0b251add|Retry - code_serializer" on https://cr-buildbucket.appspot.com/build/8799156630301611137 V8 Linux - debug from [f1d16aebe4dfea4ff663d6dd5d865339db11b1b3](https://crrev.com/f1d16aebe4dfea4ff663d6dd5d865339db11b1b3) )
[luci-notify](mailto:luci-notify@appspot.gserviceaccount.com)	Wed, 26 Oct 09:11	Tree is open (Automatic: (。>﹏<。) )
[luci-notify](mailto:luci-notify@appspot.gserviceaccount.com)	Wed, 26 Oct 08:35	Tree is closed (Automatic: "build", "build|compile" on https://cr-buildbucket.appspot.com/build/8799255848812854961 V8 Linux64 - debug - single generation - builder from [95eece306864737fe30fd34283e6000017760a9a](https://crrev.com/95eece306864737fe30fd34283e6000017760a9a) )
[alexschulze](mailto:alexschulze@google.com)	Mon, 24 Oct 18:34	open (more and more bots become available again)
[machenbach](mailto:machenbach@chromium.org)	Mon, 24 Oct 17:34	closed - too many commits queued - please o-p-e-n in ~30 minutes
[machenbach](mailto:machenbach@chromium.org)	Mon, 24 Oct 17:34	closed - too many commits queued - please o-p-e-n in 3~ 0 minutes
[machenbach](mailto:machenbach@chromium.org)	Mon, 24 Oct 17:32	closed - waiting a bit
[machenbach](mailto:machenbach@chromium.org)	Mon, 24 Oct 17:28	throttled - reverted
[machenbach](mailto:machenbach@chromium.org)	Mon, 24 Oct 17:27	open - reverted
[luci-notify](mailto:luci-notify@appspot.gserviceaccount.com)	Mon, 24 Oct 14:31	Tree is closed (Automatic: "Check - d8" on https://cr-buildbucket.appspot.com/build/8799416321712790017 V8 Mac64 GC Stress from [bd590292b3bad80820594bc0a9c39eca47033292](https://crrev.com/bd590292b3bad80820594bc0a9c39eca47033292) )
[leszeks](mailto:leszeks@chromium.org)	Fri, 21 Oct 13:24	open (flaky test, kicking off flako)
[luci-notify](mailto:luci-notify@appspot.gserviceaccount.com)	Fri, 21 Oct 13:17	Tree is closed (Automatic: "Check - d8" on https://cr-buildbucket.appspot.com/build/8799693052118973217 V8 Mac64 GC Stress from [4802bdcc97236256910c2f16164e24a6ded35adf](https://crrev.com/4802bdcc97236256910c2f16164e24a6ded35adf) )
[leszeks](mailto:leszeks@chromium.org)	Thu, 20 Oct 11:38	open (still reverted)
[luci-notify](mailto:luci-notify@appspot.gserviceaccount.com)	Thu, 20 Oct 11:38	Tree is closed (Automatic: "Check - d8 - code_serializer", "Check - isolates", "Bisect 1352f296", "Bisect 1352f296|Retry - isolates" on https://cr-buildbucket.appspot.com/build/8799790171068360529 V8 Linux - debug from [874a101fa5b78edbb97dbba6004e084bc3e73d6b](https://crrev.com/874a101fa5b78edbb97dbba6004e084bc3e73d6b) )
[leszeks](mailto:leszeks@chromium.org)	Thu, 20 Oct 11:37	open (revert)
[luci-notify](mailto:luci-notify@appspot.gserviceaccount.com)	Thu, 20 Oct 11:27	Tree is closed (Automatic: "Check - stress_concurrent_allocation" on https://cr-buildbucket.appspot.com/build/8799790643619637137 V8 Linux64 - debug from [874a101fa5b78edbb97dbba6004e084bc3e73d6b](https://crrev.com/874a101fa5b78edbb97dbba6004e084bc3e73d6b) )
[leszeks](mailto:leszeks@chromium.org)	Mon, 17 Oct 13:52	open (reverted)
[leszeks](mailto:leszeks@chromium.org)	Mon, 17 Oct 13:52	open (reverteD)
[luci-notify](mailto:luci-notify@appspot.gserviceaccount.com)	Mon, 17 Oct 13:44	Tree is closed (Automatic: "Check - d8 - code_serializer", "Check - isolates" on https://cr-buildbucket.appspot.com/build/8800054125477619281 V8 Linux - debug from [3df866d67dc9513f74c40694ac21701cf4efcc2b](https://crrev.com/3df866d67dc9513f74c40694ac21701cf4efcc2b) )
[leszeks](mailto:leszeks@google.com)	Fri, 14 Oct 09:41	open (already reverted)
[luci-notify](mailto:luci-notify@appspot.gserviceaccount.com)	Fri, 14 Oct 09:41	Tree is closed (Automatic: "Check - d8" on https://cr-buildbucket.appspot.com/build/8800342488906347921 V8 Linux - arm64 - sim - gc stress from [9027afd67a16ee9c1b408eb5859fa8d7ff82dcac](https://crrev.com/9027afd67a16ee9c1b408eb5859fa8d7ff82dcac) )
[leszeks](mailto:leszeks@chromium.org)	Fri, 14 Oct 09:29	open (reverted)
[luci-notify](mailto:luci-notify@appspot.gserviceaccount.com)	Fri, 14 Oct 08:25	Tree is closed (Automatic: "Check - d8" on https://cr-buildbucket.appspot.com/build/8800344825720683937 V8 Mac64 GC Stress from [9027afd67a16ee9c1b408eb5859fa8d7ff82dcac](https://crrev.com/9027afd67a16ee9c1b408eb5859fa8d7ff82dcac) )
[nicohartmann](mailto:nicohartmann@chromium.org)	Fri, 14 Oct 08:24	open (reverted)

but at present the bot status is open and we got a new commit hash so maybe maybe next week we get some cool stuff ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants