Nix Cross Compiling | 569 Members | |
| 124 Servers |
| Sender | Message | Time |
|---|---|---|
| 30 Oct 2021 | ||
| yeah can reproduce as well, hmmm | 10:21:00 | |
| I use 21.05 nixpkgs pin. But not the latest. Maybe should try the latest... | 10:21:50 | |
| seems like something goes wrong while compiling libsanitizer for mips? | 10:21:58 | |
| @AleXoundOS:matrix.org: no need, compiled on recent-ish master | 10:22:07 | |
More precisely the build failed with cc1: error: no include path in which to search for stdc-predef.h. | 10:23:19 | |
* More precisely, the build failed with cc1: error: no include path in which to search for stdc-predef.h. | 10:23:26 | |
But I forgot to add the same -I nixpkgs pin for your test case. Will try now. It seems errors are different but both when trying to build gcc. | 10:24:35 | |
| ah okay then the error is different to nixpkgs master… | 10:24:54 | |
| @sterni, running
and a few more errors
| 10:37:31 | |
In reply to @sternenseemann:systemli.orgSo yes, you're right. | 12:06:38 | |
| Following https://github.com/NixOS/nixpkgs/issues/77732, https://hydra.nixos.org/job/nixpkgs/cross-trunk/fuloongminipc.buildPackages.gcc.x86_64-linux, https://hydra.nixos.org/build/108244977, latest successful build is mipsel-unknown-linux-gnu-stage-final-gcc-debug-wrapper-8.3.0. | 12:08:49 | |
In reply to @AleXoundOS:matrix.orgyou can probably disable it here for your arch: https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/compilers/gcc/common/configure-flags.nix#L92-L95 | 12:12:56 | |
Ok, I will try. Btw, I'm not against using uclibc, but uclibc-ng-1.0.37 "is not supported on ‘mipsel-linux’, refusing to evaluate". That is strange, because uclibc is compatible with mipsel. | 12:18:16 | |
* Ok, I will try. Btw, I'm not against using uclibc, but uclibc-ng-1.0.37 "is not supported on ‘mipsel-linux’, refusing to evaluate". That is strange, because uclibc is compatible with mipsel. nix-build -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/d4590d21006387dcb190c516724cb1e41c0f8fdf.tar.gz '<nixpkgs>' -A pkgsCross.ben-nanonote.hello. | 12:18:47 | |
What I had in mind is you could clone nixpkgs, and edit the file to add or stdenv.isMyArch to the conditional | 12:21:59 | |
| if that works you could even PR it to nixpkgs | 12:22:20 | |
In reply to @symphorien:xlumurb.euI haven't yet understand how to add new stdenv.isMyArch with custom compiler (that was my original plan). | 13:20:13 | |
| apparently stdenv.isMips exists | 13:23:55 | |
| but as sterni said, maybe first focus on making nixpkgs's gcc work | 13:25:02 | |
| there are probably bugs in nixpkgs regarding mips support that you will find quicker with gcc | 13:25:58 | |
| and that are common to all compilers | 13:26:09 | |
In reply to @symphorien:xlumurb.eu* I haven't yet understood how to add new stdenv.isMyArch with custom compiler (that was my original plan). | 13:27:55 | |
| libsanitizer probably needs to be disabled on mips. | 17:39:40 | |
pkgs/development/compilers/gcc/common/configure-flags.nix has a few cases when --disable-libsanitizer is passed. I think it makes sense to throw a mipsel variant there. | 17:50:35 | |
| I had an imprssion that libsanitizer supports only 64-bit userspace. And mipsel- should be 32-bit as well. https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=libsanitizer/configure.tgt;h=5a59ea6a1b5e7e37c5e5ab4de5fc3b76a9279a86;hb=HEAD#l61 claims to have some non-64-bit mips support (probably did bitrot). | 17:53:13 | |
In reply to @trofi:matrix.orgHow can I override this? nix-build --show-trace --dry-run -E 'with import (builtins.fetchTarball https://github.com/NixOS/nixpkgs/archive/d4590d21006387dcb190c516724cb1e41c0f8fdf.tar.gz) { overlays = [ (self: super: { gcc = super.gcc.overrideAttrs (def: { configureFlags = def.configureFlags ++ [ "--disable-libsanitizer" ]; }); }) ]; }; pkgsCross.fuloongminipc.hello' fails with attribute 'configureFlags' missing. | 17:56:01 | |
In reply to @trofi:matrix.org* How can I override this? nix-build -E 'with import (builtins.fetchTarball https://github.com/NixOS/nixpkgs/archive/d4590d21006387dcb190c516724cb1e41c0f8fdf.tar.gz) { overlays = [ (self: super: { gcc = super.gcc.overrideAttrs (def: { configureFlags = def.configureFlags ++ [ "--disable-libsanitizer" ]; }); }) ]; }; pkgsCross.fuloongminipc.hello' fails with attribute 'configureFlags' missing. | 17:56:15 | |
* How can I override this?nix-build -E 'with import (builtins.fetchTarball https://github.com/NixOS/nixpkgs/archive/d4590d21006387dcb190c516724cb1e41c0f8fdf.tar.gz) { overlays = [ (self: super: { gcc = super.gcc.overrideAttrs (def: { configureFlags = def.configureFlags ++ [ "--disable-libsanitizer" ]; }); }) ]; }; pkgsCross.fuloongminipc.hello' fails withattribute 'configureFlags' missing. | 17:57:45 | |
* How can I override this?nix-build -E 'with import (builtins.fetchTarball https://github.com/NixOS/nixpkgs/archive/d4590d21006387dcb190c516724cb1e41c0f8fdf.tar.gz) { overlays = [ (self: super: { gcc = super.gcc.overrideAttrs (def: { configureFlags = def.configureFlags ++ [ "--disable-libsanitizer" ]; }); }) ]; }; pkgsCross.fuloongminipc.hello'fails with attribute 'configureFlags' missing. | 17:58:00 | |
| I think it's a bit more complicated than that due to gcc bootstrapping and wrapping. But maybe overlay would work with a bit more tweaking. Let's see where those flags are actually passed. | 18:11:57 | |