!ayCRiZriCVtuCUpeLp:nixos.org

Nix Cross Compiling

581 Members
127 Servers

You have reached the beginning of time (for this room).


SenderMessageTime
8 May 2025
@curid:matrix.org@curid:matrix.orgRedacted or Malformed Event19:03:13
@curid:matrix.org@curid:matrix.org Is there a better way to write this?
NIX_CFLAGS_COMPILE = if pkgs.system == "aarch64-unknown-linux-gnu" then "" else "-msse4.2"
19:14:52
@k900:0upti.meK900 if !stdenv.hostPlatform.isx86 19:17:58
@k900:0upti.meK900Or rather19:18:10
@k900:0upti.meK900 lib.optionalString stdenv.hostPlatform.isx86 "-msse4.2" 19:18:21
9 May 2025
@curid:matrix.org@curid:matrix.org
let
  # latest unstable
  pkgs = (import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/b3582c75c7f21ce0b429898980eddbbf05c68e55.tar.gz")
    {
      crossSystem = "aarch64-unknown-linux-gnu";
    }).__splicedPackages;
in pkgs.mkShell {
  buildInputs = [ pkgs.cpuid ];
}
src/x86/cpuid.c:138:10: fatal error: cpuid.h: No such file or directory
  138 | #include <cpuid.h>

It seems to build x86 specific files https://github.com/pytorch/cpuinfo/blob/main/CMakeLists.txt

16:15:48
@rosscomputerguy:matrix.orgTristan Ross
  1. Use packages
  2. Add cmake (& optionally ninja) to packages
16:24:51

Show newer messages


Back to Room ListRoom Version: 6