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

cyrus-sasl: Remove private libs from .la files (fixes spice build) #51651

Merged
merged 3 commits into from Dec 8, 2018

Conversation

@hedning
Copy link
Contributor

hedning commented Dec 7, 2018

Motivation for this change

Version 2.1.27 added the private libs to a bunch of .la files, which in turn
broke spice's build, #51444 (comment)

A cleaner approach would be to just remove the .la files, but I'm unsure if
that will break anything else.

cc #51444

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • 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 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.

@hedning

This comment has been minimized.

Copy link
Contributor Author

hedning commented Dec 7, 2018

@GrahamcOfBorg build spice

@hedning

This comment has been minimized.

Copy link
Contributor Author

hedning commented Dec 7, 2018

@GrahamcOfBorg build cyrus_sasl

pkgs/development/libraries/cyrus-sasl/default.nix Outdated
@@ -44,6 +39,7 @@ stdenv.mkDerivation rec {
postInstall = ''
for f in $out/lib/*.la $out/lib/sasl2/*.la; do
substituteInPlace $f --replace "${openssl.dev}/lib" "${openssl.out}/lib"
sed -i $f -e 's,-lresolv\|-lgssapi_krb5\|-lkrb5\|-lk5crypto\|-lcom_err,,g'

This comment has been minimized.

Copy link
@Mic92

Mic92 Dec 7, 2018

Contributor

Why do you remove libresolv?

This comment has been minimized.

Copy link
@Mic92

Mic92 Dec 7, 2018

Contributor

And what is libcom_err?

This comment has been minimized.

Copy link
@hedning

hedning Dec 7, 2018

Author Contributor

Took it form the libsasl2.pc, where they're all listed as private libraries. Might be wrong though.

This comment has been minimized.

Copy link
@hedning

hedning Dec 7, 2018

Author Contributor

They're all added to the .la files, without the necessary -L flags.

This comment has been minimized.

Copy link
@Mic92

Mic92 Dec 7, 2018

Contributor

It comes from here:

https://github.com/cyrusimap/cyrus-sasl/blob/master/m4/sasl2.m4#L121

I would say there are two options: Either put kerberos in propagatedBuildInputs or disable kerberos for cyrus-sasl (maybe enabling via flags would work too).

This comment has been minimized.

Copy link
@Mic92

Mic92 Dec 7, 2018

Contributor

I am surprised though that you can just drop the libraries without having any missing symbols during linking.

This comment has been minimized.

Copy link
@hedning

hedning Dec 7, 2018

Author Contributor

I'm fine with either alternative, though I'm not using this derivation myself, so cc @eburimu who did the upgrade to 2.1.27.

I guess downgrading is also an option, the release is very fresh while the previous release is many years old.

This comment has been minimized.

Copy link
@pbogdan

pbogdan Dec 8, 2018

Member

Just wanted to mention that the commit that added pruneLibtoolFiles setup hook has some very useful notes on how to handle .la files - fd97db4

This comment has been minimized.

Copy link
@Mic92

Mic92 Dec 8, 2018

Contributor

Ok. So adding pruneLibtoolFiles should be safe in our case. The derivation only contains shared libraries.

hedning and others added 2 commits Dec 7, 2018
Version 2.1.27 adds `-lkrb5` etc. to `dependency_libs` in all the .la files,
which in turn breaks spice's build. Prune .la's dependency_libs with
pruneLibtoolFiles.
@hedning hedning force-pushed the hedning:fix-spice branch to f929439 Dec 8, 2018
@hedning

This comment has been minimized.

Copy link
Contributor Author

hedning commented Dec 8, 2018

Switched to pruneLibtoolFiles. Opted to keep the existing openssl modifications in postInstall, though it's most likely unnecessary.

since pruneLibtoolFiles is used openssl is no longer referenced
@Mic92

This comment has been minimized.

Copy link
Contributor

Mic92 commented Dec 8, 2018

It is unnecessary, I checked it.

@Mic92 Mic92 merged commit 7d216be into NixOS:staging-next Dec 8, 2018
1 check was pending
1 check was pending
grahamcofborg-eval Checking original out paths
Details
pbogdan added a commit to pbogdan/nixpkgs that referenced this pull request Dec 9, 2018
@hedning hedning mentioned this pull request Dec 9, 2018
3 of 10 tasks complete
Mic92 added a commit that referenced this pull request Dec 9, 2018
cyrus_sasl: merge PR #51651 into master
@hedning hedning deleted the hedning:fix-spice branch Oct 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.