| 30 Oct 2021 |
sterni | so I think it may require good knowledge of internals and the cc wrapper to make a stdenv from a bundled tarball | 09:45:42 |
sterni | using the normal toolchain is probably preferrable if you don't need any proprietary bits | 09:46:09 |
@AleXoundOS:matrix.org | In reply to @sternenseemann:systemli.org what if you try building nix-build -E 'with import <nixpkgs> { crossSystem = "mipsel-linux"; }; hello? Ok. Trying to build this. Surprisingly it requires more packages to build... | 10:14:18 |
sterni | I think that toolchain may be missing on hydra, so CI doesn't make it substitutable maybe? | 10:15:13 |
sterni | can add it if it's indeed working :) | 10:15:21 |
@AleXoundOS:matrix.org | Let's see :) It's building gcc in 2 passes at the moment. | 10:19:08 |
@AleXoundOS:matrix.org | Nah, error: build of '/nix/store/wdqk99kn2vs0zaxqk6724y420lmc7fxm-hello-2.10-mipsel-unknown-linux-gnu.drv' failed. | 10:20:13 |
@AleXoundOS:matrix.org | In particular, builder for '/nix/store/9pazc7nqmmq5iba4pcn0d2fpqid5mlww-mipsel-unknown-linux-gnu-stage-static-gcc-debug-9.2.0.drv' failed with exit code 2. | 10:20:47 |
sterni | yeah can reproduce as well, hmmm | 10:21:00 |
@AleXoundOS:matrix.org | I use 21.05 nixpkgs pin. But not the latest. Maybe should try the latest... | 10:21:50 |
sterni | seems like something goes wrong while compiling libsanitizer for mips? | 10:21:58 |
sterni | @AleXoundOS:matrix.org: no need, compiled on recent-ish master | 10:22:07 |
@AleXoundOS:matrix.org | More precisely the build failed with cc1: error: no include path in which to search for stdc-predef.h. | 10:23:19 |
@AleXoundOS:matrix.org | * More precisely, the build failed with cc1: error: no include path in which to search for stdc-predef.h. | 10:23:26 |
@AleXoundOS:matrix.org | 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 |
sterni | ah okay then the error is different to nixpkgs master… | 10:24:54 |
@AleXoundOS:matrix.org | @sterni, running $ nix-build -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/d4590d21006387dcb190c516724cb1e41c0f8fdf.tar.gz -E 'with import <nixpkgs> { crossSystem = "mipsel-linux"; }; hello' results in same errors as when I tried pkgsCross.fuloongminipc.hello:
../../../../gcc-10.3.0/libsanitizer/sanitizer_common/sanitizer_syscall_generic.inc:19:24: error: '__NR_mmap2' was not declared in this scope ...
../../../../gcc-10.3.0/libsanitizer/sanitizer_common/sanitizer_linux.cpp:247:23: error: 'struct stat64' has no member named 'st_atim'; did you mean 'st_atime'?
and a few more errors
builder for '/nix/store/jqxv6pgil8n0bb95c6hgw5bs7ghmrcdg-mipsel-unknown-linux-gnu-stage-final-gcc-debug-10.3.0.drv' failed with exit code 2
| 10:37:31 |
@AleXoundOS:matrix.org | In reply to @sternenseemann:systemli.org seems like something goes wrong while compiling libsanitizer for mips? So yes, you're right. | 12:06:38 |
@AleXoundOS:matrix.org | 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 |
symphorien | In reply to @AleXoundOS:matrix.org So yes, you're right. you 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 |
@AleXoundOS:matrix.org | 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 |
@AleXoundOS:matrix.org | * 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 |
symphorien | 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 |
symphorien | if that works you could even PR it to nixpkgs | 12:22:20 |
@AleXoundOS:matrix.org | In reply to @symphorien:xlumurb.eu What I had in mind is you could clone nixpkgs, and edit the file to add or stdenv.isMyArch to the conditional I haven't yet understand how to add new stdenv.isMyArch with custom compiler (that was my original plan). | 13:20:13 |
symphorien | apparently stdenv.isMips exists | 13:23:55 |
symphorien | but as sterni said, maybe first focus on making nixpkgs's gcc work | 13:25:02 |
symphorien | there are probably bugs in nixpkgs regarding mips support that you will find quicker with gcc | 13:25:58 |
symphorien | and that are common to all compilers | 13:26:09 |
@AleXoundOS:matrix.org | In reply to @symphorien:xlumurb.eu What I had in mind is you could clone nixpkgs, and edit the file to add or stdenv.isMyArch to the conditional * I haven't yet understood how to add new stdenv.isMyArch with custom compiler (that was my original plan). | 13:27:55 |