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
Conversation
@GrahamcOfBorg build spice |
@GrahamcOfBorg build cyrus_sasl |
@@ -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' |
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 do you remove libresolv?
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.
And what is libcom_err
?
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.
Took it form the libsasl2.pc, where they're all listed as private libraries. Might be wrong though.
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.
They're all added to the .la files, without the necessary -L flags.
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.
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).
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 am surprised though that you can just drop the libraries without having any missing symbols during linking.
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'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.
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.
Just wanted to mention that the commit that added pruneLibtoolFiles
setup hook has some very useful notes on how to handle .la
files - fd97db4
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. So adding pruneLibtoolFiles
should be safe in our case. The derivation only contains shared libraries.
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.
Switched to |
since pruneLibtoolFiles is used openssl is no longer referenced
It is unnecessary, I checked it. |
cyrus_sasl: merge PR #51651 into master
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
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)