!ayCRiZriCVtuCUpeLp:nixos.org

Nix Cross Compiling

579 Members
129 Servers

Load older messages


SenderMessageTime
28 Nov 2021
@sternenseemann:systemli.orgsternibut usually pkgsBuildBuild / depsBuildBuild would be clearer14:44:20
@sternenseemann:systemli.orgsternisince buildPackages.buildPackages rather reflects on bootstrapping would be my intuition14:44:49
2 Dec 2021
@wucke13:matrix.orgwucke13 joined the room.22:32:43
@wucke13:matrix.orgwucke13

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:matrix.orgwucke13 *

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:matrix.orgtrofildpreload failure is probably not critical22:54:18
@wucke13:matrix.orgwucke13True, good catch!23:01:36
4 Dec 2021
@Ericson2314:matrix.orgJohn Ericson wucke13: you should just contribute L4RE to Nixpkgs 17:27:58
@Ericson2314:matrix.orgJohn EricsonI want more kernels in it :)17:28:00
@Ericson2314:matrix.orgJohn Ericsonand not bother with flakes17:28:01
@Ericson2314:matrix.orgJohn Ericsonflakes and cross compilation is very frustrating right now17:28:06
@wucke13:matrix.orgwucke13That 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:matrix.orgwucke13And 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:matrix.orgwucke13 * 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
@Ericson2314:matrix.orgJohn Ericson wucke13: You can just do it all in one big derivation, but yeah, sounds annoying 17:45:54
@alexfmpe:matrix.orgalexfmpeyou can just copy the previous output into a tmp folder and make that writable no?17:46:34
@Ericson2314:matrix.orgJohn EricsonI fine these projects that are conceptually mini distributions of multiple packages with some non-trivial bootstrapping tend to always do bad hand-rolled solution17:46:34
@wucke13:matrix.orgwucke13I 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 os17:46:41
@alexfmpe:matrix.orgalexfmpeprobably going to bloat the nix store a bit with all the intermediates17:46:45
@wucke13:matrix.orgwucke13
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
@Ericson2314:matrix.orgJohn EricsonErr you don't?17:47:25
@Ericson2314:matrix.orgJohn EricsonYou just copy the stuff from the store into each derivation's temp scratch space and do more stuff there17:47:48
@wucke13:matrix.orgwucke13The copied stuff, of course not the original residing in the nix store17:47:54
@Ericson2314:matrix.orgJohn Ericsonoh just chmod it!17:48:07
@Ericson2314:matrix.orgJohn Ericsonor cp --no-preserverve-thinnggy17:48:19
@wucke13:matrix.orgwucke13should u+rw suffice?17:48:20
@Ericson2314:matrix.orgJohn Ericson(I forget exact name)17:48:31
@Ericson2314:matrix.orgJohn EricsonI would do +rw17:48:41
@Ericson2314:matrix.orgJohn Ericsonthere is only one user17:48:46
@Ericson2314:matrix.orgJohn Ericsonin the sandbox17:49:00

Show newer messages


Back to Room ListRoom Version: 6