Open JeffersonBledsoe opened 1 week ago
First of all, welcome to the Nix world. To be really accurate, what you are experiencing is an evaluation error, and not a build error. The Nix expressions Nixpkgs defines do not allow Nix to even try building the attribute python312Packages.tensorflow-bin
.
Now to the subject, on the community's Darwin builder, I tried to:
nix build -Lf. python312Packages.tensorflow-bin
And got a different error:
error:
_ while evaluating the attribute 'drvPath'
at /Users/doronbehar/nixpkgs/lib/customisation.nix:365:7:
364| in commonAttrs // {
365| drvPath = assert condition; drv.drvPath;
| ^
366| outPath = assert condition; drv.outPath;
_ while evaluating the attribute 'drvPath'
at /Users/doronbehar/nixpkgs/lib/customisation.nix:365:7:
364| in commonAttrs // {
365| drvPath = assert condition; drv.drvPath;
| ^
366| outPath = assert condition; drv.outPath;
_ while calling the 'derivationStrict' builtin
at <nix/derivation-internal.nix>:34:12:
33|
34| strict = derivationStrict drvAttrs;
| ^
35|
(stack trace truncated; use '--show-trace' to show the full, detailed trace)
error: Package _python3.12-jaraco-path-3.7.1_ in /Users/doronbehar/nixpkgs/pkgs/development/python-modules/jaraco-path/default.nix:30 is marked as broken, refusing to evaluate.
a) To temporarily allow broken packages, you can use an environment variable
for a single invocation of the nix tools.
$ export NIXPKGS_ALLOW_BROKEN=1
Note: When using `nix shell`, `nix build`, `nix develop`, etc with a flake,
then pass `--impure` in order to allow use of environment variables.
b) For `nixos-rebuild` you can set
{ nixpkgs.config.allowBroken = true; }
in configuration.nix to override this.
c) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
{ allowBroken = true; }
to ~/.config/nixpkgs/config.nix.
And on a Linux machine I ran:
nix why-depends --all --derivation --precise .\#python312Packages.{tensorflow-bin,jaraco-path}
And got:
/nix/store/i8m9a892if52493vpfmardz1wplwv2jl-python3.12-tensorflow-2.18.0.drv
└───/: ….2.0.drv",["out"]),("/nix/store/l3pglkx17nrqy1qqpr0jpxlb2c4hx5s2-python3.12-distutils-75.1.0.drv…
→ /nix/store/l3pglkx17nrqy1qqpr0jpxlb2c4hx5s2-python3.12-distutils-75.1.0.drv
└───/: …14.0.drv",["out"]),("/nix/store/c2g8dw12zqb8jlxwmf41h2p0gd7ry879-python3.12-jaraco-path-3.7.1.dr…
→ /nix/store/c2g8dw12zqb8jlxwmf41h2p0gd7ry879-python3.12-jaraco-path-3.7.1.drv
Let's ask what @dotlambda thinks about it, they already perform alot of changes in #354627 .
What's the problem with that dependency graph? EDIT: Oh, I see. I can look into jaraco-path on Darwin before the aforementioned PR is merged.
on the community's Darwin builder
You don't even need a Darwin machine to find eval errors.
on the community's Darwin builder
You don't even need a Darwin machine to find eval errors.
Hmm nice, are you talking about using Hydra's eval errors?
Hmm nice, are you talking about using Hydra's eval errors?
No, you can just run nix build --system x86_64-darwin
on any machine. nix-instantiate
also does the trick.
Hmm nice, are you talking about using Hydra's eval errors?
No, you can just run
nix build --system x86_64-darwin
on any machine.nix-instantiate
also does the trick.
Hmm are you sure? First of all, there are no docs for that in nix build --help
, 2ndly:
nix build --system x86_64-darwin -Lf. python312Packages.tensorflow-bin
Doesn't return me that eval error with jaraco-path
, but rather:
error:
… while evaluating the attribute 'drvPath'
at /home/doron/repos/nixpkgs/lib/customisation.nix:365:7:
364| in commonAttrs // {
365| drvPath = assert condition; drv.drvPath;
| ^
366| outPath = assert condition; drv.outPath;
… while evaluating the attribute 'drvPath'
at /home/doron/repos/nixpkgs/lib/customisation.nix:365:7:
364| in commonAttrs // {
365| drvPath = assert condition; drv.drvPath;
| ^
366| outPath = assert condition; drv.outPath;
… in the condition of the assert statement
at /home/doron/repos/nixpkgs/lib/customisation.nix:365:17:
364| in commonAttrs // {
365| drvPath = assert condition; drv.drvPath;
| ^
366| outPath = assert condition; drv.outPath;
(stack trace truncated; use '--show-trace' to show the full, detailed trace)
error: Package ‘python3.12-tensorflow-2.18.0’ in /home/doron/repos/nixpkgs/pkgs/development/python-modules/tensorflow/bin.nix:227 is not available on the requested hostPlatform:
hostPlatform.config = "x86_64-apple-darwin"
package.meta.platforms = [
"aarch64-linux"
"armv5tel-linux"
"armv6l-linux"
"armv7a-linux"
"armv7l-linux"
"i686-linux"
"loongarch64-linux"
"m68k-linux"
"microblaze-linux"
"microblazeel-linux"
"mips-linux"
"mips64-linux"
"mips64el-linux"
"mipsel-linux"
"powerpc64-linux"
"powerpc64le-linux"
"riscv32-linux"
"riscv64-linux"
"s390-linux"
"s390x-linux"
"x86_64-linux"
"x86_64-darwin"
"i686-darwin"
"aarch64-darwin"
"armv7a-darwin"
"i686-cygwin"
"x86_64-cygwin"
"aarch64-windows"
"x86_64-windows"
"i686-windows"
"i686-freebsd"
"x86_64-freebsd"
]
package.meta.badPlatforms = [
"x86_64-darwin"
]
, refusing to evaluate.
a) To temporarily allow packages that are unsupported for this system, you can use an environment variable
for a single invocation of the nix tools.
$ export NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM=1
Note: When using `nix shell`, `nix build`, `nix develop`, etc with a flake,
then pass `--impure` in order to allow use of environment variables.
b) For `nixos-rebuild` you can set
{ nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.
c) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
{ allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.
Doesn't return me that eval error with
jaraco-path
, but rather:
That's because you got the error on aarch64-darwin
instead.
For reference: https://github.com/NixOS/nix/issues/11903
Also, I just encountered this comment at https://github.com/NixOS/nixpkgs/pull/327844 :
Note: As the binaries seem to be missing, I have disabled x86_64-darwin support.
Thanks for all the explanations and discussion both, it's alot of help in learning!
Also, I just encountered this comment at #327844 :
Note: As the binaries seem to be missing, I have disabled x86_64-darwin support.
That they are missing is intentional:
Caution: TensorFlow 2.16 was the last TensorFlow release that supported macOS x86
@GaetanLepage Should we keep tensorflow at 2.16 on x86_64-darwin?
@GaetanLepage Should we keep tensorflow at 2.16 on x86_64-darwin?
Well, I would argue that we shouldn't really bother with pinning tensorflow
for the sole purpose of preserving x86_64-darwin
compatibility. Is that what you were suggesting @dotlambda ?
If upstream drop supports for a platform, I think that we should simply acknowledge it and update meta.platforms
accordingly.
No, I was thinking of leaving it on 2.16 on x86_64-darwin but use the latest version on other platforms.
No, I was thinking of leaving it on 2.16 on x86_64-darwin but use the latest version on other platforms.
Is that a common process in nixpkgs ? Having different version of a given package depending on the platform ? Anyway, I have no problem with you doing that if you want.
Anyway, I have no problem with you doing that if you want.
I'll leave it to someone who cares about either Darwin or TensorFlow.
This issue has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/how-to-install-an-older-version-of-a-package/56560/1
Describe the bug
Prefacing this with saying I'm pretty new to nix so apologies if I've missed something obvious or this isn't the correct place for this issue.
I'm using nix-darwin. After an update to the nixpkgs via flake, the following error appears when trying to build
error: tensoflow-bin: unsupported configuration: x86_64-darwin_312
And a bit further up the stack trace:
… while evaluating derivation 'beets-2.0.0'
It looks like my platform was removed from the supported versions of
tensorflow-bin
in a previous commit : https://github.com/NixOS/nixpkgs/commit/8d3667ace8b1d2aa36bfc24aa8eb3731e9f48444 , but the beets package still seems to assume it will work. Full stack trace below...Metadata
"x86_64-darwin"
Darwin 21.6.0, macOS 10.16
yes
no
nix-env (Nix) 2.24.9
""
/nix/store/0z5aw6jjbjq9sqcd03gfa7zkk25nzwgc-source
Notify maintainers
@aszlig @doronbehar @lovesegfault @pjones
Note for maintainers: Please tag this issue in your PR.
Add a :+1: reaction to issues you find important.