Skip to content

[RFC] track which files linked which libs in rdep hook#58822

Draft
dexgs wants to merge 1 commit intovoid-linux:masterfrom
dexgs:track_linkers
Draft

[RFC] track which files linked which libs in rdep hook#58822
dexgs wants to merge 1 commit intovoid-linux:masterfrom
dexgs:track_linkers

Conversation

@dexgs
Copy link
Contributor

@dexgs dexgs commented Feb 5, 2026

I came across an issue where packaging a binary redistributable can fail if there are contained files which link shlibs not present in Void. This is very annoying to debug, especially since the generate-runtime-deps hook does know which files link which shlibs, it juts forgets by the time the error messages are generated.

My proposed solution is to keep track of which files depend on which shlibs, so this can be reported to the user and make resolving the issue described above easier.

This is not a complete implementation of this feature, but I want feedback before spending more time on it.

When I brought this up on IRC it was mentioned the extra error messaging should only show up when the user calls xbps-src with -v. It wasn't immediately obvious to me how best to implement this, so I left it out for now.
I also didn't give much thought to the changes to the error messages.

The substantive changes are to the parse_shlib_needed() function.

@dexgs dexgs marked this pull request as draft February 5, 2026 03:27
@dexgs
Copy link
Contributor Author

dexgs commented Feb 5, 2026

Here's an example of the output with this change:
image

I came across an issue where packaging a binary redistributable can fail
if there are contained files which link shlibs not present in Void. This
is very annoying to debug, especially since the generate-runtime-deps
hook *does* know which files link which shlibs, it juts forgets by the
time the error messages are generated.

My proposed solution is to keep track of which files depend on which
shlibs, so this can be reported to the user and make resolving the issue
described above easier.
@ahesford ahesford changed the title track which files linked which libs in rdep hook [RFC] track which files linked which libs in rdep hook Feb 5, 2026
@sgn
Copy link
Member

sgn commented Feb 6, 2026

Try with libreoffice to see how broken this is.

@dexgs
Copy link
Contributor Author

dexgs commented Feb 6, 2026

Try with libreoffice to see how broken this is.

@sgn Could you give me some more direction, like a snippet showing an error or such? Or maybe a package that's faster to build than libreoffice (I do not have a fast enough computer to build that in a reasonable amount of time).

If you are saying that the output is excessive for packages where shlibs are linked by many executables, I agree. I have this PR marked as a draft because I agree that this change is not currently acceptable.

I opened this because I would like to see something addressing the pain point I described in the original message, the current way that is displayed to the user is just a proof-of-concept.

If there is truly something specific to the libreoffice package that I need to see, let me know and I will try building it (it will take me a while).

@sgn
Copy link
Member

sgn commented Feb 6, 2026

It's not about errors (which I haven't tried). It's about the long list of linked by.

@dexgs
Copy link
Contributor Author

dexgs commented Feb 6, 2026

In terms of better implementations of the message output, I think it would be best if the additional message only appears when there is an error and additionally maybe only appears when xbps-src is run with -v.

I can try implementing that as well, if you would like. I opened this PR in its current state because I don't want to waste my time implementing a feature that will never be accepted.

If there is a more fundamental issue with this change besides the output, or there is another workaround to the problem it's addressing then this draft can be closed.

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

Successfully merging this pull request may close these issues.

2 participants