-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
build: look for libnode.so in lib subdirectory #58213
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
Conversation
CC @richardlau FYI |
@khardix Unfortunately the $ tools/install.py --dest-dir /tmp/testinstl --prefix "" install
installing /tmp/testinstl/bin/node
installing /tmp/testinstl/lib/libnode.so.137
Traceback (most recent call last):
File "/home/rlau/sandbox/github/node/tools/install.py", line 426, in <module>
run(parse_options(sys.argv[1:]))
File "/home/rlau/sandbox/github/node/tools/install.py", line 379, in run
files(options, install)
File "/home/rlau/sandbox/github/node/tools/install.py", line 185, in files
action(options, [os.path.join(options.build_dir, 'lib', output_lib)],
File "/home/rlau/sandbox/github/node/tools/install.py", line 84, in install
try_copy(options, path, dest)
File "/home/rlau/sandbox/github/node/tools/install.py", line 73, in try_copy
return shutil.copy2(source_path, target_path)
File "/usr/lib64/python3.9/shutil.py", line 444, in copy2
copyfile(src, dst, follow_symlinks=follow_symlinks)
File "/usr/lib64/python3.9/shutil.py", line 264, in copyfile
with open(src, 'rb') as fsrc:
FileNotFoundError: [Errno 2] No such file or directory: '/home/rlau/sandbox/github/node/out/Release/lib/libnode.so.137' Using $ find . -type f -name "libnode.so.*"
./out/Release/obj.target/libnode.so.137
./out/Release/.deps/home/rlau/sandbox/github/node/out/Release/obj.target/libnode.so.137.d
./out/Release/.deps/home/rlau/sandbox/github/node/out/Release/libnode.so.137.d
./out/Release/libnode.so.137
$ I'm not sure if there's an easy way for
( |
Thanks for the analysis; I'll try to take another look at this next week (we have holidays in Czechia this one). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Requesting changes as per #58213 (comment) (since this now has an approval).
I tried to look into various places whether the ninja and/or the make generator could be persuaded to output files to the same places as the other one, but did not find anything. Granted, I'm not versed in using these tools too much, so it's entirely possible I missed something obvious. I whipped the new commit as an alternative – the |
As the actual location of built libnode.so may differ depending on which system was used to orchestrate the build (ninja or make), multiple places should be searched for it's location.
Landed in cb88e99 |
As the actual location of built libnode.so may differ depending on which system was used to orchestrate the build (ninja or make), multiple places should be searched for it's location. PR-URL: #58213 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Richard Lau <[email protected]>
As the actual location of built libnode.so may differ depending on which system was used to orchestrate the build (ninja or make), multiple places should be searched for it's location. PR-URL: #58213 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Richard Lau <[email protected]>
When building with
--shared
,ninja
will output thelibnode.so
into a{build_dir}/lib
directory, not in the root{build_dir}
. This fixes the install script to look for it in the correct place.Found during review of a Fedora rpm, where we apparently been moving the
libnode.so
manually to the root of the build directory manually this entire time. Let's see if we can stop doing that. 😅