| 20 Sep 2021 |
siraben | symphorien: yeah, then those commands don't work anymore | 18:10:12 |
Rick (Mindavi) | Maybe they're in the env with some variable? | 18:12:02 |
siraben | Rick (Mindavi): doesn't appear like it, I'm not sure | 19:06:26 |
siraben | this fixed it | 20:12:20 |
siraben | { 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 | * { 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 | * { nixpkgs ? <nixpkgs>
, pkgs ? (import nixpkgs {}).pkgsCross.arm-embedded
, hostPkgs ? (import nixpkgs {})
}:
pkgs.callPackage ({ mkShell, gnumake }: mkShell {
depsBuildBuild = [ gnumake hostPkgs.gcc ];
}) {}
| 20:13:25 |
Rick (Mindavi) | Was already wondering about that import, should've expressed that :) | 20:15:17 |
sterni | 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 |
Alyssa Ross | Ericson2314: 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 path | 23:36:39 |
Alyssa Ross | this isn't a problem with other libraries, because there are no .so files for it to find | 23:37:08 |
Alyssa Ross | so it will decide to outsource finding those libraries to the linker | 23:37:27 |
Alyssa Ross | so 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 version | 23:56:52 |
| 21 Sep 2021 |
Alyssa Ross | where is libstdc++.a, come to think of it? | 00:39:02 |
Alyssa Ross | looks like the static libraries end up in gcc's $out, but the dynamic libraries end up in $lib | 01:00:13 |
Alyssa Ross | is... is that intentional? | 01:00:21 |
Alyssa Ross | I suppose since the static libraries aren't required at runtime? | 01:16:44 |
siraben | sterni: thanks, looks better now | 02:06:44 |
siraben | { 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 |
sterni | Alyssa Ross: looks like another reason for gcc-ng then | 09:43:06 |
Alyssa Ross | I 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 build | 09:45:02 |
Alyssa Ross | but 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 |
Alyssa Ross | because afaict libtool will only look for static libraries if it gets -static or -all-static. | 09:47:19 |
Alyssa Ross | I wonder if the wrapper should set -all-static when stdenv.hostPlatform.isStatic... | 10:17:30 |
Alyssa Ross | although actually that wouldn't help here, because the argument needs to get to libtool | 10:17:59 |
Alyssa Ross | I suppose I should just write up an issue with what I've discovered so far | 10:18:27 |
| 22 Sep 2021 |
colemickens 🏳️🌈 | does someone have a "working cross-compiling" rev of armv6l? | 02:40:11 |
colemickens 🏳️🌈 | It sorta maybe seems like gobject-introspection cross compilation is broken, maybe due to an upgrade of meson ~recently in nixpkgs | 02:40:42 |
sterni | afaik gobject-introspection cross compilation never works | 09:17:56 |
sterni | * afaik gobject-introspection cross compilation never worked | 09:18:00 |