!ayCRiZriCVtuCUpeLp:nixos.org

Nix Cross Compiling

555 Members
117 Servers

You have reached the beginning of time (for this room).


SenderMessageTime
22 Jul 2025
@neobrain:matrix.org@neobrain:matrix.orgIs it possible to use nix to install a cross-compiling GCC (including libstdc++) targeting a non-nix runtime environment (i.e. using the host libc and reading libraries from /usr/lib)?08:39:50
@neobrain:matrix.org@neobrain:matrix.org(I'm assuming this would be equivalent to compiling gcc without any nix-specific patches, which is probably easier said than done)08:40:53
@neobrain:matrix.org@neobrain:matrix.org* Is it possible to use nix to install a cross-compiling GCC (including libstdc++) targeting a non-nix runtime environment (i.e. using the host libc and reading libraries from /usr/lib instead of referencing the nix store)?08:42:01
23 Jul 2025
@implr:hackerspace.plimplr set a profile picture.10:57:42
@implr:hackerspace.plimplr changed their profile picture.11:22:01
24 Jul 2025
@greg:thehellings.comGreg HellingsI've used it to build Windows binaries, so I'm sure what you're asking for is possible. There are lots of targets under the pkgsCross collection, including Android, many flavors of BSD, Windows, Darwin, and more.04:07:35
@artturin:matrix.orgArtturin
In reply to @neobrain:matrix.org
(I'm assuming this would be equivalent to compiling gcc without any nix-specific patches, which is probably easier said than done)
https://trofi.github.io/posts/289-building-vanilla-gcc-on-nixos.html
08:34:15
@neobrain:matrix.org@neobrain:matrix.orgThanks, I'll have to play around with that!19:58:39
25 Jul 2025
@vuks:matrix.orgVuks joined the room.18:01:51
26 Jul 2025
@oak:universumi.fioak 🏳️‍🌈♥️ changed their profile picture.08:27:11
27 Jul 2025
@quadradical:federated.nexusQuadRadical (Ping) changed their display name from QuadRadical (Ping / Reply) to QuadRadical (Ping).19:57:24
28 Jul 2025
@ytr:tchncs.deytr set a profile picture.10:06:36
1 Aug 2025
@skoove:catgirl.cloudskoove changed their profile picture.08:08:51
@skoove:catgirl.cloudskoove changed their profile picture.08:08:55
6 Aug 2025
@firefly:raccoon.collegeFireFly joined the room.07:16:50
@quadradical:federated.nexusQuadRadical (Ping) Alrighty, another cross compile error :)
error: builder for '/nix/store/wlf1hfax3y1qb1z246qc0hvznq9r5nbv-bind-aarch64-unknown-linux-gnu-9.20.11.drv' failed with exit code 1;
       last 25 log lines:
       > checking for library containing backtrace_symbols... none required
       > checking for backtrace_symbols... yes
       > checking for IPv6 structures... yes
       > checking for strlcpy... yes
       > checking for strlcat... yes
       > checking for strnstr... no
       > checking for libedit... no
       > checking for libeditline... no
       > checking for readline... no
       > checking for chroot... yes
       > checking for libcap... yes
       > checking for tzset... yes
       > checking for optarg declaration... yes
       > checking for st_mtim.tv_nsec... yes
       > checking for if_nametoindex... yes
       > checking for uchar.h... yes
       > checking compiler support for __builtin_unreachable()... yes
       > checking compiler support for __builtin_clz... yes
       > checking compiler support for __builtin_add_overflow()... yes
       > checking compiler support for __builtin_sub_overflow()... yes
       > checking compiler support for __builtin_mul_overflow()... yes
       > checking for libfstrm libprotobuf-c... yes
       > checking for fstrm_capture... no
       > checking for protoc-c... no
       > configure: error: protoc-c compiler not found
       For full logs, run 'nix log /nix/store/wlf1hfax3y1qb1z246qc0hvznq9r5nbv-bind-aarch64-unknown-linux-gnu-9.20.11.drv'.
error: 1 dependencies of derivation '/nix/store/qmw9hxybmr6wpn5l5fzac19154a87f3y-bind-aarch64-unknown-linux-gnu-9.20.11_fish-completions.drv' failed to build
error: 1 dependencies of derivation '/nix/store/khaqk99n0qvsgimcwv0xccm5idkdrrjc-man-paths.drv' failed to build
error: 1 dependencies of derivation '/nix/store/4xkzi9cgaymn3b6hv8zciz54hhkpr3gk-system-path.drv' failed to build
error (ignored): error: cannot unlink 'ruby-3.3.8' in directory '/nix/var/nix/builds/nix-build-ruby-aarch64-unknown-linux-gnu-3.3.8.drv-0': Directory not empty
error: 1 dependencies of derivation '/nix/store/j4pa68jw1j8hlz0arrslhwkrwn48rsk3-etc.drv' failed to build
error: 1 dependencies of derivation '/nix/store/zffzw9njkqvnjzcln3zmq28nvq5jqq6g-nixos-system-quadphone-25.11.20250803.5b09dc4.drv' failed to build
error (ignored): error: cannot unlink 'man' in directory '/nix/var/nix/builds/nix-build-systemd-minimal-aarch64-unknown-linux-gnu-257.6.drv-0/source': Directory not empty
error: 1 dependencies of derivation '/nix/store/j4mmybnicx5jrdz9glzq1nac0pm05s21-image.drv' failed to build
Any ideas? Thanks :D
17:52:05

Show newer messages


Back to Room ListRoom Version: 6