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
uuid is missing uuid_clear when building with meson #2895
Comments
Can you see if the symbol actually exists in
It looks like that error message in the Meson build is looking for a builtin. It might be a problem with the check in |
Interesting! Your comment made me compare the output of different builds:
And then tried cryptsetup with meson w/o lto, and it starts missing a static popt library :)
edit: actually, strike the thing with static popt. Both lvm2 and cryptsetup will build successfully if we omit LTO for util-linux. |
Oh yeah, that's LTO. |
Autotools and meson w/ lto are the same link |
This had to happen 😀 Sorry! Let me try again:
|
Can you provide a full reproducer? |
Sure! :)
This triggers the problem for us. |
This works correctly for me with gcc 13.2.1 and ld 2.42.0 |
Is |
I'm struggling to see how LTO can legally optimize something out of a static library. |
We are currently still on |
I don't think that LTO is optimizing out the symbol, rather, maybe it's doing things that might break Meson's detection of the symbol? For those libraries built with the LTO option, can you try passing the LTO plugin to
|
Tried a newer toolchain (gcc 13.2.0, ld 2.42) and still encounter the same problem with cryptsetup. Again, disabling lto fixes building cryptsetup and lvm2. nm indeed seems to just have missed the plugin: https://sprunge.us/HErcei |
I'm able to reproduce it:
versions:
|
Upgrade to gcc (GCC) 14.0.1 and ld version 2.42.50.20240318 does not change anything. |
What happens if you add |
I'm not sure why, but I can't seem to reproduce this on Fedora 39, with Meson 1.3.2, although my readelf output for LTO indicates the same result.
Here's the steps to reproduce, assuming dependencies are already installed:
The check for
|
@jwillikers it seems like defining fat-lto is the missing bit here! Can confirm util-linux builds fine with |
Hi again,
last roadblocker for CRUX seems to be that the static libuuid is not built with
uuid_clear
(?).From cryptsetups meson configure statge:
meson-log.txt contains these informations:
Edit:
Further information: we use
-D static-cryptsetup=true
with cryptsetup, it builds fine if we set that to false.Edit 2:
It seems like a similar problem (?) exists with blkid (needed by static udev.a) and building a static lvm binary:
The text was updated successfully, but these errors were encountered: