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

OpenSSL? linking error on build #117

Closed
ekzhang opened this issue Feb 6, 2025 · 4 comments · Fixed by #118
Closed

OpenSSL? linking error on build #117

ekzhang opened this issue Feb 6, 2025 · 4 comments · Fixed by #118

Comments

@ekzhang
Copy link
Owner

ekzhang commented Feb 6, 2025

Started yesterday in CI. I didn't change anything so it's probably some weird issue with the Docker base images getting rebuilt.

#17 70.51 error: linking with `cc` failed: exit status: 1
#17 70.51   |
#17 70.51   = note: LC_ALL="C" PATH="/usr/local/rustup/toolchains/1.84.1-x86_64-unknown-linux-musl/lib/rustlib/x86_64-unknown-linux-musl/bin:/usr/local/rustup/toolchains/1.84.1-x86_64-unknown-linux-musl/lib/rustlib/x86_64-unknown-linux-musl/bin/self-contained:/usr/local/cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" VSLANG="1033" "cc" "-m64" "/usr/local/rustup/toolchains/1.84.1-x86_64-unknown-linux-musl/lib/rustlib/x86_64-unknown-linux-musl/lib/self-contained/rcrt1.o" "/usr/local/rustup/toolchains/1.84.1-x86_64-unknown-linux-musl/lib/rustlib/x86_64-unknown-linux-musl/lib/self-contained/crti.o" "/usr/local/rustup/toolchains/1.84.1-x86_64-unknown-linux-musl/lib/rustlib/x86_64-unknown-linux-musl/lib/self-contained/crtbeginS.o" "/tmp/rustcNFPL6K/symbols.o" "/home/rust/src/target/release/deps/sshx_server-c1b47f9e017b4dac.sshx_server.4129b68be2c53c7b-cgu.00.rcgu.o" "/home/rust/src/target/release/deps/sshx_server-c1b47f9e017b4dac.sshx_server.4129b68be2c53c7b-cgu.01.rcgu.o" "/home/rust/src/ta
#17 70.51   = note: /usr/lib/gcc/x86_64-alpine-linux-musl/14.2.0/../../../../x86_64-alpine-linux-musl/bin/ld: /home/rust/src/target/release/deps/libring-6061a9f9d1be1d12.rlib(ring-6061a9f9d1be1d12.ring.fafbc534f817f71-cgu.07.rcgu.o): in function `ring::ec::suite_b::ops::p384::p384_elem_inv_squared':
#17 70.51           ring.fafbc534f817f71-cgu.07:(.text._ZN4ring2ec7suite_b3ops4p38421p384_elem_inv_squared17h9494c68d7b0da7d6E+0x2b): undefined reference to `GFp_p384_elem_mul_mont'
#17 70.51           /usr/lib/gcc/x86_64-alpine-linux-musl/14.2.0/../../../../x86_64-alpine-linux-musl/bin/ld: /home/rust/src/target/release/deps/libring-6061a9f9d1be1d12.rlib(ring-6061a9f9d1be1d12.ring.fafbc534f817f71-cgu.07.rcgu.o): in function `ring::ec::suite_b::ops::p384::p384_point_mul_base_impl':
#17 70.51           ring.fafbc534f817f71-cgu.07:(.text._ZN4ring2ec7suite_b3ops4p38424p384_point_mul_base_impl17ha739fb56d997a38cE+0x55): undefined reference to `GFp_nistz384_point_mul'
#17 70.51           /usr/lib/gcc/x86_64-alpine-linux-musl/14.2.0/../../../../x86_64-alpine-linux-musl/bin/ld: /home/rust/src/target/release/deps/libring-6061a9f9d1be1d12.rlib(ring-6061a9f9d1be1d12.ring.fafbc534f817f71-cgu.07.rcgu.o): in function `ring::ec::suite_b::ops::p384::p384_scalar_inv_to_mont':
#17 70.51           ring.fafbc534f817f71-cgu.07:(.text._ZN4ring2ec7suite_b3ops4p38423p384_scalar_inv_to_mont17hc702fa2311783921E+0x54): undefined reference to `GFp_p384_scalar_mul_mont'
#17 70.51           /usr/lib/gcc/x86_64-alpine-linux-musl/14.2.0/../../../../x86_64-alpine-linux-musl/bin/ld: ring.fafbc534f817f71-cgu.07:(.text._ZN4ring2ec7suite_b3ops4p38423p384_scalar_inv_to_mont17hc702fa2311783921E+0xa24): undefined reference to `GFp_p384_scalar_mul_mont'
#17 70.51           /usr/lib/gcc/x86_64-alpine-linux-musl/14.2.0/../../../../x86_64-alpine-linux-musl/bin/ld: /home/rust/src/target/release/deps/libring-6061a9f9d1be1d12.rlib(ring-6061a9f9d1be1d12.ring.fafbc534f817f71-cgu.07.rcgu.o): in function `ring::ec::suite_b::ops::p384::GFp_p384_elem_sqr_mont':
#17 70.51           ring.fafbc534f817f71-cgu.07:(.text._ZN4ring2ec7suite_b3ops4p38422GFp_p384_elem_sqr_mont17hf75c7accd1f88d8dE+0x5): undefined reference to `GFp_p384_elem_mul_mont'
#17 70.51           /usr/lib/gcc/x86_64-alpine-linux-musl/14.2.0/../../../../x86_64-alpine-linux-musl/bin/ld: /home/rust/src/target/release/deps/libring-6061a9f9d1be1d12.rlib(ring-6061a9f9d1be1d12.ring.fafbc534f817f71-cgu.07.rcgu.o):(.data.rel.ro._ZN4ring2ec7suite_b3ops4p38410COMMON_OPS17hdfb3188c14e5f3f5E+0x0): undefined reference to `GFp_p384_elem_add'
#17 70.51           /usr/lib/gcc/x86_64-alpine-linux-musl/14.2.0/../../../../x86_64-alpine-linux-musl/bin/ld: /home/rust/src/target/release/deps/libring-6061a9f9d1be1d12.rlib(ring-6061a9f9d1be1d12.ring.fafbc534f817f71-cgu.07.rcgu.o):(.data.rel.ro._ZN4ring2ec7suite_b3ops4p38410COMMON_OPS17hdfb3188c14e5f3f5E+0x8): undefined reference to `GFp_p384_elem_mul_mont'
#17 70.51           /usr/lib/gcc/x86_64-alpine-linux-musl/14.2.0/../../../../x86_64-alpine-linux-musl/bin/ld: /home/rust/src/target/release/deps/libring-6061a9f9d1be1d12.rlib(ring-6061a9f9d1be1d12.ring.fafbc534f817f71-cgu.07.rcgu.o):(.data.rel.ro._ZN4ring2ec7suite_b3ops4p38410COMMON_OPS17hdfb3188c14e5f3f5E+0x18): undefined reference to `GFp_nistz384_point_add'
#17 70.51           /usr/lib/gcc/x86_64-alpine-linux-musl/14.2.0/../../../../x86_64-alpine-linux-musl/bin/ld: /home/rust/src/target/release/deps/libring-6061a9f9d1be1d12.rlib(ring-6061a9f9d1be1d12.ring.fafbc534f817f71-cgu.07.rcgu.o):(.data.rel.ro._ZN4ring2ec7suite_b3ops4p38415PRIVATE_KEY_OPS17ha468966b7e49417cE+0x18): undefined reference to `GFp_nistz384_point_mul'
#17 70.51           /usr/lib/gcc/x86_64-alpine-linux-musl/14.2.0/../../../../x86_64-alpine-linux-musl/bin/ld: /home/rust/src/target/release/deps/libring-6061a9f9d1be1d12.rlib(ring-6061a9f9d1be1d12.ring.fafbc534f817f71-cgu.07.rcgu.o):(.data.rel.ro._ZN4ring2ec7suite_b3ops4p38410SCALAR_OPS17h79951cdcd4941be5E+0x10): undefined reference to `GFp_p384_scalar_mul_mont'
#17 70.51           collect2: error: ld returned 1 exit status
#17 70.51           
#17 70.51   = note: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path specified
#17 70.51   = note: use the `-l` flag to specify native libraries to link
#17 70.51   = note: use the `cargo:rustc-link-lib` directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#rustc-link-lib)
#17 70.51 
#17 70.60 error: could not compile `sshx-server` (bin "sshx-server") due to 1 previous error
#17 ERROR: process "/bin/sh -c cargo build --release --bin sshx-server &&     cp target/release/sshx-server /usr/local/bin" did not complete successfully: exit code: 101
@ekzhang
Copy link
Owner Author

ekzhang commented Feb 6, 2025

If someone wants to help fix this you're doing God's work 🙏

@ekzhang
Copy link
Owner Author

ekzhang commented Feb 6, 2025

Found this issue: briansmith/ring#1444

@briansmith
Copy link

In your Cargo.lock, you can see there are two versions of ring: Ancient 0.16.20, and newer 0.17.8. Try to figure out how to update your intermediate dependencies so that none of the ones that depend on 0.16.20 needed any more. This should cause 0.16.20 to drop out of your build. And then it will probably work.

(GFp_* symbols are from ring 0.16.x, which isn't supported any more.)

@ekzhang
Copy link
Owner Author

ekzhang commented Feb 6, 2025

Wow thanks so much!

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

Successfully merging a pull request may close this issue.

2 participants