-
-
Notifications
You must be signed in to change notification settings - Fork 14.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
[WIP] Set absolute sonames #45105
[WIP] Set absolute sonames #45105
Conversation
@@ -0,0 +1,8 @@ | |||
[[ -z "$noAbsoluteSoname" ]] && fixupOutputHooks+=(_doAbsoluteSoname) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add this option also in doc/stdenv.xml?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
This should also only run on linux, I just realised. Not sure how exactly to do this though — it should probably be in |
How close does this get us to being able to remove the --rpath stuff from cc-wrapper? |
Not much at all. This change doesn't affect dlopen.
|
I suppose we will uncover bugs, where we implicitly covered dlopen with our rpath? In any case we would also be closer to the macOS port so we have the same behavior on both platforms, which is a good thing. |
I presume this breaks IIRC at some point I tried a similar thing which instead of making the But, that solution breaks |
When a library was found in the dependency closure and its soname is replaced by an absolute path in the binary, why would we still need LD_LIBRARY_PATH for the same library? |
We can still use LD_PRELOAD when necessary. |
Fixed the GitHub UI. |
This seems to rebase pretty easily, but may need to be updated for non-conflict reasons such as marking other gcc versions Sure would be great to have this, it's silly for nix to know precisely what libraries to use but every program does a (depending on how you count, n^2) search to rediscover this information. Anyway I probably don't need to argue for this to the folks on this PR already anyway haha but just a reminder :D. |
I'm interested in getting this further. What is the current status? From what I understand it needs to be rebased and there is a problem with the initrd build. Libraries that may need to be overridden (e.g. |
@ambrop72 I've started to think that this isn't actually a good approach, and patching the |
Thank you for your contributions.
|
@lheckemann do you still plan to finish this? |
I definitely still want this to happen — if nobody else beats me to it, I'll have a look at reworking this to patch DT_NEEDED entries At Some Point™. |
Would love to see us putting absolute paths into `DT_NEEDED`, that looks
like the cleanest solution to me.
…On Tue, Jun 2, 2020 at 12:15 PM Linus Heckemann ***@***.***> wrote:
I definitely still want this to happen — if nobody else beats me to it,
I'll have a look at reworking this to patch DT_NEEDED entries At Some
Point™.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#45105 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAYB5ZULC7EZIKZKFVSH5VDRUTGKLANCNFSM4FP5XAXQ>
.
|
I marked this as stale due to inactivity. → More info |
NixOS/patchelf#357 implements setting absolute NEEDED entries, and seems to be quite promising. |
Motivation for this change
#24844
Most stuff I've tried building with this works. However, nixos won't build with this yet because the extra-tools initrd stuff doesn't build successfully. I'm getting the… interesting error message
when it tries to test the udevadm in extra-utils. Help would be appreciated!
Also, thanks very much to @grahamc for having made the aarch64 community builder available. It's been invaluable for testing this, what with all the gcc rebuilds!
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)