!ayCRiZriCVtuCUpeLp:nixos.org

Nix Cross Compiling

569 Members
124 Servers

Load older messages


SenderMessageTime
30 Oct 2021
@sternenseemann:systemli.orgsterniyeah can reproduce as well, hmmm10:21:00
@AleXoundOS:matrix.org@AleXoundOS:matrix.orgI use 21.05 nixpkgs pin. But not the latest. Maybe should try the latest...10:21:50
@sternenseemann:systemli.orgsterniseems like something goes wrong while compiling libsanitizer for mips?10:21:58
@sternenseemann:systemli.orgsterni @AleXoundOS:matrix.org: no need, compiled on recent-ish master 10:22:07
@AleXoundOS:matrix.org@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@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@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
@sternenseemann:systemli.orgsterniah okay then the error is different to nixpkgs master…10:24:54
@AleXoundOS:matrix.org@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@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@AleXoundOS:matrix.orgFollowing 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:xlumurb.eusymphorien
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@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@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:xlumurb.eusymphorien 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:xlumurb.eusymphorienif that works you could even PR it to nixpkgs12:22:20
@AleXoundOS:matrix.org@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:xlumurb.eusymphorienapparently stdenv.isMips exists13:23:55
@symphorien:xlumurb.eusymphorienbut as sterni said, maybe first focus on making nixpkgs's gcc work13:25:02
@symphorien:xlumurb.eusymphorienthere are probably bugs in nixpkgs regarding mips support that you will find quicker with gcc13:25:58
@symphorien:xlumurb.eusymphorienand that are common to all compilers13:26:09
@AleXoundOS:matrix.org@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
@trofi:matrix.orgtrofilibsanitizer probably needs to be disabled on mips.17:39:40
@trofi:matrix.orgtrofi 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
@trofi:matrix.orgtrofiI 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
@AleXoundOS:matrix.org@AleXoundOS:matrix.org
In reply to @trofi:matrix.org
libsanitizer probably needs to be disabled on mips.
How 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
@AleXoundOS:matrix.org@AleXoundOS:matrix.org
In reply to @trofi:matrix.org
libsanitizer probably needs to be disabled on mips.
* 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
@AleXoundOS:matrix.org@AleXoundOS: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:57:45
@AleXoundOS:matrix.org@AleXoundOS: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:58:00
@trofi:matrix.orgtrofiI 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

There are no newer messages yet.


Back to Room ListRoom Version: 6