!ayCRiZriCVtuCUpeLp:nixos.org

Nix Cross Compiling

398 Members
92 Servers

Load older messages


SenderMessageTime
9 Oct 2024
@aliarokapis:matrix.orgAlexandros Liarokapiswell "just"20:32:30
@rosscomputerguy:matrix.orgTristan Ross
In reply to @aliarokapis:matrix.org
is this just delegating to clang ?
I don't think it exactly is using clang literally but like it does call the same libclang API's.
20:33:28
@rosscomputerguy:matrix.orgTristan RossIt isn't also like a direct passthru, I think they have some Zig magic added in.20:33:47
11 Oct 2024
@98765abc:mozilla.org98765abc changed their profile picture.01:57:56
@sfortynine:matrix.orgssfortynine joined the room.06:45:38
@sfortynine:matrix.orgssfortynine changed their display name from 七七四十九 to ssfortynine.06:46:16
@amy:catgirl.cloudAmy joined the room.19:42:12
13 Oct 2024
@conbruno:matrix.orgconbruno joined the room.11:21:09
@conbruno:matrix.orgconbruno

Hey guys, I am trying to build an armv7l image cross compiling from x86_64-linux to armv7l-linux. I ran into:

error: builder for '/nix/store/gzf7cxdnlm8jy0xhil6930p2684yjs4m-perl-armv7l-unknown-linux-gnueabihf-5.38.2.drv' failed with exit code 2;
       last 10 log lines:
       > Generating a Unix-style Makefile
       > Writing Makefile for DynaLoader
       > ==> Your Makefile has been rebuilt. <==
       > ==> Please rerun the make command.  <==
       > false
       > make[2]: *** [Makefile:963: Makefile] Error 1
       > make[2]: Leaving directory '/build/perl-5.38.2/ext/DynaLoader'
       > make[1]: *** [Makefile:238: ext/DynaLoader/pm_to_blib] Error 2
       > make[1]: Leaving directory '/build/perl-5.38.2'
       > make: *** [Makefile:86: all] Error 2
       For full logs, run 'nix-store -l /nix/store/gzf7cxdnlm8jy0xhil6930p2684yjs4m-perl-armv7l-unknown-linux-gnueabihf-5.38.2.drv'.

How can I troubleshoot this further (still early days with Nix/NixOS for me).

11:33:22
@k900:0upti.meK900Post the full logs11:43:51
@k900:0upti.meK900With the command it tells you11:43:56
@conbruno:matrix.orgconbruno
@nix { "action": "setPhase", "phase": "unpackPhase" }
Running phase: unpackPhase
unpacking source archive /nix/store/mp5jcbm1hjqw4ckxvrm7k0pfhhjf3dbg-perl-5.38.2.tar.gz
source root is perl-5.38.2
unpacking source archive /nix/store/kaa0wd0x05ff5xy40g4qh32fcvsxzy6h-perl-cross-84db4c71ae3d3b01fb2966cd15a060a7be334710
setting SOURCE_DATE_EPOCH to timestamp 1701180287 of file perl-5.38.2/lib/unicore/TestNorm.pl
@nix { "action": "setPhase", "phase": "patchPhase" }
Running phase: patchPhase
applying patch /nix/store/55lbvcqz3z97jcqf2zxqwav58wq52z8l-no-sys-dirs-5.38.0.patch
patching file Configure
patching file ext/Errno/Errno_pm.PL
patching file hints/freebsd.sh
patching file hints/linux.sh
applying patch /nix/store/92l8lw8q0i7cdvwzbbdjd8dj6krqbj5p-cross.patch
patching file cpan/CPAN-Meta-Requirements/lib/CPAN/Meta/Requirements.pm
patching file cpan/CPAN-Meta-YAML/lib/CPAN/Meta/YAML.pm
patching file cpan/CPAN-Meta/lib/CPAN/Meta/Merge.pm
patching file cpan/CPAN-Meta/lib/CPAN/Meta/Prereqs.pm
patching file cpan/JSON-PP/lib/JSON/PP.pm
patching file dist/Data-Dumper/Dumper.pm
substituteStream() in derivation perl-armv7l-unknown-linux-gnueabihf-5.38.2: WARNING: '--replace' is deprecated, use --replace-{fail,warn,quiet}. (file 'dist/PathTools/Cwd.pm')
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
Running phase: updateAutotoolsGnuConfigScriptsPhase
Updating Autotools / GNU config script to a newer upstream version: ./cnf/config.sub
Updating Autotools / GNU config script to a newer upstream version: ./cnf/config.guess
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
Running phase: updateAutotoolsGnuConfigScriptsPhase
Updating Autotools / GNU config script to a newer upstream version: ./cnf/config.sub
Updating Autotools / GNU config script to a newer upstream version: ./cnf/config.guess
@nix { "action": "setPhase", "phase": "configurePhase" }
Running phase: configurePhase
patching script interpreter paths in ./configure
./configure: interpreter directive changed from "#!/bin/sh" to "/nix/store/516kai7nl5dxr792c0nzq0jp8m4zvxpi-bash-5.2p32/bin/sh"
configure flags: --prefix=/nix/store/58dlkipysfbzhy7a26ybqz6k50c6z42s-perl-armv7l-unknown-linux-gnueabihf-5.38.2 -Dlibpth=\"\" -Dglibpth=\"\" -Ddefault_inc_excludes_dot -Uinstallusrbinperl -Dinstallstyle=lib/perl5 -Dlocincpth=/nix/store/7q6zk0i66x9hjmnp038gb1kcyyrbjbix-glibc-armv7l-unknown-linux-gnueabihf-2.39-52-dev/include -Dloclibpth=/nix/store/p4x6r60syz75p03zbwwsqcp48v4113xm-glibc-armv7l-unknown-linux-gnueabihf-2.39-52/lib -Dusethreads --build=x86_64-unknown-linux-gnu --host=armv7l-unknown-linux-gnueabihf --target=armv7l-unknown-linux-gnueabihf
Guessing build platform ... x86_64-unknown-linux-gnu
Guessing target architecture ... armv7l-unknown-linux-gnueabihf
Respawning configure for build and target platforms

Configuring build-time miniperl for x86_64-unknown-linux-gnu (x86_64-unknown-linux-gnu)
Checking perl version ... perl5-5.38.2
... lots of checking
11:52:08
@conbruno:matrix.orgconbrunoit wont let me paste all11:52:14
@conbruno:matrix.orgconbrunoI will post it later11:56:07
@k900:0upti.meK900Pastebin12:11:09
@conbruno:matrix.orgconbruno
In reply to @k900:0upti.me
Pastebin
I have trouble obtaining clean output. If I redirect the output of nix-store -l .... I get ANSI and hyperlinks embedded in the resulting file.
18:44:07
@k900:0upti.meK900That just means this is what the program is actually outputting18:44:34
@conbruno:matrix.orgconbrunowhen just use nix-store -l and read on the terminal it looks like this: sv_inline.h:536:1: warning: 'always_inline' function might not be inlinable [-Wattributes] 536 | Perl_newSV_type_mortal(pTHX_ const svtype type) but when I rediret to a file it looks like this: ^[[01m^[[Ksv_inline.h:536:1:^[[m^[[K ^[[01;35m^[[Kwarning: ^[[m^[[K'^[[01m^[[Kalways_inline^[[m^[[K' function might not> 536 | ^[[01;35m^[[KPerl_newSV_type_mortal^[[m^[[K(pTHX_ const svtype type) | ^[[01;35m^[[K^~~~~~~~~~~~~~~~~~~~~~^[[m^[[K and on windows like this: sv_inline.h:536:1: warning: 'always_inline' function might not be inlinable []8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wattributes-Wattributes]8;;] 536 | Perl_newSV_type_mortal(pTHX_ const svtype type) | ^~~~~~~~~~~~~~~~~~~~~~18:48:28
@conbruno:matrix.orgconbruno nix-store -l /nix/store/gzf7cxdnlm8jy0xhil6930p2684yjs4m-perl-armv7l-unknown-linux-gnueabihf-5.38.2.drv > stdout.txt 18:48:53
@conbruno:matrix.orgconbrunoIt contains less garbage when I also redirect stderr18:49:18
@conbruno:matrix.orgconbruno *

when just use nix-store -l and read on the terminal it looks like this:

sv\_inline.h:536:1: warning: 'always\_inline' function might not be inlinable \[-Wattributes\]
  536 | Perl\_newSV\_type\_mortal(pTHX\_ const svtype type)

but when I rediret to a file it looks like this:
^\[\[01m^\[\[Ksv\_inline.h:536:1:^\[\[m^\[\[K ^\[\[01;35m^\[\[Kwarning: ^\[\[m^\[\[K'^\[\[01m^\[\[Kalways\_inline^\[\[m^\[\[K' function might not> 536 | ^\[\[01;35m^\[\[KPerl\_newSV\_type\_mortal^\[\[m^\[\[K(pTHX\_ const svtype type) | ^\[\[01;35m^\[\[K^~~~~~~~~~~~~~~~~~~~~~^\[\[m^\[\[K

and on windows like this:

\[01m\[Ksv\_inline.h:536:1:\[m\[K \[01;35m\[Kwarning: \[m\[K'\[01m\[Kalways\_inline\[m\[K' function might not be inlinable \[\[01;35m\[K\]8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wattributes-Wattributes\]8;;\[m\[K\]
  536 | \[01;35m\[KPerl\_newSV\_type\_mortal\[m\[K(pTHX\_ const svtype type)
      | \[01;35m\[K^~~~~~~~~~~~~~~~~~~~~~\[m\[K
18:50:02
@conbruno:matrix.orgconbruno *

when just use nix-store -l and read on the terminal it looks like this:

sv\_inline.h:536:1: warning: 'always\_inline' function might not be inlinable \[-Wattributes\]
  536 | Perl\_newSV\_type\_mortal(pTHX\_ const svtype type)

but when I rediret to a file it looks like this:

^\[\[01m^\[\[Ksv\_inline.h:536:1:^\[\[m^\[\[K ^\[\[01;35m^\[\[Kwarning: ^\[\[m^\[\[K'^\[\[01m^\[\[Kalways\_inline^\[\[m^\[\[K' function might not>  536 | ^\[\[01;35m^\[\[KPerl\_newSV\_type\_mortal^\[\[m^\[\[K(pTHX\_ const svtype type)                                                  | ^\[\[01;35m^\[\[K^~~~~~~~~~~~~~~~~~~~~~^\[\[m^\[\[K

and on windows like this:

\[01m\[Ksv\_inline.h:536:1:\[m\[K \[01;35m\[Kwarning: \[m\[K'\[01m\[Kalways\_inline\[m\[K' function might not be inlinable \[\[01;35m\[K\]8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wattributes-Wattributes\]8;;\[m\[K\]
  536 | \[01;35m\[KPerl\_newSV\_type\_mortal\[m\[K(pTHX\_ const svtype type)
      | \[01;35m\[K^~~~~~~~~~~~~~~~~~~~~~\[m\[K
18:50:26
@conbruno:matrix.orgconbruno *

when just use nix-store -l and read on the terminal it looks like this:

sv\_inline.h:536:1: warning: 'always\_inline' function might not be inlinable \[-Wattributes\]
  536 | Perl\_newSV\_type\_mortal(pTHX\_ const svtype type)

but when I rediret to a file it looks like this:

^[[01m^[[Ksv_inline.h:536:1:^[[m^[[K ^[[01;35m^[[Kwarning: ^[[m^[[K'^[[01m^[[Kalways_inline^[[m^[[K' function might not> 536 | ^[[01;35m^[[KPerl_newSV_type_mortal^[[m^[[K(pTHX_ const svtype type) | ^[[01;35m^[[K^~~~~~~~~~~~~~~~~~~~~~^[[m^[[K

and on windows like this:

\[01m\[Ksv\_inline.h:536:1:\[m\[K \[01;35m\[Kwarning: \[m\[K'\[01m\[Kalways\_inline\[m\[K' function might not be inlinable \[\[01;35m\[K\]8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wattributes-Wattributes\]8;;\[m\[K\]
  536 | \[01;35m\[KPerl\_newSV\_type\_mortal\[m\[K(pTHX\_ const svtype type)
      | \[01;35m\[K^~~~~~~~~~~~~~~~~~~~~~\[m\[K
18:50:48
@paparodeo:matrix.orgreno i usually just pipe thru ansi2txt to remove the ansi codes. 18:53:01
@k900:0upti.meK900
In reply to@conbruno:matrix.org

when just use nix-store -l and read on the terminal it looks like this:

sv\_inline.h:536:1: warning: 'always\_inline' function might not be inlinable \[-Wattributes\]
  536 | Perl\_newSV\_type\_mortal(pTHX\_ const svtype type)

but when I rediret to a file it looks like this:

^[[01m^[[Ksv_inline.h:536:1:^[[m^[[K ^[[01;35m^[[Kwarning: ^[[m^[[K'^[[01m^[[Kalways_inline^[[m^[[K' function might not> 536 | ^[[01;35m^[[KPerl_newSV_type_mortal^[[m^[[K(pTHX_ const svtype type) | ^[[01;35m^[[K^~~~~~~~~~~~~~~~~~~~~~^[[m^[[K

and on windows like this:

\[01m\[Ksv\_inline.h:536:1:\[m\[K \[01;35m\[Kwarning: \[m\[K'\[01m\[Kalways\_inline\[m\[K' function might not be inlinable \[\[01;35m\[K\]8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wattributes-Wattributes\]8;;\[m\[K\]
  536 | \[01;35m\[KPerl\_newSV\_type\_mortal\[m\[K(pTHX\_ const svtype type)
      | \[01;35m\[K^~~~~~~~~~~~~~~~~~~~~~\[m\[K
Yes, because your terminal interprets those ^[ magic sequences
18:53:47
@conbruno:matrix.orgconbruno I just wanted to give you a clean file, piping through ansi2txt fixed everything. I tried sed 's/\x1B\[[0-9;]*[mK]//g' | wl-copy but it still had the gcc hyperlinks 18:55:48
@conbruno:matrix.orgconbrunohttps://pastebin.com/B2YZYavA18:57:35
@conbruno:matrix.orgconbruno
In reply to @conbruno:matrix.org
https://pastebin.com/B2YZYavA

This is the output I got when I tried to crosscompile this sd-image.nix

{ lib, ... }: {
  nixpkgs.buildPlatform = "x86_64-linux";
  nixpkgs.hostPlatform = "armv7l-linux";
  imports = [
    <nixpkgs/nixos/modules/installer/sd-card/sd-image-armv7l-multiplatform.nix>
  ];

# config
  boot.supportedFilesystems.zfs = lib.mkForce false;
  system.stateVersion = "24.05";
  # Enable the OpenSSH daemon.
  services.openssh.settings = {
    enable = true;
    PasswordAuthentication = true;
  };
}

I just wanted to learn how to dig deeper when such a problem occurs.

19:01:23
@conbruno:matrix.orgconbruno
In reply to @conbruno:matrix.org
https://pastebin.com/B2YZYavA
*

This is the output I got when I tried to crosscompile this sd-image.nix

{ lib, ... }: {
  nixpkgs.buildPlatform = "x86_64-linux";
  nixpkgs.hostPlatform = "armv7l-linux";
  imports = [
    <nixpkgs/nixos/modules/installer/sd-card/sd-image-armv7l-multiplatform.nix>
  ];

# config
  boot.supportedFilesystems.zfs = lib.mkForce false;
  system.stateVersion = "24.05";
  # Enable the OpenSSH daemon.
  services.openssh.settings = {
    enable = true;
    PasswordAuthentication = true;
  };
}

I just wanted to learn how to dig deeper when such a problem (perl fails to build) occurs.

19:02:01
@artturin:matrix.orgArtturin

I just wanted to learn how to dig deeper when such a problem (perl fails to build) occurs.

You'd build the offending derivation with --keep-failed and then inspect for any logs or clues

19:12:23

Show newer messages


Back to Room ListRoom Version: 6