-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
error while loading shared libraries: librustc_driver-fb0866b1cd913c20.so: cannot open shared object file: No such file or directory #136237
Comments
are you removing the rpath? the rustc binary is supposed to have an rpath of |
that "uploading" comment is suspicious. do you have some external test tool running this in a docker container or something like that? if so, the files there won't match the files in your build directory unless you upload all of them. please show a listing of that /tmp/work/test4056 directory and verify that it contains librustc_driver.so. |
Yeah, in our Yocto environment, we're performing cross-compilation and testing by transferring the image and other artifacts to QEMU to run the tests. During this process, the rustc-main binaries are successfully uploaded to QEMU, but we are uncertain whether the librustc_driver.so file is also being uploaded. When attempting to run rustc-main inside QEMU, it is unable to locate the librustc_driver.so file in the expected directory where the rustc-main binaries were uploaded.
Since the files are uploaded for testing via the remote-test-client to run on the QEMU target using the remote-test-server, we are unable to list the files in the
PS: While adding the comment I mistakenly closed the issue . Can someone please reopen this issue? |
i am not sure what to tell you. it doesn't matter if that file is present on the host if it's not present in the QEMU image. note that target/release/deps is not the final path to the binary, bootstrap does various file copying to set up the sysroot. like @Noratrieb said, librustc_driver.so needs to be in the right relative path so it can be loaded with -rpath. |
Please find the detailed analysis of the reported issue. 1. Testing above reported issue on the native rust build.We noticed that the Running As shown in the log above, the 2. Details of above reported issue on the target (using qemu image)When running the test for yocto target "x86_64-poky-linux-gnu" using the remote-test-server and remote-test-client method, the tests are uploaded to the QEMU image and executed on the image. The cause for failure is, the Command throwing error:
We observed that 3. Verified test executes successfully by copying librustc_driver-fb0866b1cd913c20.so to qemu image manually.We pushed the
The " Executed the test command on qemu image from host machine by setting other necessary environment variables.
The execution got passed without any errors. 4. Behaviour in rust-1.81.0 sources.In rust-1.81.0 sources testing the
|
See also #133629. |
A new feature "Link std statically in rustc_driver" was introduced in rust_1.82 [https://github.com/rust-lang/rust/pull/122362],and which is causing the below failure in oe-selftest. Running unittests src/main.rs (build/x86_64-unknown-linux-gnu/stage1-rustc/ x86_64-poky-linux-gnu/release/deps/rustc_main-92223b15c9f2d827) uploaded ".../build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-poky-linux-gnu/ release/deps/rustc_main-92223b15c9f2d827", waiting for result /tmp/work/test4056/rustc_main-92223b15c9f2d827: error while loading shared libraries: librustc_driver-fb0866b1cd913c20.so: cannot open shared object file: No such file or directory The rustc_main binary depends on the librustc_driver-*.so file. However, this file has not been copied to QEMU. If we manually copy the file into QEMU and export the LD_LIBRARY_PATH, the issue does not occur. Issue reprorted to upstream and reverted the buggy code as a workaround. Upstream-Status: Inappropriate [reported at rust-lang/rust#136237] (From OE-Core rev: 6b512bad4e40dd3bb45e6ba23350ad78800bd96b) Signed-off-by: Deepesh Varatharajan <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
A new feature "Link std statically in rustc_driver" was introduced in rust_1.82 [https://github.com/rust-lang/rust/pull/122362],and which is causing the below failure in oe-selftest. Running unittests src/main.rs (build/x86_64-unknown-linux-gnu/stage1-rustc/ x86_64-poky-linux-gnu/release/deps/rustc_main-92223b15c9f2d827) uploaded ".../build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-poky-linux-gnu/ release/deps/rustc_main-92223b15c9f2d827", waiting for result /tmp/work/test4056/rustc_main-92223b15c9f2d827: error while loading shared libraries: librustc_driver-fb0866b1cd913c20.so: cannot open shared object file: No such file or directory The rustc_main binary depends on the librustc_driver-*.so file. However, this file has not been copied to QEMU. If we manually copy the file into QEMU and export the LD_LIBRARY_PATH, the issue does not occur. Issue reprorted to upstream and reverted the buggy code as a workaround. Upstream-Status: Inappropriate [reported at rust-lang/rust#136237] Signed-off-by: Deepesh Varatharajan <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
A new feature "Link std statically in rustc_driver" was introduced in rust_1.82 [https://github.com/rust-lang/rust/pull/122362],and which is causing the below failure in oe-selftest. Running unittests src/main.rs (build/x86_64-unknown-linux-gnu/stage1-rustc/ x86_64-poky-linux-gnu/release/deps/rustc_main-92223b15c9f2d827) uploaded ".../build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-poky-linux-gnu/ release/deps/rustc_main-92223b15c9f2d827", waiting for result /tmp/work/test4056/rustc_main-92223b15c9f2d827: error while loading shared libraries: librustc_driver-fb0866b1cd913c20.so: cannot open shared object file: No such file or directory The rustc_main binary depends on the librustc_driver-*.so file. However, this file has not been copied to QEMU. If we manually copy the file into QEMU and export the LD_LIBRARY_PATH, the issue does not occur. Issue reprorted to upstream and reverted the buggy code as a workaround. Upstream-Status: Inappropriate [reported at rust-lang/rust#136237] (From OE-Core rev: 6b512bad4e40dd3bb45e6ba23350ad78800bd96b) Signed-off-by: Deepesh Varatharajan <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
A new feature "Link std statically in rustc_driver" was introduced in rust_1.82 [https://github.com/rust-lang/rust/pull/122362],and which is causing the below failure in oe-selftest. Running unittests src/main.rs (build/x86_64-unknown-linux-gnu/stage1-rustc/ x86_64-poky-linux-gnu/release/deps/rustc_main-92223b15c9f2d827) uploaded ".../build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-poky-linux-gnu/ release/deps/rustc_main-92223b15c9f2d827", waiting for result /tmp/work/test4056/rustc_main-92223b15c9f2d827: error while loading shared libraries: librustc_driver-fb0866b1cd913c20.so: cannot open shared object file: No such file or directory The rustc_main binary depends on the librustc_driver-*.so file. However, this file has not been copied to QEMU. If we manually copy the file into QEMU and export the LD_LIBRARY_PATH, the issue does not occur. Issue reprorted to upstream and reverted the buggy code as a workaround. Upstream-Status: Inappropriate [reported at rust-lang/rust#136237] (From OE-Core rev: 51c850f5355e8c53b6d1c8c66647bd8d7ff28e7d) Signed-off-by: Deepesh Varatharajan <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
A new feature "Link std statically in rustc_driver" was introduced in rust_1.82 [https://github.com/rust-lang/rust/pull/122362],and which is causing the below failure in oe-selftest. Running unittests src/main.rs (build/x86_64-unknown-linux-gnu/stage1-rustc/ x86_64-poky-linux-gnu/release/deps/rustc_main-92223b15c9f2d827) uploaded ".../build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-poky-linux-gnu/ release/deps/rustc_main-92223b15c9f2d827", waiting for result /tmp/work/test4056/rustc_main-92223b15c9f2d827: error while loading shared libraries: librustc_driver-fb0866b1cd913c20.so: cannot open shared object file: No such file or directory The rustc_main binary depends on the librustc_driver-*.so file. However, this file has not been copied to QEMU. If we manually copy the file into QEMU and export the LD_LIBRARY_PATH, the issue does not occur. Issue reprorted to upstream and reverted the buggy code as a workaround. Upstream-Status: Inappropriate [reported at rust-lang/rust#136237] Signed-off-by: Deepesh Varatharajan <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
A new feature "Link std statically in rustc_driver" was introduced in rust_1.82 [https://github.com/rust-lang/rust/pull/122362],and which is causing the below failure in oe-selftest. Running unittests src/main.rs (build/x86_64-unknown-linux-gnu/stage1-rustc/ x86_64-poky-linux-gnu/release/deps/rustc_main-92223b15c9f2d827) uploaded ".../build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-poky-linux-gnu/ release/deps/rustc_main-92223b15c9f2d827", waiting for result /tmp/work/test4056/rustc_main-92223b15c9f2d827: error while loading shared libraries: librustc_driver-fb0866b1cd913c20.so: cannot open shared object file: No such file or directory The rustc_main binary depends on the librustc_driver-*.so file. However, this file has not been copied to QEMU. If we manually copy the file into QEMU and export the LD_LIBRARY_PATH, the issue does not occur. Issue reprorted to upstream and reverted the buggy code as a workaround. Upstream-Status: Inappropriate [reported at rust-lang/rust#136237] (From OE-Core rev: 29f9157e7c90ca62d92f1532c0a8bff1bc490a91) Signed-off-by: Deepesh Varatharajan <[email protected]> Signed-off-by: Mathieu Dubois-Briand <[email protected]>
A new feature "Link std statically in rustc_driver" was introduced in rust_1.82 [https://github.com/rust-lang/rust/pull/122362],and which is causing the below failure in oe-selftest. Running unittests src/main.rs (build/x86_64-unknown-linux-gnu/stage1-rustc/ x86_64-poky-linux-gnu/release/deps/rustc_main-92223b15c9f2d827) uploaded ".../build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-poky-linux-gnu/ release/deps/rustc_main-92223b15c9f2d827", waiting for result /tmp/work/test4056/rustc_main-92223b15c9f2d827: error while loading shared libraries: librustc_driver-fb0866b1cd913c20.so: cannot open shared object file: No such file or directory The rustc_main binary depends on the librustc_driver-*.so file. However, this file has not been copied to QEMU. If we manually copy the file into QEMU and export the LD_LIBRARY_PATH, the issue does not occur. Issue reprorted to upstream and reverted the buggy code as a workaround. Upstream-Status: Inappropriate [reported at rust-lang/rust#136237] (From OE-Core rev: 51c850f5355e8c53b6d1c8c66647bd8d7ff28e7d) Signed-off-by: Deepesh Varatharajan <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
A new feature "Link std statically in rustc_driver" was introduced in rust_1.82 [https://github.com/rust-lang/rust/pull/122362],and which is causing the below failure in oe-selftest. Running unittests src/main.rs (build/x86_64-unknown-linux-gnu/stage1-rustc/ x86_64-poky-linux-gnu/release/deps/rustc_main-92223b15c9f2d827) uploaded ".../build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-poky-linux-gnu/ release/deps/rustc_main-92223b15c9f2d827", waiting for result /tmp/work/test4056/rustc_main-92223b15c9f2d827: error while loading shared libraries: librustc_driver-fb0866b1cd913c20.so: cannot open shared object file: No such file or directory The rustc_main binary depends on the librustc_driver-*.so file. However, this file has not been copied to QEMU. If we manually copy the file into QEMU and export the LD_LIBRARY_PATH, the issue does not occur. Issue reprorted to upstream and reverted the buggy code as a workaround. Upstream-Status: Inappropriate [reported at rust-lang/rust#136237] (From OE-Core rev: 51c850f5355e8c53b6d1c8c66647bd8d7ff28e7d) Signed-off-by: Deepesh Varatharajan <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
A new feature "Link std statically in rustc_driver" was introduced in rust_1.82 [https://github.com/rust-lang/rust/pull/122362],and which is causing the below failure in oe-selftest. Running unittests src/main.rs (build/x86_64-unknown-linux-gnu/stage1-rustc/ x86_64-poky-linux-gnu/release/deps/rustc_main-92223b15c9f2d827) uploaded ".../build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-poky-linux-gnu/ release/deps/rustc_main-92223b15c9f2d827", waiting for result /tmp/work/test4056/rustc_main-92223b15c9f2d827: error while loading shared libraries: librustc_driver-fb0866b1cd913c20.so: cannot open shared object file: No such file or directory The rustc_main binary depends on the librustc_driver-*.so file. However, this file has not been copied to QEMU. If we manually copy the file into QEMU and export the LD_LIBRARY_PATH, the issue does not occur. Issue reprorted to upstream and reverted the buggy code as a workaround. Upstream-Status: Inappropriate [reported at rust-lang/rust#136237] (From OE-Core rev: 06dec2b83da74506d682a3bc501196f9c90321f4) Signed-off-by: Deepesh Varatharajan <[email protected]> Signed-off-by: Mathieu Dubois-Briand <[email protected]>
A new feature "Link std statically in rustc_driver" was introduced in rust_1.82 [https://github.com/rust-lang/rust/pull/122362],and which is causing the below failure in oe-selftest. Running unittests src/main.rs (build/x86_64-unknown-linux-gnu/stage1-rustc/ x86_64-poky-linux-gnu/release/deps/rustc_main-92223b15c9f2d827) uploaded ".../build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-poky-linux-gnu/ release/deps/rustc_main-92223b15c9f2d827", waiting for result /tmp/work/test4056/rustc_main-92223b15c9f2d827: error while loading shared libraries: librustc_driver-fb0866b1cd913c20.so: cannot open shared object file: No such file or directory The rustc_main binary depends on the librustc_driver-*.so file. However, this file has not been copied to QEMU. If we manually copy the file into QEMU and export the LD_LIBRARY_PATH, the issue does not occur. Issue reprorted to upstream and reverted the buggy code as a workaround. Upstream-Status: Inappropriate [reported at rust-lang/rust#136237] (From OE-Core rev: 7ecfabbe2043ae5b9adceb60132530680e6182c7) Signed-off-by: Deepesh Varatharajan <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
A new feature "Link std statically in rustc_driver" was introduced in rust_1.82 [https://github.com/rust-lang/rust/pull/122362],and which is causing the below failure in oe-selftest. Running unittests src/main.rs (build/x86_64-unknown-linux-gnu/stage1-rustc/ x86_64-poky-linux-gnu/release/deps/rustc_main-92223b15c9f2d827) uploaded ".../build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-poky-linux-gnu/ release/deps/rustc_main-92223b15c9f2d827", waiting for result /tmp/work/test4056/rustc_main-92223b15c9f2d827: error while loading shared libraries: librustc_driver-fb0866b1cd913c20.so: cannot open shared object file: No such file or directory The rustc_main binary depends on the librustc_driver-*.so file. However, this file has not been copied to QEMU. If we manually copy the file into QEMU and export the LD_LIBRARY_PATH, the issue does not occur. Issue reprorted to upstream and reverted the buggy code as a workaround. Upstream-Status: Inappropriate [reported at rust-lang/rust#136237] Signed-off-by: Deepesh Varatharajan <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
A new feature "Link std statically in rustc_driver" was introduced in rust_1.82 [https://github.com/rust-lang/rust/pull/122362],and which is causing the below failure in oe-selftest. Running unittests src/main.rs (build/x86_64-unknown-linux-gnu/stage1-rustc/ x86_64-poky-linux-gnu/release/deps/rustc_main-92223b15c9f2d827) uploaded ".../build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-poky-linux-gnu/ release/deps/rustc_main-92223b15c9f2d827", waiting for result /tmp/work/test4056/rustc_main-92223b15c9f2d827: error while loading shared libraries: librustc_driver-fb0866b1cd913c20.so: cannot open shared object file: No such file or directory The rustc_main binary depends on the librustc_driver-*.so file. However, this file has not been copied to QEMU. If we manually copy the file into QEMU and export the LD_LIBRARY_PATH, the issue does not occur. Issue reprorted to upstream and reverted the buggy code as a workaround. Upstream-Status: Inappropriate [reported at rust-lang/rust#136237] (From OE-Core rev: 977bd1a10771a6588e596e1bbfd49e9af659aa4a) Signed-off-by: Deepesh Varatharajan <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
A new feature "Link std statically in rustc_driver" was introduced in rust_1.82 [https://github.com/rust-lang/rust/pull/122362],and which is causing the below failure in oe-selftest. Running unittests src/main.rs (build/x86_64-unknown-linux-gnu/stage1-rustc/ x86_64-poky-linux-gnu/release/deps/rustc_main-92223b15c9f2d827) uploaded ".../build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-poky-linux-gnu/ release/deps/rustc_main-92223b15c9f2d827", waiting for result /tmp/work/test4056/rustc_main-92223b15c9f2d827: error while loading shared libraries: librustc_driver-fb0866b1cd913c20.so: cannot open shared object file: No such file or directory The rustc_main binary depends on the librustc_driver-*.so file. However, this file has not been copied to QEMU. If we manually copy the file into QEMU and export the LD_LIBRARY_PATH, the issue does not occur. Issue reprorted to upstream and reverted the buggy code as a workaround. Upstream-Status: Inappropriate [reported at rust-lang/rust#136237] Signed-off-by: Deepesh Varatharajan <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
A new feature "Link std statically in rustc_driver" was introduced in rust_1.82 [https://github.com/rust-lang/rust/pull/122362],and which is causing the below failure in oe-selftest. Running unittests src/main.rs (build/x86_64-unknown-linux-gnu/stage1-rustc/ x86_64-poky-linux-gnu/release/deps/rustc_main-92223b15c9f2d827) uploaded ".../build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-poky-linux-gnu/ release/deps/rustc_main-92223b15c9f2d827", waiting for result /tmp/work/test4056/rustc_main-92223b15c9f2d827: error while loading shared libraries: librustc_driver-fb0866b1cd913c20.so: cannot open shared object file: No such file or directory The rustc_main binary depends on the librustc_driver-*.so file. However, this file has not been copied to QEMU. If we manually copy the file into QEMU and export the LD_LIBRARY_PATH, the issue does not occur. Issue reprorted to upstream and reverted the buggy code as a workaround. Upstream-Status: Inappropriate [reported at rust-lang/rust#136237] (From OE-Core rev: 977bd1a10771a6588e596e1bbfd49e9af659aa4a) Signed-off-by: Deepesh Varatharajan <Deepesh.Varatharajanwindriver.com> Signed-off-by: Richard Purdie <richard.purdielinuxfoundation.org>
In Yocto environment , we could see a test failure after upgrading to rust_1.82 . (May be because of the feature (#122362) )
After updating to rust 1.82 , we ran "python3 src/bootstrap/bootstrap.py test" . Then we came across the below failure . Can anyone point me out do we need to make any changes in poky sources to adapt this feature .
According to the above given error log, it seems like it cannot able to find the
librustc_driver.so
but I can able to findlibrustc_driver.so
file in the following build path where therustc_main-92223b15c9f2d827
is also present :rust_1.82/tmp/work/core2-64-poky-linux/rust/1.82.0/rustc-1.82.0-src/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-poky-linux-gnu/release/deps
I found the following files related to
librustc_driver
in that directory:However, I am unsure about the below path:
/tmp/work/test4056/rustc_main-92223b15c9f2d827
I'm not certain where this path is coming from, and whether it indicates that the system is trying to find the
librustc_driver*.so
file in the wrong location.CC: @bjorn3 @Zoxc
The text was updated successfully, but these errors were encountered: