Closed peperunas closed 2 years ago
Interesting - I think this is because the SDL2 builder tries to delete extraneous static libraries:
But libSDL2main.a is "special" because it doesn't have a corresponding .so, so I think we should always keep that one.
Yes, as of now I am using this:
SDL2 = pkgs.SDL2.overrideAttrs (old: {
postInstall = ''
moveToOutput lib/libSDL2main.a "$dev"
if [ "$dontDisableStatic" -eq "1" ]; then
rm $out/lib/*.la
else
rm $out/lib/*.a
fi
moveToOutput bin/sdl2-config "$dev"
cp $dev/lib/libSDL2main.a $out/lib/
'';
});
I encountered this issue as well when trying to package this Blake Stone source port, which explicitly tries to find libSDL2main.a
. Took me a while to figure out what was going on. @peperunas' fix does help, for now at least.
Describe the bug
It seems that
libSDL2
does not ship.a
files. Particularly, I am having issues with projects that look forlibSDL2main.a
.The issue persists even when SDL2 is used with
withStatic = true
.Steps To Reproduce
Steps to reproduce the behavior:
$out/lib
Additional context
This issue has been presented in multiple occasions, e.g. #98242 and #24984
Notify maintainers
@cpages
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.