!ayCRiZriCVtuCUpeLp:nixos.org

Nix Cross Compiling

557 Members
119 Servers

Load older messages


SenderMessageTime
20 Sep 2021
@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
@qyliss:fairydust.spaceAlyssa Rossso it runs x86_64-unknown-linux-musl-g++ -shared -v, sees the -L for that directory, and then will always check there for libstdc++.so before even considering whether there's a static version23:56:52
21 Sep 2021
@qyliss:fairydust.spaceAlyssa Ross where is libstdc++.a, come to think of it? 00:39:02
@qyliss:fairydust.spaceAlyssa Rosslooks like the static libraries end up in gcc's $out, but the dynamic libraries end up in $lib01:00:13
@qyliss:fairydust.spaceAlyssa Rossis... is that intentional?01:00:21
@qyliss:fairydust.spaceAlyssa RossI suppose since the static libraries aren't required at runtime?01:16:44
@siraben:matrix.orgsiraben sterni: thanks, looks better now 02:06:44
@siraben:matrix.orgsiraben
{ nixpkgs ? fetchTarball "https://github.com/NixOS/nixpkgs/archive/e0ce3c683ae677cf5aab597d645520cddd13392b.tar.gz"
, pkgs ? (import nixpkgs {}).pkgsCross.arm-embedded
}:

pkgs.callPackage ({ mkShell, pkgsBuildBuild }: mkShell {
  packages = [ pkgsBuildBuild.gcc ];
}) {}
02:06:47
@sternenseemann:systemli.orgsterni Alyssa Ross: looks like another reason for gcc-ng then 09:43:06
@qyliss:fairydust.spaceAlyssa RossI managed to get it to work by both 1) putting the static gcc libraries in the same output as the dynamic ones 2) setting LDFLAGS=-all-static in the program I'm trying to build09:45:02
@qyliss:fairydust.spaceAlyssa Rossbut I'm confused that there seems to be no way to get autotools to pass -all-static without me just setting LDFLAGS 09:46:39
@qyliss:fairydust.spaceAlyssa Ross because afaict libtool will only look for static libraries if it gets -static or -all-static. 09:47:19
@qyliss:fairydust.spaceAlyssa RossI wonder if the wrapper should set -all-static when stdenv.hostPlatform.isStatic...10:17:30
@qyliss:fairydust.spaceAlyssa Rossalthough actually that wouldn't help here, because the argument needs to get to libtool10:17:59
@qyliss:fairydust.spaceAlyssa RossI suppose I should just write up an issue with what I've discovered so far10:18:27
22 Sep 2021
@colemickens:matrix.orgcolemickens 🏳️‍🌈does someone have a "working cross-compiling" rev of armv6l?02:40:11
@colemickens:matrix.orgcolemickens 🏳️‍🌈It sorta maybe seems like gobject-introspection cross compilation is broken, maybe due to an upgrade of meson ~recently in nixpkgs02:40:42
@sternenseemann:systemli.orgsterniafaik gobject-introspection cross compilation never works09:17:56
@sternenseemann:systemli.orgsterni * afaik gobject-introspection cross compilation never worked09:18:00

Show newer messages


Back to Room ListRoom Version: 6