Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cross-compiling nixos for armv6l failing to build File-ShareDir #112173

Closed
ilyakooo0 opened this issue Feb 6, 2021 · 6 comments · Fixed by #110908 or #112095
Closed

Cross-compiling nixos for armv6l failing to build File-ShareDir #112173

ilyakooo0 opened this issue Feb 6, 2021 · 6 comments · Fixed by #110908 or #112095
Labels
0.kind: bug Something is broken 6.topic: cross-compilation Building packages on a different platform than they will be used on

Comments

@ilyakooo0
Copy link
Contributor

Describe the bug

I am trying to cross-compile nixos for the raspberry pi. Trying to do so leads to an error while trying to build /nix/store/7x07kg9jvw7y1zxl2crk7lv4d73hmv0a-perl5.32.0-File-ShareDir-1.116-armv6l-unknown-linux-gnueabihf.drv.

The error is this:

Can't load module IO, dynamic loading not available in this perl.
  (You may need to build a new perl executable which either supports
  dynamic loading or has the IO module statically linked into it.)
 at /nix/store/gjikgqfwbfgdavg5cm2nl2isgqj9xzwf-perl-5.32.0-armv6l-unknown-linux-gnueabihf/lib/perl5/5.32.0/armv6l-linux/IO/Handle.pm line 268.
Compilation failed in require at /nix/store/gjikgqfwbfgdavg5cm2nl2isgqj9xzwf-perl-5.32.0-armv6l-unknown-linux-gnueabihf/lib/perl5/5.32.0/armv6l-linux/IO/Handle.pm line 268.
BEGIN failed--compilation aborted at /nix/store/gjikgqfwbfgdavg5cm2nl2isgqj9xzwf-perl-5.32.0-armv6l-unknown-linux-gnueabihf/lib/perl5/5.32.0/armv6l-linux/IO/Handle.pm line 268.
Compilation failed in require at /nix/store/gjikgqfwbfgdavg5cm2nl2isgqj9xzwf-perl-5.32.0-armv6l-unknown-linux-gnueabihf/lib/perl5/5.32.0/armv6l-linux/IO/Seekable.pm line 100.
BEGIN failed--compilation aborted at /nix/store/gjikgqfwbfgdavg5cm2nl2isgqj9xzwf-perl-5.32.0-armv6l-unknown-linux-gnueabihf/lib/perl5/5.32.0/armv6l-linux/IO/Seekable.pm line 100.
Compilation failed in require at /nix/store/gjikgqfwbfgdavg5cm2nl2isgqj9xzwf-perl-5.32.0-armv6l-unknown-linux-gnueabihf/lib/perl5/5.32.0/armv6l-linux/IO/File.pm line 132.
BEGIN failed--compilation aborted at /nix/store/gjikgqfwbfgdavg5cm2nl2isgqj9xzwf-perl-5.32.0-armv6l-unknown-linux-gnueabihf/lib/perl5/5.32.0/armv6l-linux/IO/File.pm line 132.
Compilation failed in require at inc/latest/private.pm line 10.
BEGIN failed--compilation aborted at inc/latest/private.pm line 10.
Compilation failed in require at inc/latest.pm line 5.
Compilation failed in require at Makefile.PL line 18.
BEGIN failed--compilation aborted at Makefile.PL line 18.

I am using the nix expression from this repository: https://github.com/ilyakooo0/rasnixos.

To Reproduce
Steps to reproduce the behavior:

  1. git clone https://github.com/ilyakooo0/rasnixos.git
  2. cd rasnixos
  3. nix-build -j auto --argstr system x86_64-linux

Expected behavior
Everything builds without error.

@ilyakooo0 ilyakooo0 added the 0.kind: bug Something is broken label Feb 6, 2021
@veprbl veprbl added the 6.topic: cross-compilation Building packages on a different platform than they will be used on label Feb 6, 2021
@kira-bruneau
Copy link
Contributor

kira-bruneau commented Feb 7, 2021

This is the same problem reported in mobile-nixos/mobile-nixos#284, but a fix still hasn't been found. I'll try to bisect the commit that introduced this regression.

@kira-bruneau
Copy link
Contributor

kira-bruneau commented Feb 7, 2021

I narrowed down the regression to a0d34c7. It looks like the new buildInputs are the cause of the failure. Before that File-ShareDir wasn't a dependency. @stigtsp, @samueldr.

@stigtsp
Copy link
Member

stigtsp commented Feb 7, 2021

Hi!

a0d34c7 was reverted by 33fd415 (in #110908) it's currently in staging-next. I hope this fixes the issue.

@kira-bruneau
Copy link
Contributor

Thanks for the heads up @stigtsp! I was able cross compile with a0d34c7 reverted, so it should be fixed once it's merged to master.

@flokli
Copy link
Contributor

flokli commented Feb 8, 2021

This also affects aarch64 cross compilation:

builder for '/nix/store/g3bacm74bdrk1pga8smxja10rh1g508b-perl5.32.0-File-ShareDir-1.118-aarch64-unknown-linux-gnu.drv' failed with exit code 255
# running Build.PL --prefix /nix/store/fnn2l9mp4b4jl1ainvk9ah50dlwmdqin-perl5.32.0-Module-Build-0.4231-aarch64-unknown-linux-gnu --installdirs site --config perl=/nix/store/6i92b6cwh4hqhykjc723wpvav8xqkhin-perl-5.32.0-aarch64-unknown-linux-gnu-mini/bin/perl --fullperl "/nix/store/n76dvh71a0kmbh1nxgf0x3n82cmiqvvk-perl-5.32.0/bin/perl"
Checking prerequisites...
  test_requires:
    !  Couldn't find a $VERSION in prerequisite File::Temp

Checking optional features...
inc_bundling_support....disabled
  requires:
    ! inc::latest is not installed

ERRORS/WARNINGS FOUND IN PREREQUISITES.  You may wish to install the versions
of the modules indicated above before proceeding with this installation

Attempt to reload Scalar/Util.pm aborted.
Compilation failed in require at /nix/store/2bm3hqd4cvrjks5vlmps7d4mz2awgw8j-perl-5.32.0-aarch64-unknown-linux-gnu/lib/perl5/5.32.0/aarch64-linux/Data/Dumper.pm line 304.
Couldn't run Build.PL: No such file or directory at lib/Module/Build/Compat.pm line 341.
builder for '/nix/store/4ga0br1ylnflgn08f64xc2kyvlz6hd7k-perl5.32.0-Module-Build-0.4231-aarch64-unknown-linux-gnu.drv' failed with exit code 2

@flokli flokli changed the title Corss-compiling nixos for armv6l failing to build File-ShareDir Cross-compiling nixos for armv6l failing to build File-ShareDir Feb 9, 2021
@korfuri
Copy link

korfuri commented Jul 22, 2022

It seems that 3edf750 reintroduced the breakage. That commit was immediately followed by 6308561 which is a security update, so I'm assuming it's not a good idea to revert. I'm poking at this now but I'm very unfamiliar with Perl, so I opened #182502 to follow up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken 6.topic: cross-compilation Building packages on a different platform than they will be used on
Projects
None yet
6 participants