-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
Gnum4 blocks package build on armv7 architectures #211120
Comments
FWIW, cross-build builds something.
One thing I may suggest is to try is to build |
Thank you very much for your suggestion ! I will give it a try. I do think that the situation is not optimal : building on the host platform ought to be self-standing. |
I would guess that autoconf tries to run the configure script which's shebang is not patched. Maybe I can test this with binfmt or so. |
I tried to preproduce this locally with |
I tried the PR on the native host platform and it failed. But I do not have sandbox on. Given the comment of @KAction, it's not surprising that it would cross build with or without your PR. Are you cross-building or natively building ? |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/nix-on-armv7l-fails-to-build-any-packge/16819/5 |
@TheSirC please apply the following patch and send the output of those 2 commands in i suspect /bin/sh is for the wrong arch (problem with the bootstrap files?) diff --git a/pkgs/development/tools/misc/gnum4/default.nix b/pkgs/development/tools/misc/gnum4/default.nix
index 34df06ad0f4..b03796c91a8 100644
--- a/pkgs/development/tools/misc/gnum4/default.nix
+++ b/pkgs/development/tools/misc/gnum4/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchurl }:
+{ lib, stdenv, fetchurl, file }:
# Note: this package is used for bootstrapping fetchurl, and thus
# cannot use fetchpatch! All mutable patches (generated by GitHub or
@@ -19,6 +19,13 @@ stdenv.mkDerivation rec {
doCheck = false;
+ nativeBuildInputs = [ file ];
+ preConfigure = ''
+ ls /bin
+ file /bin/sh
+ exit
+ '';
+
configureFlags = [ "--with-syscmd-shell=${stdenv.shell}" ]
++ lib.optional stdenv.hostPlatform.isMinGW "CFLAGS=-fno-stack-protector"; |
"Funny" enough, with this patch it is one of the dependencies ( last 8 log lines:
> unpacking sources
> unpacking source archive /nix/store/3yhi12pgsmv2dz0x2ialvjw51lnv4jw8-zlib-1.2.13.tar.gz
> source root is zlib-1.2.13
> setting SOURCE_DATE_EPOCH to timestamp 1665637615 of file zlib-1.2.13/zlib.h
> patching sources
> configuring
> configure flags: --prefix=/nix/store/6kp535mzdkbipnnwsabi89pzqdb5bx8r-zlib-1.2.13 --static --shared
> /nix/store/irpiwq1zc4m0gpjfn0jnk1n8d2wm6fb5-bootstrap-stage1-stdenv-linux/setup: ./configure: /bin/sh: bad interpreter: No such file or directory |
the file output for /bin/bash in bootstrap tools is
dont know if its correct |
That's not really supported for linux and some build failures are expected without the sandbox. |
I am in the process of patching a bunch of shebangs in the dependency tree... I got more than a dozen that needed massaging but I am not sure it will help in the end...
Are you doing this on
So you mean, using Nix not on NixOS one should always be using the sandbox option ? |
there's some other issue and the /bin/sh issue is just a symptom of it
There shouldn't be a difference
the sandbox option is true for linux (when installed in multi-user mode) by default https://nixos.org/manual/nix/stable/command-ref/conf-file.html#conf-sandbox did you turn it off? if not then its on, if you did turn it off then turn it on |
I am on Linux so it should be turned on by default then (and I did not turn it off)... still I am seeing the behavior described.
Seems there is though...
What do you suggest ? I must say I am really puzzled by all of this... |
send the output of these 3
do both of these work
|
/nix/store/cvzil995dqk628n017d02s1zaa6fjh4i-bootstrap-tools
/nix/store/cvzil995dqk628n017d02s1zaa6fjh4i-bootstrap-tools
"armv7l-linux"
Yes but I am unsure of if it is because of my patches... |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: |
I just ran into this issue on a raspberry pi 3B+ that is running raspbian 32bit. Probably not that useful of information, but I get all of the same results for #211120 (comment) I also had left it running with the sandbox off overnight, but not sure if that actually fixed anything. Right now, the system is running super slow as it is trying to compile gcc. Maybe it is a workaround after a long wait for things to compile from source? |
Describe the bug
The package gnum4 prevents any package to be built on armv7.
Steps To Reproduce
Steps to reproduce the behavior:
nix-shell -p hello
for example)Expected behavior
gnum4 should not error on build.
Additional context
The bug seems to have been documented before here since Dec 2021.
It seems to be build as a dependency to
bash
Notify maintainers
@Artturin (you seem to be the last one to modify it)
@civodul
@volth
@KAction
@RasmusRendal
@SuperSandro2000
@edolstra
Metadata
attribute: gnum4
I wish I could run
nix-shell -p nix-info --run "nix-info -m"
but read the description.nixpkgs commit : a21493d
nix version : 2.12.0
The text was updated successfully, but these errors were encountered: