| 28 Nov 2021 |
sterni | but usually pkgsBuildBuild / depsBuildBuild would be clearer | 14:44:20 |
sterni | since buildPackages.buildPackages rather reflects on bootstrapping would be my intuition | 14:44:49 |
| 2 Dec 2021 |
| wucke13 joined the room. | 22:32:43 |
wucke13 | I want to package a 32 bit x86 microkernel (L4RE) in a flake. On compiling with multiStdenv I hit the following error:
/nix/store/js66s0xwjnzg0ggi2lq9bcvlk6x2za13-binutils-2.35.2/bin/ld: relocatable linking with relocations from format elf32-i386 (crti_s.o) to format elf64-x86-64 (crti.o) is not supported
What might be going on there?
| 22:35:38 |
wucke13 | * I want to package a 32 bit x86 microkernel (L4RE) in a flake. On compiling with multiStdenv.mkDerivation I hit the following error:
/nix/store/js66s0xwjnzg0ggi2lq9bcvlk6x2za13-binutils-2.35.2/bin/ld: relocatable linking with relocations from format elf32-i386 (crti_s.o) to format elf64-x86-64 (crti.o) is not supported
What might be going on there?
Edit:
When I use pkgsi686Linux.stdenv.mkDerivation instead I takes longer for the compilation to fail, and I get the following error:
ERROR: ld.so: object 'libgendep.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
| 22:44:29 |
trofi | ldpreload failure is probably not critical | 22:54:18 |
wucke13 | True, good catch! | 23:01:36 |
| 4 Dec 2021 |
John Ericson | wucke13: you should just contribute L4RE to Nixpkgs | 17:27:58 |
John Ericson | I want more kernels in it :) | 17:28:00 |
John Ericson | and not bother with flakes | 17:28:01 |
John Ericson | flakes and cross compilation is very frustrating right now | 17:28:06 |
wucke13 | That would be lovely. Maybe I can convince one of the kernkonzept guys to help with it. However, the current build process is really not so nice for packaging in nix. They use one call to make to prepare a build directory (much like a configure script) and then another kall make to configure everything (using menuconfig 🙄) and then a third call to make to build the kernel. The same story for the os. And then a final call to make to build the actual image for one particular configuration. | 17:30:51 |
wucke13 | And at least some of these call require that the previous build directory is writable, thus it's not like every call to make just creates a new derivation, which then are chained. | 17:31:23 |
wucke13 | * That would be lovely. Maybe I can convince one of the kernkonzept guys to help with it. However, the current build process is really not so nice for packaging in nix. They use one call to make to prepare a build directory (much like a configure script) and then another call make to configure everything (using menuconfig 🙄) and then a third call to make to build the kernel. The same story for the os. And then a final call to make to build the actual image for one particular configuration. | 17:33:58 |
John Ericson | wucke13: You can just do it all in one big derivation, but yeah, sounds annoying | 17:45:54 |
alexfmpe | you can just copy the previous output into a tmp folder and make that writable no? | 17:46:34 |
John Ericson | I fine these projects that are conceptually mini distributions of multiple packages with some non-trivial bootstrapping tend to always do bad hand-rolled solution | 17:46:34 |
wucke13 | I would much much like to decouple both for build times. Using parallel building on fairly nice 8 core machine I still need more than 3 minutes to compile kernel and os | 17:46:41 |
alexfmpe | probably going to bloat the nix store a bit with all the intermediates | 17:46:45 |
wucke13 | In reply to @alexfmpe:matrix.org you can just copy the previous output into a tmp folder and make that writable no? How exactly would you make it writable? | 17:47:18 |
John Ericson | Err you don't? | 17:47:25 |
John Ericson | You just copy the stuff from the store into each derivation's temp scratch space and do more stuff there | 17:47:48 |
wucke13 | The copied stuff, of course not the original residing in the nix store | 17:47:54 |
John Ericson | oh just chmod it! | 17:48:07 |
John Ericson | or cp --no-preserverve-thinnggy | 17:48:19 |
wucke13 | should u+rw suffice? | 17:48:20 |
John Ericson | (I forget exact name) | 17:48:31 |
John Ericson | I would do +rw | 17:48:41 |
John Ericson | there is only one user | 17:48:46 |
John Ericson | in the sandbox | 17:49:00 |