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
pythonPackages.kmsxx: fix build #38147
Conversation
@GrahamcOfBorg build kmsxx python27Packages.kmsxx python36Packages.kmsxx |
Success on aarch64-linux (full log) Attempted: kmsxx, python27Packages.kmsxx, python36Packages.kmsxx Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: kmsxx, python27Packages.kmsxx, python36Packages.kmsxx Partial log (click to expand)
|
Please override |
I did that |
Turns out you can override gcc from |
@GrahamcOfBorg build kmsxx python27Packages.kmsxx python36Packages.kmsxx |
Success on x86_64-linux (full log) Attempted: kmsxx, python27Packages.kmsxx, python36Packages.kmsxx Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: kmsxx, python27Packages.kmsxx, python36Packages.kmsxx Partial log (click to expand)
|
pkgs/top-level/python-packages.nix
Outdated
kmsxx = callPackage ../development/libraries/kmsxx { }; | ||
kmsxx = callPackage ../development/libraries/kmsxx { | ||
# overrideCC isn't defined here, let's do without it | ||
stdenv = stdenv.override { allowedRequisites = null; cc = pkgs.gcc6; }; |
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 use
stdenv = pkgs.overrideCC stdenv pkgs.gcc6;
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.
However, I think doing it similar to dlib expression would be a better approach:
dlib = buildPythonPackage rec {
inherit (pkgs.dlib) name src nativeBuildInputs meta;
buildInputs = pkgs.dlib.buildInputs ++ [ self.boost ];
checkInputs = with self; [ pytest ];
};
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.
Thank you. I tried your second suggestion but did not get it to work (the package is built using cmake, not setuptools), so let's go with your first suggestion instead.
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 came up with an even better solution: inherit (pkgs.kmsxx) stdenv;
.
And you should maybe add name = "${python.executable}-${pkgs.kmsxx.name}"
.
So we have
kmsxx = (callPackage ../development/libraries/kmsxx {
inherit (pkgs.kmsxx) stdenv;
}).overrideAttrs (oldAttrs: {
name = "${python.executable}-${pkgs.kmsxx.name}";
});
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.
Nice! Works fine, but I think we should use name = "${python.libPrefix}-${pkgs.kmsxx.name}"
, otherwise the python3 package will be called python3.6m-kmsxx...
gcc7 build fails with "internal compiler error", use gcc6 instead by inheriting stdenv from pkgs.kmsxx
@GrahamcOfBorg build python.pkgs.kmsxx python3.pkgs.kmsxx |
Success on x86_64-linux (full log) Attempted: python.pkgs.kmsxx, python3.pkgs.kmsxx Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: python.pkgs.kmsxx, python3.pkgs.kmsxx Partial log (click to expand)
|
Thanks a lot! |
Backported in df3a740. |
Motivation for this change
gcc7 build fails with "internal compiler error", use gcc6 instead.
(#37653 fixed this for the regular
kmsxx
package but not for the python packages which are built from the same expression. Not sure why we have both, looks kinda redundant, but let's fix it first.)/cc ZHF #36453
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)