-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
qtkeychain: 0.7.0 -> 0.8.0, fix darwin build #36834
Conversation
++ stdenv.lib.optional stdenv.isDarwin [ | ||
# correctly detect the compiler | ||
# for details see cmake --help-policy CMP0025 | ||
"-DCMAKE_POLICY_DEFAULT_CMP0025=NEW" |
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.
Would it make sense to set this globally? I think this is the behavior we always want but it might not make a difference for most CMake projects.
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 think so. At the least setting CMAKE_POLICY_WARNING_CMP0025
would be helpful for identifying this issue in other packages.
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.
Thanks! See #37015 for the PR making this the default.
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.
So after doing this, we still occasionally get issues like in:
https://hydra.nixos.org/build/73579953/nixlog/1
Any ideas how to fix it?
@GrahamcOfBorg build qtkeychain |
Success on x86_64-darwin (full log) Attempted: qtkeychain Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: qtkeychain Partial log (click to expand)
|
|
||
stdenv.mkDerivation rec { | ||
name = "qtkeychain-${if withQt5 then "qt5" else "qt4"}-${version}"; | ||
version = "0.7.0"; |
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.
Hmm, is 0.7.0 and 0.8.0 the same revision?
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.
Right, the unchanged hash is a mistake, apparently.
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.
Thing is I tested both versions with --check
and neither gives a hash mismatch
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.
Yea I overlooked changing sha256
. I was seeing some odd behavior though: changing sha256
controlled the version build, regardless of the value of rev
, but it seems that a nix-collect-garbage
may work around this.
- set correct
rev
andsha256
(egv0.6.0
and0sbgy1vxabcnn1qi9dfxi6yd0gbbqfgx7sj0c381mp4xay9fxl21
) nix-build -A qtkeychain
(successfully builds)- built version is
0.6.0
(set(PACKAGE_VERSION "0.6.0")
inresult/lib/cmake/QtKeychain/QtKeychainConfigVersion.cmake
) - fudge the
rev
but keepsha256
(egrev -> v0.8.0
) nix-build -A qtkeychain
(successfully builds)- built version is still
0.6.0
I'll set the correct hash
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.
Fetches are hash-addressed ("fixed-output" in our terminology). If you have the specified hash in nix store, it will be used without any further checks.
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.
Ahhh :) I understand now, thanks!
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.
You can force a check with nix-build '<nixpkgs>' -A hello.src --check
for example.
Failure on aarch64-linux (full log) Attempted: qtkeychain Partial log (click to expand)
|
The darwin build was failing for two reasons 1) cmake incorrectly detected the compiler 2) missing Frameworks /cc ZHF NixOS#36454
@GrahamcOfBorg build qtkeychain |
btw, tomahawk (which depends on this) fails due to not finding qtkeychain 0.8.0, but it is abandoned (tomahawk-player/tomahawk@c838959). |
@GrahamcOfBorg build qtkeychain |
Success on x86_64-linux (full log) Attempted: qtkeychain Partial log (click to expand)
|
Failure on x86_64-darwin (full log) Attempted: qtkeychain Partial log (click to expand)
|
Failure on aarch64-linux (full log) Attempted: qtkeychain Partial log (click to expand)
|
This broke the build of |
Okay opened issue: #37746 |
The darwin build was failing for two reasons
/cc ZHF #36454
Also related to #35444
Motivation for this change
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
this passes on NixOS but there are (still) failures on Darwin./result/bin/
)