-
-
Notifications
You must be signed in to change notification settings - Fork 57
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
target: Use the correct libdir when run in flatpak #386
Open
alatiera
wants to merge
1
commit into
lu-zero:master
Choose a base branch
from
alatiera:alatiera/flatpak-libdir
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
an even more correct solution would be parsing this file and using the
LD_LIBRARY_PATH=
key from it, but as is should be fine as well for building apps.(There is an edge case for building runtimes with flatpak-builder where they would want
/usr/lib64
in that case, but we could do that if the need arises imo)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.
Is meson also doing this? (I'm all for consistency)
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.
Also, I wonder if when building flatpak you wouldn't have already a standardized way to pass the libdir you'd expect?
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.
Not yet, with meson flatpak passes the --libdir explicitly (though I was thinking of adding a similar codepath in meson just to make sure), this popped up in an app issue which was calling cargo-c by hand.
For buildsystems that flatpak-builder knows about, meson, autotools etc, it does call them with
--prefix/--libdir/...
explicitly, however when you need to do something custom like random bash commands or scripts, which is how applications usually install the rust gtk gstreamer plugin, it has to be done by hand and it broke the other day.Nothing earth shuttering, but we could avoid having to specify the libdir.
Additionally
LD_LIBRARY_PATH
is exported and set in the build sandbox, but contains the same value as the flatpak-info file. Now the info file is guaranteed to always be there, but I am not so sure about the env var. If the variable is also guaranteed it's probably better to check for that when in flatpak, as someone might try to overwrite it (even though they should avoid doing that). Let me get back to you on that.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.
If you could add support for cargo-c so that --libdir lib or --libdir lib64 is passed we'd have less special case in the codebase.