11 Sep 2024 |
hexa | In reply to @kjeremy:matrix.org @hexa oh maybe that's the cause of #338231 for python packages with lots of leaf packages, certainly | 18:18:36 |
hexa | and home-assistant is really huge | 18:19:00 |
Artturin | In reply to @vramp:matrix.org i will convert my shell.nix to a flake and try that out You can use overrideAttrs and lib.remove to remove it from nativeBuildInputs | 18:22:35 |
Artturin | https://github.com/search?q=%2Fbuildinputs.%2Blib.remove%2F&type=code | 18:24:33 |
Artturin | * You can use overrideAttrs and lib.remove to remove it from buildInputs | 18:28:16 |
Theo Paris | Hmm so I tried to cross compile for x86_64-unknown-none-coff and got this
error: Unknown ABI: coff
I managed to fix this error by patching nixpkgs with this:
diff --git a/lib/systems/parse.nix b/lib/systems/parse.nix
index a2ee288f2c1f..1e765f6e3bfb 100644
--- a/lib/systems/parse.nix
+++ b/lib/systems/parse.nix
@@ -368,6 +368,8 @@ rec {
# Other architectures should use ELF in embedded situations.
elf = {};
+ coff = {};
+ macho = {};
androideabi = {};
android = {
However nix still tries to build compiler-rt which seems to fail with #error Unsupported target . I am using crossSystem like so
crossSystem = {
config = "x86_64-unknown-none-coff";
libc = null;
libcxx = null;
linker = "lld";
useLLVM = true;
};
Unfortunately there doesn't appear to be a way to patch compiler-rt with Nix yet so I have no way of modifiying https://github.com/llvm/llvm-project/blob/bd4e0dfa945fb7fe73801bcee63c21aa8123b928/compiler-rt/lib/builtins/int_lib.h#L70
| 18:59:57 |
Artturin | In reply to @creepinson:matrix.org
Hmm so I tried to cross compile for x86_64-unknown-none-coff and got this
error: Unknown ABI: coff
I managed to fix this error by patching nixpkgs with this:
diff --git a/lib/systems/parse.nix b/lib/systems/parse.nix
index a2ee288f2c1f..1e765f6e3bfb 100644
--- a/lib/systems/parse.nix
+++ b/lib/systems/parse.nix
@@ -368,6 +368,8 @@ rec {
# Other architectures should use ELF in embedded situations.
elf = {};
+ coff = {};
+ macho = {};
androideabi = {};
android = {
However nix still tries to build compiler-rt which seems to fail with #error Unsupported target . I am using crossSystem like so
crossSystem = {
config = "x86_64-unknown-none-coff";
libc = null;
libcxx = null;
linker = "lld";
useLLVM = true;
};
Unfortunately there doesn't appear to be a way to patch compiler-rt with Nix yet so I have no way of modifiying https://github.com/llvm/llvm-project/blob/bd4e0dfa945fb7fe73801bcee63c21aa8123b928/compiler-rt/lib/builtins/int_lib.h#L70
Unfortunately there doesn't appear to be a way to patch compiler-rt
Why not?
| 19:11:23 |
Artturin | In reply to @creepinson:matrix.org
Hmm so I tried to cross compile for x86_64-unknown-none-coff and got this
error: Unknown ABI: coff
I managed to fix this error by patching nixpkgs with this:
diff --git a/lib/systems/parse.nix b/lib/systems/parse.nix
index a2ee288f2c1f..1e765f6e3bfb 100644
--- a/lib/systems/parse.nix
+++ b/lib/systems/parse.nix
@@ -368,6 +368,8 @@ rec {
# Other architectures should use ELF in embedded situations.
elf = {};
+ coff = {};
+ macho = {};
androideabi = {};
android = {
However nix still tries to build compiler-rt which seems to fail with #error Unsupported target . I am using crossSystem like so
crossSystem = {
config = "x86_64-unknown-none-coff";
libc = null;
libcxx = null;
linker = "lld";
useLLVM = true;
};
Unfortunately there doesn't appear to be a way to patch compiler-rt with Nix yet so I have no way of modifiying https://github.com/llvm/llvm-project/blob/bd4e0dfa945fb7fe73801bcee63c21aa8123b928/compiler-rt/lib/builtins/int_lib.h#L70
*
Unfortunately there doesn't appear to be a way to patch compiler-rt
To do it easily you can by editing the files
| 19:12:18 |
Artturin | *
Unfortunately there doesn't appear to be a way to patch compiler-rt
To do it easily you can edit the files
| 19:12:22 |
Artturin | In reply to @artturin:matrix.org https://github.com/search?q=%2Fbuildinputs.%2Blib.remove%2F&type=code vramp: There was a another conditional which I missed, fixed | 19:57:20 |
Artturin | K900: Why haven't we added platforms.windows/mingw to bash badPlatforms ? | 20:04:27 |
Artturin | Someone found patches https://github.com/NixOS/nixpkgs/issues/333338#issuecomment-2324822724 | 20:18:09 |
Artturin | But the problem is how to get autoconf to bash | 20:18:22 |
Artturin | ... Is what I would say if we couldn't just use stdenv.hostPlatform.isMinGW conditionals lol | 20:21:44 |
Artturin | https://github.com/NixOS/nixpkgs/pull/341247 | 20:43:13 |
Artturin | Hmm nix eval ".#pkgsCross.aarch64-multiplatform" -vvvvvvvvvvv goes for a loop after evaluating 9ptls https://gist.github.com/Artturin/997cca3789e1dda918de53afa94fa0b1 | 22:37:10 |
Artturin | non cross eval log doesn't seem to be helpful :/
instantiated '9ptls-1.6.5' -> '/nix/store/kxmj7czlc7ipl9wlrmz1943kp37pwncy-9ptls-1.6.5.drv'
evaluating file '/home/artturin/nixgits/my-nixpkgs/.worktree/1/pkgs/common-updater/combinators.nix'
evaluating file '/home/artturin/nixgits/my-nixpkgs/.worktree/1/pkgs/applications/audio/a2jmidid/default.nix'
processing attribute '__structuredAttrs'
processing attribute 'args'
processing attribute 'buildInputs'
processing attribute 'builder'
processing attribute 'cmakeFlags'
processing attribute 'configureFlags'
processing attribute 'depsBuildBuild'
processing attribute 'depsBuildBuildPropagated'
... goes on normally
| 22:43:12 |
Artturin | In reply to @artturin:matrix.org Hmm nix eval ".#pkgsCross.aarch64-multiplatform" -vvvvvvvvvvv goes for a loop after evaluating 9ptls https://gist.github.com/Artturin/997cca3789e1dda918de53afa94fa0b1 Added strace | 22:57:03 |
Artturin | Says it loops at pkgs/top-level/cubocore-packages.nix but pkgsCross.aarch64-multiplatform.CuboCore or pkgsCross.aarch64-multiplatform.qt5 don't have issues | 23:02:16 |
Artturin | nix-repl> pkgsCross.aarch64-multiplatform.openmpi
error:
… while calling the 'derivationStrict' builtin
at <nix/derivation-internal.nix>:9:12:
8|
9| strict = derivationStrict drvAttrs;
| ^
10|
… while evaluating derivation 'openmpi-aarch64-unknown-linux-gnu-5.0.5'
whose name attribute is located at /home/artturin/nixgits/my-nixpkgs/.worktree/1/pkgs/stdenv/generic/make-derivation.nix:336:7
… while evaluating attribute 'postInstall' of derivation 'openmpi-aarch64-unknown-linux-gnu-5.0.5'
at /home/artturin/nixgits/my-nixpkgs/.worktree/1/pkgs/development/libraries/openmpi/default.nix:138:3:
137|
138| postInstall =
| ^
139| let
(stack trace truncated; use '--show-trace' to show the full, detailed trace)
error: attribute 'gfortran' missing
at /home/artturin/nixgits/my-nixpkgs/.worktree/1/pkgs/development/libraries/openmpi/default.nix:178:16:
177| "gfortran"
178| "${targetPackages.gfortran}/bin/${targetPackages.gfortran.targetPrefix}gfortran"
| ^
179| ];
🤨
| 23:04:35 |
Artturin | https://github.com/NixOS/nixpkgs/pull/341269 | 23:17:23 |
Artturin | On static it fails with error: attribute 'sharedLibrary' missing | 23:17:33 |
Artturin | * pkgsStatic it fails with error: attribute 'sharedLibrary' missing | 23:17:38 |
Artturin | * Added a commit for pkgsStatic too error: attribute 'sharedLibrary' missing | 23:20:33 |
Philip Taron (UTC-8) | Is that correct? Or should the fortran support be targetPackages ? gfortran ? | 23:26:08 |
Philip Taron (UTC-8) | * Is that correct? Or should the fortran support be targetPackages ? gfortran rather than true ? | 23:26:22 |
Artturin | There's binaries in mp which should function on the hostSystem when this is done | 23:30:48 |
Artturin | the targetPackages.stdenv.cc is the same offset asgfortran | 23:31:26 |
Artturin | * the targetPackages.stdenv.cc is the same offset as gfortran | 23:31:34 |
Philip Taron (UTC-8) | is there ever a time then that it shouldn't be gfortran , rather than targetPackages.gfortran ? | 23:32:33 |