I have created a custom derivation that includes a binary build of python that we build locally. It works when run from the nix shell, but fails when launching from the installPhase for my derivation - only on Linux.
EXPECTED_RESULT: I am able to launch the binary from the installPhase so that I can add more python modules to the installation
ACTUAL_RESULT: without strace I get the error: "required file not found" from the installPhase shell. With strace, execve(...) cannot find the python binary - either way I cannot run it.
Operating system:
bash-4.2$ uname -a
Linux sc-dbc9900 3.10.0-1160.95.1.el7.x86_64 #1 SMP Mon Jul 24 13:59:37 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
bash-4.2$ cat /etc/os-release
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
Describe the bug
I have created a custom derivation that includes a binary build of python that we build locally. It works when run from the nix shell, but fails when launching from the installPhase for my derivation - only on Linux.
EXPECTED_RESULT: I am able to launch the binary from the installPhase so that I can add more python modules to the installation ACTUAL_RESULT: without strace I get the error: "required file not found" from the installPhase shell. With strace, execve(...) cannot find the python binary - either way I cannot run it.
Operating system:
bash-4.2$ uname -a Linux sc-dbc9900 3.10.0-1160.95.1.el7.x86_64 #1 SMP Mon Jul 24 13:59:37 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux bash-4.2$ cat /etc/os-release NAME="CentOS Linux" VERSION="7 (Core)" ID="centos" ID_LIKE="rhel fedora" VERSION_ID="7" PRETTY_NAME="CentOS Linux 7 (Core)" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:centos:centos:7" HOME_URL="https://www.centos.org/" BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-7" CENTOS_MANTISBT_PROJECT_VERSION="7" REDHAT_SUPPORT_PRODUCT="centos" REDHAT_SUPPORT_PRODUCT_VERSION="7"
Steps To Reproduce
Steps to reproduce the behavior:
EXPECTED_RESULT: Binary should launch ACTUAL_RESULT: Required file not found.
Expected behavior
Fully patched binaries should be launchable from the install phase
Screenshots
Additional context
It seems that somehow the executable loader for the operating system cannot see the /nix/store somehow during the installPhase.
Here is the full source for my derivation:
Unfortunately, you cannot run this derivation because it uses an internal build system to source the outputs.
Notify maintainers
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.NOTE: I am using nixos-23.05 as the source nix distribution pinned at: SHA: 475d5ae2c4cb87b904545bdb547af05681198fcc