Skip to content
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

lmdb: ship static library, too #52122

Merged
merged 1 commit into from
Dec 14, 2018

Conversation

thoughtpolice
Copy link
Member

@thoughtpolice thoughtpolice commented Dec 14, 2018

This is useful if you're using pkgs.pkgsMusl to build static libraries.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

This is useful if you're using pkgs.pkgsMusl to build static libraries.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
@thoughtpolice thoughtpolice self-assigned this Dec 14, 2018
@thoughtpolice
Copy link
Member Author

@GrahamcOfBorg build lmdb

@vcunat
Copy link
Member

vcunat commented Dec 14, 2018

Hmm, there's the usual dilemma – keeping *.a with *.so will not be very nice for closures of the so-users. Here it's only 100 KiB so it doesn't matter much, but perhaps we might devise some general strategy in time.


Moving to another output is nice, but I suspect it makes often problems due to some tools assuming there's only a single library directory for a given library, e.g. the linker. Well possibly that particular tool could be fixed.

I expect the best way ATM of dealing with this would be to use separately built derivations for static and dynamic libraries, so you also get separate *.pc and such, and getting always only access to the one of the two that you want – perhaps via a standardized parameter. There was some discussion here as well: #41935

@thoughtpolice thoughtpolice merged commit 004cb5a into NixOS:master Dec 14, 2018
@thoughtpolice thoughtpolice deleted the nixpkgs/static-lmdb branch December 14, 2018 23:41
@vcunat
Copy link
Member

vcunat commented Feb 11, 2020

@thoughtpolice: will this one work for your use case(s) instead? #79810

I did test pkgsStatic.lmdb looks good. (That has the advantage of being set up as fully static with musl.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants