Open OPNA2608 opened 1 year ago
All the steps seem to have been outlined at https://discourse.nixos.org/t/getting-started-with-nix-on-ppc64le/12712/17 (7 days ago)
The steps for getting nix
set up, yes. You can't actually build any packages with that natively until at least the stdenv
-relevant problems in this issue are addressed though.
@OPNA2608
End desire is
user@talos:~$ sudo sh <(curl -L https://nixos.org/nix/install) --no-daemon
[sudo] password for user:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 4052 100 4052 0 0 8327 0 --:--:-- --:--:-- --:--:-- 263k
/dev/fd/63: sorry, there is no binary distribution of Nix for your platform
user@talos:~$ curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
nix-installer: unknown CPU type: ppc64le
To work.
1) Different platform: powerpc64 vs powerpc64le 2) Code responsible for that is not here: https://github.com/NixOS/nix/blob/b83a2fb6dd58ac1648812a71c1eeda33672476d4/flake.nix#L262 3) My end desire in this ticket is for
$ nix-build -A hello
error: evaluation aborted with the following error message: 'unsupported platform for the pure Linux stdenv'
to work (which afaik already works for powerpc64le)
A tracking issue? Roadmap? TODO list? Notes? of sorts for things that need to be handled in order to get Nixpkgs¹ working natively on
powerpc64-linux
(the big-endian variant, notpowerpc64le-linux
). I could immediately bulk-submit PRs for all of these (and some more issues I already debugged a year ago during a previous effort), but submitting fixes for a not-yet-functioningstdenv
feels abit silly.The following things need to be addressed for
stdenv
to build & work. I would consider this issue "done" and closable once these are done, as anything afterstdenv
can just be fixed incrementally. No need to keep this ticket open for all eternity. :slightly_smiling_face:powerpc64-linux
is broken, preventing cross-compiledfreshBootstrapTools.bootstrapFiles
from being usable. Waiting for https://github.com/NixOS/nixpkgs/pull/247682 to fix this.bootstrapFiles
to be added forpowerpc64-linux
so native bootstrapping can begin. Previous attempt: https://github.com/NixOS/nixpkgs/pull/177001 Current attempt: https://github.com/NixOS/nixpkgs/pull/255451openssl
needs aconfigureScript
entry to be added forpowerpc64-linux
, otherwise it warns about & attempts to do a 32-bit build. RequiredconfigureScript
:"./Configure linux-ppc64"
https://github.com/NixOS/nixpkgs/pull/295268pcre
needs a patch from Void Linux for its tests to pass for me: void-linux/void-packages:srcpkgs/pcre/patches/ppc-icache-flush.patch From the patch comments, this one might be due to the age of my CPU (POWER4)? Haven't checked ifpcre2
has the same problem. https://github.com/NixOS/nixpkgs/pull/295442These are some additional problems I've encountered after reaching
stdenv
and attempting to build my way up so some graphical applications. I'll document things here as I encounter them while the above list isn't done, just so I don't forget about them. Oncestdenv
works on master, I'll just submit PRs for these & future problems.llvmPackages*.llvm
: AllMCJIT
andOrcMCJIT
tests fail. (I haven't actually tested anyllvm
other than the default one due to long compile times, but with a failure this massive I don't see how this could be version-specific.) Currently just disablingdoCheck
, not sure about the why's & how's on this.openexr
&openexr_3
: Hitting all the same test failures as https://github.com/AcademySoftwareFoundation/openexr/issues/1175, and ones reported in other upstream issues over the years. Will disable the tests since it doesn't look like full fixes for these are in sight, although I wonder ifopenexr*
in general isbroken
on big-endian and should instead just be marked as such?tpm2-tss
: Same unit tests failures as reported upstream on s390x (https://github.com/tpm2-software/tpm2-tss/issues/2531), but additionally all integration tests get stuck in a retry loop and eventually time out. Haven't looked into what's going on with the integration tests yet, but same thoughts on this as withopenexr
: Disabling tests for now, but possibly more of abroken
situation.Example of a failing integration test
``` ERROR: test/integration/sys-asymmetric-encrypt-decrypt ====================================================== Trying to start simulator mssim Starting simulator on port 2218 successfully started daemon: tpm_server with PID: 95717 /build/source simulator PID: 95717 Port conflict? Cleaning up PID: 95717 ./script/int-log-compiler-common.sh: line 246: kill: (95717) - No such process Failed to start simulator: port 2218 or 2219 probably in use. Retrying in 2. Starting simulator on port 15806 successfully started daemon: tpm_server with PID: 95767 /build/source simulator PID: 95767 Port conflict? Cleaning up PID: 95767 ./script/int-log-compiler-common.sh: line 246: kill: (95767) - No such process Failed to start simulator: port 15806 or 15807 probably in use. Retrying in 4. Starting simulator on port 30400 successfully started daemon: tpm_server with PID: 95799 /build/source simulator PID: 95799 Port conflict? Cleaning up PID: 95799 ./script/int-log-compiler-common.sh: line 246: kill: (95799) - No such process Failed to start simulator: port 30400 or 30401 probably in use. Retrying in 8. Starting simulator on port 31390 successfully started daemon: tpm_server with PID: 95831 /build/source simulator PID: 95831 Port conflict? Cleaning up PID: 95831 ./script/int-log-compiler-common.sh: line 246: kill: (95831) - No such process Failed to start simulator: port 31390 or 31391 probably in use. Retrying in 16. Starting simulator on port 6842 successfully started daemon: tpm_server with PID: 95863 /build/source simulator PID: 95863 Port conflict? Cleaning up PID: 95863 ./script/int-log-compiler-common.sh: line 246: kill: (95863) - No such process Failed to start simulator: port 6842 or 6843 probably in use. Retrying in 32. Starting simulator on port 59214 successfully started daemon: tpm_server with PID: 95895 /build/source simulator PID: 95895 Port conflict? Cleaning up PID: 95895 ./script/int-log-compiler-common.sh: line 246: kill: (95895) - No such process Failed to start simulator: port 59214 or 59215 probably in use. Retrying in 64. TPM20TEST_TCTI_NAME=socket TPM20TEST_DEVICE_FILE= TPM20TEST_SOCKET_ADDRESS=127.0.0.1 TPM20TEST_SOCKET_PORT=59214 TPM20TEST_TCTI=mssim:host=127.0.0.1,port=59214 WARNING:tcti:src/util/io.c:262:socket_connect() Failed to connect to host 127.0.0.1, port 59214: errno 111: Connection refused Failed to initialize tcti context: 0xa000a TPM_StartUp failed ./script/int-log-compiler-common.sh: line 195: kill: (95895) - No such process failed to kill daemon process with PID: 95895 ERROR test/integration/sys-asymmetric-encrypt-decrypt.int (exit status: 99) ```¹: My dream would be NixOS on
powerpc64-linux
via a USB installer image, but that's definitely a separate thing to tackle (and something I've never dabbled into before).