-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
zfs 2.1.0 needlessly links in libatomic #12345
Labels
Type: Building
Indicates an issue related to building binaries
Type: Defect
Incorrect behavior (e.g. crash, hang)
Comments
Thanks for filing this, it does seem like we could be a bit smarter about this. cc: @nabijaczleweli |
nabijaczleweli
added a commit
to nabijaczleweli/zfs
that referenced
this issue
Jul 13, 2021
In absence of LTO, and dynamic libatomic, la.so ends up in the needs section of every toolchain executable; some consider this an issue Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes openzfs#12345
13 tasks
I mean, it's 31k, but I can see how that's an annoyance in absence of LTO; see #12359 |
Thanks, tested on top of 2.1.0 and can confirm it correctly detects that -latomic is not needed on my system, the resulting binaries are the same as when vanilla 2.1.0 is built in a chroot without libatomic. |
behlendorf
pushed a commit
to behlendorf/zfs
that referenced
this issue
Aug 23, 2021
In absence of LTO, and dynamic libatomic, la.so ends up in the needs section of every toolchain executable; some consider this an issue. Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes openzfs#12345 Closes openzfs#12359
behlendorf
pushed a commit
to behlendorf/zfs
that referenced
this issue
Aug 24, 2021
In absence of LTO, and dynamic libatomic, la.so ends up in the needs section of every toolchain executable; some consider this an issue. Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes openzfs#12345 Closes openzfs#12359
behlendorf
pushed a commit
to behlendorf/zfs
that referenced
this issue
Aug 24, 2021
In absence of LTO, and dynamic libatomic, la.so ends up in the needs section of every toolchain executable; some consider this an issue. Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes openzfs#12345 Closes openzfs#12359
behlendorf
pushed a commit
to behlendorf/zfs
that referenced
this issue
Aug 24, 2021
In absence of LTO, and dynamic libatomic, la.so ends up in the needs section of every toolchain executable; some consider this an issue. Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes openzfs#12345 Closes openzfs#12359
behlendorf
pushed a commit
that referenced
this issue
Aug 31, 2021
In absence of LTO, and dynamic libatomic, la.so ends up in the needs section of every toolchain executable; some consider this an issue. Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #12345 Closes #12359
tonyhutter
pushed a commit
to tonyhutter/zfs
that referenced
this issue
Sep 15, 2021
In absence of LTO, and dynamic libatomic, la.so ends up in the needs section of every toolchain executable; some consider this an issue. Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes openzfs#12345 Closes openzfs#12359
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Type: Building
Indicates an issue related to building binaries
Type: Defect
Incorrect behavior (e.g. crash, hang)
System information
Describe the problem you're observing
zpool fails to start unless libatomic.so is present.
Describe how to reproduce the problem
Install zfs 2.1.0.
Include any warning/errors/backtraces from the system logs
N/A
https://github.com/openzfs/zfs/blob/master/config/user-libatomic.m4#L14 claims:
It really does matter. When using zfs for the root partition, zfs needs to be installed on initramfs. initramfs should be small; it seems silly to force a shared library to be included there that is completely unused.
Workaround: build zfs in a chroot where libatomic.so is not available.
P.S.: The "C11 recommends to always link it" cannot be right, C11 does not acknowledge the existence of any libatomic library. I imagine it is intended to say something else, but I do not quite know what. It would be useful if this could be reworded.
The text was updated successfully, but these errors were encountered: