!ayCRiZriCVtuCUpeLp:nixos.org

Nix Cross Compiling

579 Members
129 Servers

Load older messages


SenderMessageTime
20 Sep 2021
@qyliss:fairydust.spaceAlyssa Rossoh no I'm thinking of gobject-introspection15:55:22
@Ericson2314:matrix.orgJohn Ericsonthe other fun one :)15:58:34
@rick:matrix.ciphernetics.nlRick (Mindavi)Still waiting on upstream to review the patches...16:01:24
@qyliss:fairydust.spaceAlyssa Rosslibtool is my second least favourite thing to debug after cmake16:44:19
@qyliss:fairydust.spaceAlyssa Rossif a cmake-based package doesn't cross-compile i usually just give up 16:44:47
@rick:matrix.ciphernetics.nlRick (Mindavi)CMake doesn't really have a concept for mixed arch compilation16:52:30
@rick:matrix.ciphernetics.nlRick (Mindavi)Which is not great :(16:52:39
@siraben:matrix.orgsiraben
{ nixpkgs ? <nixpkgs>
, pkgs ? (import nixpkgs {}).pkgsCross.arm-embedded
}:

pkgs.callPackage ({ mkShell, gnumake, buildPackages }: mkShell {
  depsBuildBuild = [ buildPackages.gcc ];
  nativeBuildInputs = [ gnumake ];
}) {}
17:11:48
@siraben:matrix.orgsirabenon macOS I don't seem to see the native gcc in the shell, what am I doing wrong?17:12:04
@siraben:matrix.orgsiraben which gcc returns /usr/bin/gcc which is impure 17:12:13
@symphorien:xlumurb.eusymphorienTry $CC17:15:15
@symphorien:xlumurb.eusymphorienThere is no unorefixed gcc in a cross shell 17:15:39
@siraben:matrix.orgsirabenI get the cross-compiler17:15:49
@symphorien:xlumurb.eusymphorien* There is no unprefixed gcc in a cross shell 17:15:56
@symphorien:xlumurb.eusymphorienAh sorry I had not paid attention to buildPackages.gcc17:16:45
@siraben:matrix.orgsiraben
In reply to @symphorien:xlumurb.eu
There is no unprefixed gcc in a cross shell
how can I obtain this? the makefile I'm using implicitly assumes gcc
17:16:59
@siraben:matrix.orgsiraben Hm, calling as uses /Users/siraben/.nix-profile/bin/as which is also impure 17:19:59
@symphorien:xlumurb.eusymphorienWell everything that is not shadowed by the shell is impure. Try --pure17:23:03
@siraben:matrix.orgsiraben symphorien: yeah, then those commands don't work anymore 18:10:12
@rick:matrix.ciphernetics.nlRick (Mindavi)Maybe they're in the env with some variable?18:12:02
@siraben:matrix.orgsiraben Rick (Mindavi): doesn't appear like it, I'm not sure 19:06:26
@siraben:matrix.orgsirabenthis fixed it20:12:20
@siraben:matrix.orgsiraben
{ nixpkgs ? <nixpkgs>
, pkgs ? (import nixpkgs {}).pkgsCross.arm-embedded
, hostPkgs ? (import nixpkgs {})
}:

pkgs.callPackage ({ mkShell, gnumake, bintools, buildPackages }: mkShell {
  depsBuildBuild = [ gnumake hostPkgs.buildPackages.gcc hostPkgs.bintools ];
}) {}

20:12:23
@siraben:matrix.orgsiraben *
{ nixpkgs ? <nixpkgs>
, pkgs ? (import nixpkgs {}).pkgsCross.arm-embedded
, hostPkgs ? (import nixpkgs {})
}:

pkgs.callPackage ({ mkShell, gnumake }: mkShell {
  depsBuildBuild = [ gnumake hostPkgs.gcc hostPkgs.bintools ];
}) {}
20:12:58
@siraben:matrix.orgsiraben *
{ nixpkgs ? <nixpkgs>
, pkgs ? (import nixpkgs {}).pkgsCross.arm-embedded
, hostPkgs ? (import nixpkgs {})
}:

pkgs.callPackage ({ mkShell, gnumake }: mkShell {
  depsBuildBuild = [ gnumake hostPkgs.gcc ];
}) {}
20:13:25
@rick:matrix.ciphernetics.nlRick (Mindavi)Was already wondering about that import, should've expressed that :)20:15:17
@sternenseemann:systemli.orgsterni siraben: there's a way to do it with your first example (which is much cleaner): use pkgsBuildBuild.gcc and $CC_FOR_BUILD 22:32:38
@qyliss:fairydust.spaceAlyssa RossEricson2314: so AIUI, the problem here is that libtool runs the equivalent of ld -v, notices that the compiler is looking in stdenv.cc's lib directory, notices that there's a libstdc++.so there, and so generates a file that hardcodes that path23:36:39
@qyliss:fairydust.spaceAlyssa Rossthis isn't a problem with other libraries, because there are no .so files for it to find23:37:08
@qyliss:fairydust.spaceAlyssa Rossso it will decide to outsource finding those libraries to the linker23:37:27

Show newer messages


Back to Room ListRoom Version: 6