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

pjsip: split outputs to reduce closure #94560

Closed
wants to merge 1 commit into from

Conversation

doronbehar
Copy link
Contributor

@doronbehar doronbehar commented Aug 2, 2020

Motivation for this change

I noticed there are a lot of references in current pjsip to gcc-unwrapped. This is understandable as dontPatchElf is set and there are samples at /share/pjsip/samples that don't get stripped because they are not in stripDebugList (see https://nixos.org/nixpkgs/manual/#ssec-fixup-phase). Hence I think it'd be best to just split the outputs. I've confirmed that compiling a certain different package with pjsip as a library works, and that the binary pjsip seems to function fine as well.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • 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 nixpkgs-review --run "nixpkgs-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)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@danieldk
Copy link
Contributor

danieldk commented Aug 3, 2020

Does it matter in this case? It seems that pjsip is compiled as a static library (why?) and that therefore packages that use pjsip as a library dependency do not have pjsip in their closure:

$ nix-store -qR mumsi | grep pjsip
$

@doronbehar
Copy link
Contributor Author

pjsip is compiled as a static library (why?)

Hmm, I guess the reason is due to their autoconf defaults. While wondering whether it'll benefit us to --enable-shared and --disable-static (along with splitting the outputs) I noticed it always builds the static libraries - meaning it'll be best to leave things as are. Thanks @danieldk .

@doronbehar doronbehar closed this Aug 3, 2020
@doronbehar doronbehar deleted the pkg/pjsip/split-outputs branch August 3, 2020 11:27
@danieldk
Copy link
Contributor

danieldk commented Aug 3, 2020

If it works and also for downstream dependencies, I think dynamic linking should be preferred. The more reuse the better and the dependencies are explicit.

@doronbehar
Copy link
Contributor Author

Yea I was thinking the same thing, but it seems impossible to disable the creation of static libraries. Building the shared libraries only increases the closure, and the static libraries are still left in ${pjsip}/lib/.

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.

None yet

2 participants