Skip to content

Build failure on NixOS #29

Open
Open

Description

@fenhl

I'm trying to build the toolchain from source on NixOS. The ./install_deps script doesn't recognize NixOS, so I'm using these dependencies:

flake.nix
{
    inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/*.tar.gz";
    outputs = attrs: let
        supportedSystems = [
            "aarch64-darwin"
            "aarch64-linux"
            "x86_64-darwin"
            "x86_64-linux"
        ];
        forEachSupportedSystem = f: attrs.nixpkgs.lib.genAttrs supportedSystems (system: f {
            pkgs = import attrs.nixpkgs { inherit system; };
        });
    in {
        devShells = forEachSupportedSystem ({ pkgs, ... }: {
            default = pkgs.mkShell {
                packages = with pkgs; [
                    wget
                    gnutar
                    gnumake
                    diffutils
                    texinfo
                    gcc
                    lua5_3
                    zlib
                    jansson
                    libusb1
                    gmp
                ];
            };
        });
    };
}

I ran these commands:

$ nix develop -c ./configure --prefix=/mnt/september-shared/git-stages/github.com/OoTRandomizer/OoT-Randomizer/ASM/tools
$ nix develop -c make toolchain-all

The ./configure command succeeded with the following output:

stdout
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... none needed
checking for a BSD-compatible install... /nix/store/hqkszxk2c0cxvd04xa4gsaqs182dw8l2-coreutils-9.8/bin/install -c
checking for strip... strip
checking install -s... /nix/store/hqkszxk2c0cxvd04xa4gsaqs182dw8l2-coreutils-9.8/bin/install -c --strip-program=strip -s
checking for a race-free mkdir -p... /nix/store/hqkszxk2c0cxvd04xa4gsaqs182dw8l2-coreutils-9.8/bin/mkdir -p
checking for curl... curl
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking whether byte ordering is bigendian... no
checking for library containing pow... -lm
checking for library containing luaopen_utf8... -llua
checking for library containing zlibVersion... -lz
checking for library containing libusb_init... -lusb-1.0
checking for library containing libusb_set_option... none required
checking for library containing openpty... none required
checking for library containing gai_strerrorA... no
checking for lua5.4/lua.h... no
checking for lua54/lua.h... no
checking for lua5.3/lua.h... no
checking for lua53/lua.h... no
checking for lua.h... yes
checking for zlib.h... yes
checking for libusb-1.0/libusb.h... yes
checking for libusb.h... no
checking for pty.h... yes
checking for util.h... no
checking for libutil.h... no
checking for gcc options needed to detect all undeclared functions... none needed
checking whether asprintf is declared... yes
checking binutils version... binutils-2.46.0
checking gcc version... gcc-16.1.0
checking newlib version... newlib-4.6.0.20260123
checking gdb version... gdb-17.2
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/ed64rdb/Makefile
config.status: creating src/gfxdis/Makefile
config.status: creating src/grc/Makefile
config.status: creating src/libgru/Makefile
config.status: creating src/libgs/Makefile
config.status: creating src/luapatch/Makefile
config.status: creating src/config.h
stderr
warning: Git tree '/home/fenhl/git/github.com/glankk/n64/main' is dirty

The make toolchain-all command failed with code 2 and the following output:

stdout

stderr
warning: Git tree '/home/fenhl/git/github.com/glankk/n64/main' is dirty
  % Total    % Received % Xferd  Average Speed  Time    Time    Time   Current
                                 Dload  Upload  Total   Spent   Left   Speed

  0      0   0      0   0      0      0      0                              0
  1 27.22M   1 296.3k   0      0 296.6k      0   01:33           01:33 296.6k
 23 27.22M  23  6.43M   0      0  3.21M      0   00:08   00:02   00:06  3.21M
 53 27.22M  53 14.62M   0      0  4.87M      0   00:05   00:02   00:03  4.87M
 85 27.22M  85 23.25M   0      0  5.81M      0   00:04   00:03   00:01  5.81M
100 27.22M 100 27.22M   0      0  6.13M      0   00:04   00:04          5.81M
100 27.22M 100 27.22M   0      0  6.13M      0   00:04   00:04          5.81M
100 27.22M 100 27.22M   0      0  6.13M      0   00:04   00:04          5.81M
  % Total    % Received % Xferd  Average Speed  Time    Time    Time   Current
                                 Dload  Upload  Total   Spent   Left   Speed

  0      0   0      0   0      0      0      0                              0
  1 97.70M   1  1.70M   0      0  1.68M      0   00:58   00:01   00:57  1.68M
 10 97.70M  10 10.69M   0      0  5.31M      0   00:18   00:02   00:16  5.31M
 18 97.70M  18 18.43M   0      0  6.11M      0   00:15   00:03   00:12  6.11M
 27 97.70M  27 26.74M   0      0  6.66M      0   00:14   00:04   00:10  6.66M
 36 97.70M  36 35.35M   0      0  7.05M      0   00:13   00:05   00:08  7.05M
 45 97.70M  45 44.09M   0      0  7.33M      0   00:13   00:06   00:07  8.48M
 54 97.70M  54 52.90M   0      0  7.54M      0   00:12   00:07   00:05  8.44M
 63 97.70M  63 61.70M   0      0  7.70M      0   00:12   00:08   00:04  8.66M
 71 97.70M  71 70.33M   0      0  7.80M      0   00:12   00:09   00:03  8.72M
 80 97.70M  80 79.06M   0      0  7.90M      0   00:12   00:10   00:02  8.75M
 89 97.70M  89 87.87M   0      0  7.98M      0   00:12   00:11   00:01  8.76M
 98 97.70M  98 96.67M   0      0  8.05M      0   00:12   00:12          8.76M
100 97.70M 100 97.70M   0      0  8.06M      0   00:12   00:12          8.76M
100 97.70M 100 97.70M   0      0  8.06M      0   00:12   00:12          8.76M
100 97.70M 100 97.70M   0      0  8.06M      0   00:12   00:12          8.76M
2026-05-25 02:21:46 URL:https://gcc.gnu.org/pub/gcc/infrastructure/gettext-0.22.tar.gz [26105696/26105696] -> "gettext-0.22.tar.gz" [1]
2026-05-25 02:21:47 URL:https://gcc.gnu.org/pub/gcc/infrastructure/gmp-6.3.0.tar.bz2 [2643888/2643888] -> "gmp-6.3.0.tar.bz2" [1]
2026-05-25 02:21:49 URL:https://gcc.gnu.org/pub/gcc/infrastructure/mpfr-4.2.2.tar.bz2 [1753999/1753999] -> "mpfr-4.2.2.tar.bz2" [1]
2026-05-25 02:21:50 URL:https://gcc.gnu.org/pub/gcc/infrastructure/mpc-1.3.1.tar.gz [773573/773573] -> "mpc-1.3.1.tar.gz" [1]
2026-05-25 02:21:51 URL:https://gcc.gnu.org/pub/gcc/infrastructure/isl-0.24.tar.bz2 [2261594/2261594] -> "isl-0.24.tar.bz2" [1]
  % Total    % Received % Xferd  Average Speed  Time    Time    Time   Current
                                 Dload  Upload  Total   Spent   Left   Speed

  0      0   0      0   0      0      0      0                              0
 10  8.78M  10 937.2k   0      0 938.0k      0   00:09           00:09 938.1k
 97  8.78M  97  8.60M   0      0  4.30M      0   00:02   00:01   00:01  4.30M
100  8.78M 100  8.78M   0      0  4.29M      0   00:02   00:02          4.30M
100  8.78M 100  8.78M   0      0  4.29M      0   00:02   00:02          4.30M
100  8.78M 100  8.78M   0      0  4.29M      0   00:02   00:02          4.30M
  % Total    % Received % Xferd  Average Speed  Time    Time    Time   Current
                                 Dload  Upload  Total   Spent   Left   Speed

  0      0   0      0   0      0      0      0                              0
  6 23.51M   6  1.43M   0      0  1.43M      0   00:16           00:16  1.43M
 43 23.51M  43 10.31M   0      0  5.16M      0   00:04   00:01   00:03  5.16M
 76 23.51M  76 18.08M   0      0  6.03M      0   00:03   00:02   00:01  6.03M
100 23.51M 100 23.51M   0      0  6.42M      0   00:03   00:03          6.03M
100 23.51M 100 23.51M   0      0  6.42M      0   00:03   00:03          6.03M
100 23.51M 100 23.51M   0      0  6.42M      0   00:03   00:03          6.03M
configure: WARNING: using in-tree isl, disabling version check
*** This configuration is not supported in the following subdirectories:
     target-libgomp target-libatomic target-libitm target-libsanitizer target-libvtv target-libphobos target-libgcobol gnattools gotools libgrust target-libada target-libga68 target-zlib target-libbacktrace target-libgfortran target-libgo target-libffi target-libgm2 target-libobjc target-libgrust
    (Any other directories should still work fine.)
/home/fenhl/git/github.com/glankk/n64/main/gcc-16.1.0/../binutils-2.46.0/bfd/configure: line 7308: /usr/bin/file: No such file or directory
/home/fenhl/git/github.com/glankk/n64/main/gcc-16.1.0/zlib/configure: line 6768: /usr/bin/file: No such file or directory
ar: `u' modifier ignored since `D' is the default (see `U')
/home/fenhl/git/github.com/glankk/n64/main/gcc-16.1.0/../binutils-2.46.0/libsframe/configure: line 7717: /usr/bin/file: No such file or directory
libtool: link: warning: `-version-info/-version-number' is ignored for convenience libraries
/home/fenhl/git/github.com/glankk/n64/main/gcc-16.1.0/../binutils-2.46.0/opcodes/configure: line 7057: /usr/bin/file: No such file or directory
/home/fenhl/git/github.com/glankk/n64/main/gcc-16.1.0/../binutils-2.46.0/binutils/configure: line 7205: /usr/bin/file: No such file or directory
configure: WARNING: libdebuginfod is missing or some features may be unavailable.
configure: WARNING: libdebuginfod is missing or unusable; some features may be unavailable.
/home/fenhl/git/github.com/glankk/n64/main/gcc-16.1.0/../binutils-2.46.0/gas/configure: line 6900: /usr/bin/file: No such file or directory
/home/fenhl/git/github.com/glankk/n64/main/gcc-16.1.0/../binutils-2.46.0/libctf/configure: line 9750: /usr/bin/file: No such file or directory
libtool: link: warning: `-version-info/-version-number' is ignored for convenience libraries
libtool: link: warning: `-version-info/-version-number' is ignored for convenience libraries
../../gcc-16.1.0/../binutils-2.46.0/binutils/prdbg.c: In function ‘tg_class_baseclass’:
../../gcc-16.1.0/../binutils-2.46.0/binutils/prdbg.c:2220:7: error: ‘free’ called on a pointer to an unallocated object ‘18446744073709551610’ [-Werror=free-nonheap-object]
 2220 |       free (t);
      |       ^~~~~~~~
../../gcc-16.1.0/../binutils-2.46.0/binutils/prdbg.c: In function ‘pr_class_baseclass’:
../../gcc-16.1.0/../binutils-2.46.0/binutils/prdbg.c:1311:7: error: ‘free’ called on a pointer to an unallocated object ‘18446744073709551610’ [-Werror=free-nonheap-object]
 1311 |       free (t);
      |       ^~~~~~~~
cc1: all warnings being treated as errors
make[5]: *** [Makefile:1220: prdbg.o] Error 1
make[4]: *** [Makefile:1446: all-recursive] Error 1
make[3]: *** [Makefile:889: all] Error 2
make[2]: *** [Makefile:4288: all-binutils] Error 2
make[1]: *** [Makefile:1101: all] Error 2
make: *** [Makefile:214: toolchain-all] Error 2

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions