-
Notifications
You must be signed in to change notification settings - Fork 34
undefined reference to 'fmaf' on Ubuntu 18.04 #133
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
Comments
Ok, this is solved by simply forcing the math lib to be used by configure:
|
I propose maybe then consider this a request to have this documented somewhere. |
So last week we had a new Rust release, 1.55. Might be that it changed how libm is used/linked? Might be interesting to force the use of Rust 1.54 with rustup to see if it fixes the problem. |
That seems likely to be related, yes! |
I can also reproduce on ubuntu 18.04. For my own memory: on a fresh Ubuntu install I also needed to install: I confirmed that running curl's configure from Sep 13 with rustls-ffi latest and Rust latest stable (1.56) gives the same error. Switching to Rust 1.54 fixes it. So it definitely is linked to the Rust release. The function mentioned, It was removed from master 14 days ago: rust-lang/rust#86269. So within a few releases, it should be gone and the requirement for I'm still a little confused about why this manifests for curl's configure script, but not rustls-ffi's |
Thinking about this some more, I'd like to find a way to insulate rustls-ffi users from this sort of requirement. rustls-ffi doesn't use symbols from libm, and it doesn't use any of the stdlib functions that rely on libm. Similarly, rustls-ffi doesn't actually rely on libpthread or libdl- but linking against rustls-ffi seems to require those, because the Rust stdlib depends on them. Speculating aloud: Is there a way to build librustls.a such that these unreachable symbols are not needed when it gets linked into a user's program? I think I need to learn more about linking. |
Fixed in #213. It turns out rustc has a flag that will list out all needed flags for linking against a static library that it generates. There are more than I thought! |
See rustls/rustls-ffi#133 for discussion about it. Only 1.55, 1.56 and 1.57 should be affected. Tested with 1.56.1 on Linux pop-os 5.15.5 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1896278 13f79535-47bb-0310-9956-ffa450edef68
*) mod_tls: Fix a linkage issue with rustls when compiled with rust 1.55, 1.56 or 1.57. This prevents the loading of the module because of an undefined symbol: fmaf See rustls/rustls-ffi#133 [Christophe Jaillet] git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1898077 13f79535-47bb-0310-9956-ffa450edef68
The CI builds that verify curl+rustls has started to fail on Ubuntu 18.04 and I can reproduce in a manual build as well on Ubuntu 18.04.I'm not sure exactly when this problem started but it feels like within the last few weeks. (I've tried work-arounds to get it working again in curl/curl#7701 but so far it has failed)
This reproduces on master as well as v0.7.1 and v0.7.2.
It does not reproduce on my Debian Linux unstable.
The steps to reproduce:
That configure script tries use the function
rustls_connection_read
when linking with crustls.a - but fails since it lacks the symbolsfmaf
andfma
. Here's a piece of the resulting config.log:The text was updated successfully, but these errors were encountered: