!ayCRiZriCVtuCUpeLp:nixos.org

Nix Cross Compiling

579 Members
129 Servers

Load older messages


SenderMessageTime
17 Dec 2024
@spikespaz:envs.net@spikespaz:envs.net joined the room.05:58:19
@spikespaz:envs.net@spikespaz:envs.net

This is googleable:
> = note: ld: library not found for -liconv
> clang-16: error: linker command failed with exit code 1 (use -v to see invocation)
But trying to add liconv to buildInputs which is the most common answer and the most common code example does not work.

I have attempted a manual nixpkgs import with crossSystem, and this:

embeddedPackagesFor = {
        aarch64-darwin = let
          pkgs = pkgsFor.aarch64-darwin;
          cross = pkgs.pkgsCross.aarch64-multiplatform;
          rustPlatform = cross.makeRustPlatform {
            inherit (cross) rustc cargo;
            stdenv = cross.clangStdenv;
            # stdenv = lib.pipe cross.stdenv
            #   (with cross.stdenvAdapters; [ makeStatic useMoldLinker ]);
          };
        in {
          aarch64-linux-cell-management-system =
            cross.callPackage ./nix/cell_management_system.nix {
              sourceRoot = ./embedded;
              # inherit rustPlatform;
            };
        };
        x86_64-linux = let
          pkgs = pkgsFor.x86_64-linux;
          cross = pkgs.pkgsCross.aarch64-multiplatform.pkgsStatic;
        in {
          aarch64-linux-cell-management-system =
            cross.callPackage ./nix/cell_management_system.nix {
              sourceRoot = ./embedded;
            };
        };
      };

Am I constructing the environment incorrectly?

06:01:26
@spikespaz:envs.net@spikespaz:envs.net *

This is googleable:
> = note: ld: library not found for -liconv
> clang-16: error: linker command failed with exit code 1 (use -v to see invocation)
But trying to add liconv to buildInputs which is the most common answer and the most common code example does not work.

I have attempted a manual nixpkgs import with crossSystem, and this:

embeddedPackagesFor = {
        aarch64-darwin = let
          pkgs = pkgsFor.aarch64-darwin;
          cross = pkgs.pkgsCross.aarch64-multiplatform;
          rustPlatform = cross.makeRustPlatform {
            inherit (cross) rustc cargo;
            stdenv = cross.clangStdenv;
            # stdenv = lib.pipe cross.stdenv
            #   (with cross.stdenvAdapters; [ makeStatic useMoldLinker ]);
          };
        in {
          aarch64-linux-cell-management-system =
            cross.callPackage ./nix/cell_management_system.nix {
              sourceRoot = ./embedded;
              # inherit rustPlatform;
            };
        };
        x86_64-linux = let
          pkgs = pkgsFor.x86_64-linux;
          cross = pkgs.pkgsCross.aarch64-multiplatform.pkgsStatic;
        in {
          aarch64-linux-cell-management-system =
            cross.callPackage ./nix/cell_management_system.nix {
              sourceRoot = ./embedded;
            };
        };
      };

Am I constructing the environment incorrectly?

06:01:39
@kuruczgy:matrix.orgkuruczgy

Anyone know what the typical pitfalls are with qt cross compiling, what could be causing this issue?

nix build --impure --expr '(import ./. { localSystem.system = "aarch64-linux"; crossSystem.system = "x86_64-linux"; }).renderdoc' gives:

error: builder for '/nix/store/byl5sd3dcj64vlpq9arwya0nhimqpa0b-qtx11extras-5.15.15.drv' failed with exit code 1;
       last 3 log lines:
       > Error: detected mismatched Qt dependencies:
       >     /nix/store/ismcya95ymkr9f1qb6z7nr80njplrxnx-qtbase-5.15.15-dev
       >     /nix/store/3nwrdzbr1kalfad8xvxriapk5l27972m-qtbase-5.15.15-dev
21:57:50
@greg:thehellings.comGreg HellingsI don't know that it's specific to cross-compiling, but Qt build does have a check that it is building exactly the same versions, so if you've got some mix of native and cross libraries in the build path it might be finding that they are not identical21:59:33
@qyliss:fairydust.spaceAlyssa Ross
In reply to @kuruczgy:matrix.org

Anyone know what the typical pitfalls are with qt cross compiling, what could be causing this issue?

nix build --impure --expr '(import ./. { localSystem.system = "aarch64-linux"; crossSystem.system = "x86_64-linux"; }).renderdoc' gives:

error: builder for '/nix/store/byl5sd3dcj64vlpq9arwya0nhimqpa0b-qtx11extras-5.15.15.drv' failed with exit code 1;
       last 3 log lines:
       > Error: detected mismatched Qt dependencies:
       >     /nix/store/ismcya95ymkr9f1qb6z7nr80njplrxnx-qtbase-5.15.15-dev
       >     /nix/store/3nwrdzbr1kalfad8xvxriapk5l27972m-qtbase-5.15.15-dev
Known issue
22:00:02
@qyliss:fairydust.spaceAlyssa Rosshttps://github.com/NixOS/nixpkgs/issues/26975622:00:24
@k900:0upti.meK900Qt cross is entirely busted22:00:21
@kuruczgy:matrix.orgkuruczgyAw, well thanks :/ Any known quick workaround?22:01:39
@k900:0upti.meK900Qt 5 is going to take insane amounts of work to fix properly22:00:32
@qyliss:fairydust.spaceAlyssa Rossno22:01:44
@k900:0upti.meK900Qt 6 is probably fixable if someone wants to commit time to it22:00:40
@kuruczgy:matrix.orgkuruczgy(If no then I will just try to rip out qt support from renderdoc, don't really need it for my use-case.)22:02:06
@k900:0upti.meK900 @Alyssa Ross btw I saw your PR, it's 1AM and I'm on a staging-next kick 22:01:05
@qyliss:fairydust.spaceAlyssa Rossno hurry22:03:06
@qyliss:fairydust.spaceAlyssa Rossi finally found something that irritated me enough to overcome my nixpkgs burnout22:03:23
@alexfmpe:matrix.orgalexfmpespite-drive methodology is the only proven one22:40:18
@alexfmpe:matrix.orgalexfmpe* spite-driven development is the only proven one22:40:28
@alexfmpe:matrix.orgalexfmpe* spite-driven development is the only proven methodology22:40:33
19 Dec 2024
@fgrsnau:matrix.org@fgrsnau:matrix.org joined the room.21:44:38
20 Dec 2024
@0xfeebdaed:matrix.org0xfeebdaed joined the room.04:02:11
@xiaoxiangmoe:matrix.org🐰 xiaoxiangmoe joined the room.13:58:16
@p14:matrix.orgp14 nixpkgs#pkgsStatic.pkgsLLVM.ncurses works on master (at least recently) but is broken on staging. (heads up Tristan Ross) 14:11:33
@rosscomputerguy:matrix.orgTristan Ross Fun... 15:06:42
@pascallor:matrix.orgpascallor joined the room.18:39:15
@aliarokapis:matrix.orgAlexandros LiarokapisRedacted or Malformed Event20:06:49
@aliarokapis:matrix.orgAlexandros Liarokapis

Hi All. Not sure if this is a good place to ask but I would imagine this group has spent a bit more time groking the details of the host -> target dependency theory from the nixpkgs manual. Is this correct?

let mapOffset(h, t, i) = i + (if i <= 0 then h else t - 1)

dep(h0, t0, A, B)
propagated-dep(h1, t1, B, C)
h0 + h1 in {-1, 0, 1}
h0 + t1 in {-1, 0, -1}
----------------------------- Take immediate dependencies' propagated dependencies
propagated-dep(mapOffset(h0, t0, h1),
               mapOffset(h0, t0, t1),
               A, C)

shouldn't the final line be just dep instead of propagated-dep ?
because otherwise I think a propagatedBuildInputs would be propagated across a whole buildInputs chain.
eg if propagated-dep(0, 1, C, D), dep(0, 1, B, C), dep(0, 1, A, B) then this results in propagated-dep(0, 1, B, D), propagated-dep(0, 1, A, D)

20:08:33
@aliarokapis:matrix.orgAlexandros Liarokapishttps://nixos.org/manual/nixpkgs/stable/#ssec-stdenv-dependencies-propagated20:10:08
@aliarokapis:matrix.orgAlexandros Liarokapis uh.. judging from the in {-1,0,-1} typo it doesn't seem very far off 20:13:08
@aliarokapis:matrix.orgAlexandros Liarokapisthis section has been there for like forever and I don't see it being discuss much20:28:52

Show newer messages


Back to Room ListRoom Version: 6