-
-
Notifications
You must be signed in to change notification settings - Fork 15.3k
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
zstd: install static libraries to dev #90218
Conversation
Achieved by patching cmake "install()" directive to ensure that $dev/lib/cmake is generated with correct paths. If we don't want to build static libraries we should be setting ZSTD_BUILD_STATIC to OFF instead. Fixes: 7f76daa ('zstd: get rid of static libs if enableShared')
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 like the old way better. Everything expects libraries in lib, and this will lead to tons of unfortunate conditions downstream. I say just have separate builds, or have e.g. dev-static
and libs-static
so we have two drop-in replacements that can be used instead of the originals without downstream knowing.
|
Yes, I also think the explicit way seemed less problematic (generally). One stumbling point is that pkgconfig (and maybe other tools) can have just a single libdir. |
See the code comment:
I didn't investigate why... it seemed a little weird that the binary can't be linked against the dynamic library. |
Ah OK. Well hopefully we can patch to remove that restriction, eventually. Regardless of all this, one wants to test the build they're actually using, whatever that may be. |
Closing in favour of #91984 |
Achieved by patching cmake "install()" directive to ensure that
$dev/lib/cmake is generated with correct paths.
If we don't want to build static libraries we should be setting
ZSTD_BUILD_STATIC to OFF instead.
Fixes: 7f76daa ('zstd: get rid of static libs if enableShared')
Motivation for this change
Fixes some of the fallout from #78910
Things done
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)