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
SDL2: Keep .a files on dontDisableStatic
; don't move them to $dev; prune .la
#72736
Conversation
Relevant history of the
What the
|
|
ffe81da
to
f08b711
Compare
postInstall = '' | ||
moveToOutput lib/libSDL2main.a "$dev" |
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.
Shouldn't this file (and other .a) still be removed when dontDisableStatic is true? Otherwise we get .a files in the SDL closure.
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.
You are right.
It seems SDL2 does not quite respect --disable-static
; it still generates libSDL2main.a
and libSDL2_test.a
.
I've force-pushed an else
branch that deletes them.
It also generates libSDL2main.la
and libSDL2_test.la
which are prett useless given that the .a
files they mention are nonexistent. Should I delete them, or do we not care?
Also, with what comand can I rebuild everything that depends on SDL2, so that I can check if anything used the libSDL2main.a
that before was in the $dev
output?
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.
I don't see the 'else' branch to keep removing the .a libs. Your force push failed? Otherwise looks good to me
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.
Your force push failed?
Oops, you are right. Fixed now, sorry.
@GrahamcOfBorg eval |
@matthewbauer Good to go with the incorporated feedback? |
…prune .la. Most other packages don't move `.a` files to "$dev", and that is because it makes the pkg-config `.pc` file wrong (the `libdir` is the non-dev one). Keeping them in the main output makes static linking of SDL2 work. See added comment about pruning of `.la` files.
f08b711
to
57908c1
Compare
The ofborg build times out on building GCC 8 after 1 hour. |
Motivation for this change
Most other packages don't move
.a
files to"$dev"
, and that is becauseit makes the pkg-config
.pc
file wrong (thelibdir
is the non-dev one).Keeping them in the main output makes static linking of SDL2 work.
See added comment about pruning of
.la
files.Tested in nh2/static-haskell-nix#65.
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)Notify maintainers
cc @cpages
FYI @matthewbauer