-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
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
SuperTuxKart: Replaced some bundled libraries with system ones #91421
Conversation
483ab02
to
e9e8d0a
Compare
Needs #91425, waiting for this PR to be merged. |
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.
cool job using system libraries instead. Could you check the reduction in closure size.
Also I've merged your other PR in case you wanna rebase.
include_directories("${PROJECT_SOURCE_DIR}/lib/bullet/src") | ||
|
||
# Find system ENet library or build it if missing | ||
-if((UNIX AND NOT APPLE) AND USE_SYSTEM_ENET AND NOT USE_IPV6) |
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.
why removing the check about USE_IPV6 ?
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.
libenet doesn't yet support ipv6 upstream lsalzman/enet#109.
So I either disable ipv6 or I use the bundled libenet (which has been fixed to support ipv6).
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.
ok but instead of patching, you could probably pass USE_IPV6=no https://notabug.org/Supertuxkart/stk-code/src/master/CMakeLists.txt#L32 ? also maybe we could keep using the bundled enet until the next release with ipv6 support otherwise the update removes feature.
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.
In terms of closuze size it's getting worse :
890.0M before against 898.2M now.
I don't really explain this. It doesn't seem to be static linking since all
libs are dynamically linked.
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.
maybe the system packages have a bigger closure because they are built with more options/stuff ?
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.
the difference is little and if one of the lib is reused, it becomes a gain (again :) ) so not an issue for 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.
Since the bundled libs are statically linked, this frees 2M on the final executable :
17M→15M
e9e8d0a
to
5477325
Compare
New rebasing : added WiiUse, removed CMakeLists.txt patch and added libenet to whitelist of bundled libs to keep. |
5477325
to
8ab9b84
Compare
cmakeFlags = [ | ||
"-DBUILD_RECORDER=OFF" # libopenglrecorder is not in nixpkgs | ||
"-DUSE_SYSTEM_ANGELSCRIPT=OFF" # doesn't work with 2.31.2 or 2.32.0 | ||
"-DCHECK_ASSETS=OFF" | ||
"-DUSE_SYSTEM_ENET=ON" |
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 we whitelist enet, then we don't use the system one
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.
Fixed
8ab9b84
to
b2b28fc
Compare
ran nixpkgs-review and... endud up to complete 2 laps with tux. thanks |
Motivation for this change
Was packaging WiiUse when noticed
that SuperTuxKart was conflicting with it. So I came with
this partially unbundled build. This should also reduce the package size a bit.
Things done
Replaced some bundled libs with system ones.
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)