Description of problem: test dynamic_lib::tests::test_loading_cosine from rust internal testsuite fails in aarch64 and ppc64le for rhel-7.5 and rhel-alt-7.5. The testcase runs successfully in other archs. Version-Release number of selected component (if applicable): rust-toolset-7-rust-1.24.0-1.el7 How reproducible: 100% Steps to Reproduce: 1. rpmbuild --rebuild rust-toolset-7-rust-1.24.0-1.el7.src.rpm Actual results: ... test dynamic_lib::tests::test_loading_cosine ... FAILED failures: ---- dynamic_lib::tests::test_loading_cosine stdout ---- > thread 'dynamic_lib::tests::test_loading_cosine' panicked at 'Could not load function cos: /root/rpmbuild/BUILD/rustc-1.24.0-src/build/powerpc64le-unknown-linux-gnu/stage1-rustc/powerpc64le-unknown-linux-gnu/release/deps/rustc_metadata-d7107d2994b77de0: undefined symbol: cos', librustc_metadata/dynamic_lib.rs:97:31 note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace. stack backtrace: 0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49 1: std::sys_common::backtrace::print at libstd/sys_common/backtrace.rs:68 at libstd/sys_common/backtrace.rs:57 2: std::panicking::default_hook::{{closure}} at libstd/panicking.rs:381 3: std::panicking::default_hook at libstd/panicking.rs:391 4: std::panicking::rust_panic_with_hook at libstd/panicking.rs:577 5: std::panicking::begin_panic at libstd/panicking.rs:538 6: std::panicking::begin_panic_fmt at libstd/panicking.rs:522 7: rustc_metadata::dynamic_lib::tests::test_loading_cosine at librustc_metadata/dynamic_lib.rs:97 failures: dynamic_lib::tests::test_loading_cosine test result: FAILED. 1 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out ...
The test is expecting that libm is already linked in the process, but for whatever reason it is not on those platforms. The code being tested has nothing to do with cosine per se - it just wants to do some dlsym lookup.
I have upstream PR 52760 to use a more reliable test symbol.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2018:3584