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

Undefined reference to SSL_get_peer_certificate at compile? #189

Open
LinuxRocks2000 opened this issue Jul 3, 2023 · 1 comment
Open

Comments

@LinuxRocks2000
Copy link

When compiling from source, cargo makes it to the linker step and fails with

error: linking with `cc` failed: exit status: 1
  |
  = note: "cc" "-m64" "/tmp/rustct2ZmZT/symbols.o" "/tmp/cargo-installxzRAzJ/release/deps/websocat-d0328a35f1228dd5.websocat.5a09a8ba-cgu.0.rcgu.o" "-Wl,--as-needed" "-L" "/tmp/cargo-installxzRAzJ/release/deps" "-L" "/home/awesome/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/home/awesome/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-7f2d6606c0ceff89.rlib" "-Wl,-Bdynamic" "-lssl" "-lcrypto" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-znoexecstack" "-L" "/home/awesome/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/tmp/cargo-installxzRAzJ/release/deps/websocat-d0328a35f1228dd5" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro,-znow" "-nodefaultlibs"
  = note: /usr/bin/ld: /tmp/cargo-installxzRAzJ/release/deps/websocat-d0328a35f1228dd5.websocat.5a09a8ba-cgu.0.rcgu.o: in function `<futures::future::and_then::AndThen<A,B,F> as futures::future::Future>::poll':
          websocat.5a09a8ba-cgu.0:(.text._ZN95_$LT$futures..future..and_then..AndThen$LT$A$C$B$C$F$GT$$u20$as$u20$futures..future..Future$GT$4poll17h161ec0507add728cE+0x17f): undefined reference to `SSL_get_peer_certificate'
          collect2: error: ld returned 1 exit status

Looks like a problem with bad native dependencies.

@vi
Copy link
Owner

vi commented Sep 17, 2023

What system are you building for? Have you tried cargo update?

Note that you can build Websocat without TLS support if needed.

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