!ayCRiZriCVtuCUpeLp:nixos.org

Nix Cross Compiling

579 Members
129 Servers

Load older messages


SenderMessageTime
13 Oct 2021
@janne.hess:helsinki-systems.deJanne Heßoh we can't cross-compile perl?15:46:16
@sternenseemann:systemli.orgsternioh hm we can15:46:46
@sternenseemann:systemli.orgsterniah we can't compile it statically? iirc15:46:57
@sternenseemann:systemli.orgsterniseems like git can't be cross compiled with perlSupport rather15:47:38
@sternenseemann:systemli.orgsterniso no gitFull for me15:47:59
@janne.hess:helsinki-systems.deJanne Heß

Thanks, your hints worked \o/
So the trick is to use

((import <nixpkgs> {}).pkgsCross.aarch64-multiplatform.nixos /tmp/lal.nix ).config.system.build.toplevel

and then the minimal configuration:

{ boot.loader.grub.enable = false; fileSystems."/".device = "tmpfs"; }
15:49:32
@janne.hess:helsinki-systems.deJanne Heß *

Thanks, your hints worked \o/
So the trick is to use

((import <nixpkgs> {}).pkgsCross.aarch64-multiplatform.nixos /tmp/lal.nix).config.system.build.toplevel

and then the minimal configuration:

{ boot.loader.grub.enable = false; fileSystems."/".device = "tmpfs"; }
15:49:55
@janne.hess:helsinki-systems.deJanne HeßLet's see if it builds from a stock nixpkgs…15:51:11
@sternenseemann:systemli.orgsterni alternatively you can pass crossSystem to nixpkgs 15:51:15
@sternenseemann:systemli.orgsterniI think you can set the system in the configuration as well, but not quite sure15:51:39
@janne.hess:helsinki-systems.deJanne HeßAh yes there's nixpkgs.config I think… but if it works like this I'm happy (or rather Alyssa because I don't break her setup again)15:52:20
15 Oct 2021
@janne.hess:helsinki-systems.deJanne Heß left the room.09:42:35
17 Oct 2021
@trofi:matrix.orgtrofi How does one portably detects musl to work on nixos? gnulib assumes that --host= has musl substring: https://git.savannah.gnu.org/cgit/gnulib.git/tree/m4/musl.m4#n16 13:40:56
@trofi:matrix.orgtrofi But nixpkgs does not have a habit of passing --host=, as a result icnov() wrappers in gnulib break occasionally: https://git.savannah.gnu.org/cgit/gnulib.git/tree/lib/unicodeio.c#n151 13:42:16
@trofi:matrix.orgtrofi iconv() idiosyncrasy seems to be intentional: https://wiki.musl-libc.org/functional-differences-from-glibc.html#iconv 13:52:47
@sternenseemann:systemli.orgsterni trofi: configurePlatforms = [ "build" "host" ]; will pass --host as desired 14:26:10
@trofi:matrix.orgtrofiAh, nice. That should be cleaner than https://github.com/NixOS/nixpkgs/pull/141210/commits/0c0ed6f143c66fa10ddf3db24c02889f28d4cd4d.14:27:25
@trofi:matrix.orgtrofiWas about to ask why those don't get passed unconditionall, but the TODO is already there :) https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/make-derivation.nix#L58-L6114:33:15
@mars:jupiterbroadcasting.commars joined the room.19:03:15
18 Oct 2021
@trofi:matrix.orgtrofi

I'd like to update locally a bootstrap binary tarball for musl (to make pkgsMusl use current versions of musl & co.). Can I do it from a glibc system?

I tried as nix build -f pkgs/stdenv/linux/make-bootstrap-tools.nix --arg localSystem '{ config = "x86_64-unknown-linux-gnu"; libc = "musl"; }', but it seems to pass --build=x86_64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu to bison.

06:58:28
@trofi:matrix.orgtrofi Gah, I forgot to fix actual tuple /o. nix build -f pkgs/stdenv/linux/make-bootstrap-tools.nix --arg localSystem '{ config = "x86_64-unknown-linux-musl"; libc = "musl"; }' seems to do the trick. Is it how original tarballs are (or should be) generated? 07:10:41
@trofi:matrix.orgtrofiOne step deeper into bison's failure on musl: https://github.com/NixOS/nixpkgs/issues/14206608:43:38
@trofi:matrix.orgtrofiWhich include order is correct?08:43:55
@joe:monoid.aljoe left the room.11:46:27
20 Oct 2021
@rick:matrix.ciphernetics.nlRick (Mindavi)Hmm, librsvg cross-compiling broke again since they added rsvg-convert -- it fails with a linker error after a lengthy build :(16:48:09
@phaer:matrix.orgphaer joined the room.21:01:34
@phaer:matrix.orgphaer left the room.21:01:40
@sternenseemann:systemli.orgsterniis there a reliable way to distinguish between a tuple and triple when parsing a platform specification?21:13:43
@sternenseemann:systemli.orgsterni the problem is that you can't just split on - and count the parts 21:14:07
@sternenseemann:systemli.orgsterni because of stuff like armv7a-linux-androideabi 21:14:21

Show newer messages


Back to Room ListRoom Version: 6