From a2f375d0ef4c98c51ed600fd25d7ef9294b0efec Mon Sep 17 00:00:00 2001 From: Konstantin Shabanov Date: Thu, 30 Jul 2026 21:19:39 +0700 Subject: [PATCH] nix: native: Fix gcc(-freestanding)-install Provide ACLOCAL_PATH explicitly to avoid the error: + autoreconf2.69 -fvi -I/mnt/redox/recipes/dev/gcc13/source/config -I/usr/share/aclocal + for f in $(find . -name configure.ac -o -name configure.in -type f | sort) ++ dirname ./zlib/contrib/minizip/configure.ac + echo '* autotools regen in '\''./zlib/contrib/minizip'\''...' * autotools regen in './zlib/contrib/minizip'... ++ dirname ./zlib/contrib/minizip/configure.ac + cd ./zlib/contrib/minizip + autoreconf2.69 -fvi -I/mnt/redox/recipes/dev/gcc13/source/config -I/usr/share/aclocal Makefile.am:1: error: Libtool library used but 'LIBTOOL' is undefined Makefile.am:1: The usual way to define 'LIBTOOL' is to add 'LT_INIT' Makefile.am:1: to 'configure.ac' and run 'aclocal' and 'autoconf' again. Makefile.am:1: Makefile.am:1: If 'LT_INIT' is in 'configure.ac', make sure Makefile.am:1: its definition is in aclocal's search path. Makefile.am:1: Makefile.am:1: If you install Automake in its own prefix, Makefile.am:1: you'll need to arrange for the Libtool m4 files Makefile.am:1: to be found by aclocal. For info on this, see: Makefile.am:1: https://gnu.org/s/automake/manual/automake.html#Libtool-library-used-but-LIBTOOL-is-undefined autoreconf: automake failed with exit status: 1 cook host:gcc13 - failed Failed to run [cd "recipes/dev/gcc13/source" && "bash" "-ex"]: exited with status exit status: 1 make: *** [mk/prefix.mk:250: prefix/x86_64-unknown-redox/gcc-freestanding-install] Error 1 missing LT_INIT --- mk/prefix.mk | 4 +++- recipes/dev/gcc13/recipe.toml | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/mk/prefix.mk b/mk/prefix.mk index c282d1dcc..efe1edf5d 100644 --- a/mk/prefix.mk +++ b/mk/prefix.mk @@ -249,6 +249,7 @@ else mkdir -p "$@.partial" $(PREFIX)/relibc-freestanding-install/$(GNU_TARGET)/include export $(PREFIX_CONFIG) PATH="$(ROOT)/$(PREFIX)/libtool-install/bin:$(ROOT)/$(PREFIX)/binutils-install/bin:$$PATH" \ COOKBOOK_LIBTOOL_DIR=$(ROOT)/$(PREFIX)/libtool-install COOKBOOK_CROSS_TARGET=$(TARGET) COOKBOOK_CROSS_GNU_TARGET=$(GNU_TARGET) \ + ACLOCAL_PATH=$(ROOT)/$(PREFIX)/libtool-install/share/aclocal:$$ACLOCAL_PATH \ COOKBOOK_HOST_SYSROOT=/usr COOKBOOK_CROSS_SYSROOT=$(ROOT)/$(PREFIX)/relibc-freestanding-install/$(GNU_TARGET) && \ $(REPO_BIN) cook host:gcc13 cp -r "$(GCC_TARGET)/stage/usr/". "$@.partial" @@ -304,7 +305,8 @@ else rm -f "$@.partial"/$(GNU_TARGET)/lib/libstdc++.la rm -f "$@.partial"/$(GNU_TARGET)/lib/libsupc++.la # hosted libstdcxx - export PATH="$(ROOT)/$@.partial/bin:$$PATH" && \ + export PATH="$(ROOT)/$@.partial/bin:$$PATH" \ + ACLOCAL_PATH="$(ROOT)/$(PREFIX)/libtool-install/share/aclocal:$$ACLOCAL_PATH" && \ export $(PREFIX_CONFIG) "COOKBOOK_HOST_SYSROOT=$(ROOT)/$@.partial" COOKBOOK_CROSS_TARGET=$(HOST_TARGET) && \ rm -rf "$(LIBSTDCXX_TARGET)/stage" && $(REPO_BIN) cook libstdcxx-v3 cp -r "$(LIBSTDCXX_TARGET)/stage/usr/". "$@.partial/$(GNU_TARGET)" diff --git a/recipes/dev/gcc13/recipe.toml b/recipes/dev/gcc13/recipe.toml index 7cfa74503..5b408a9f1 100644 --- a/recipes/dev/gcc13/recipe.toml +++ b/recipes/dev/gcc13/recipe.toml @@ -7,6 +7,7 @@ DYNAMIC_INIT COOKBOOK_AUTORECONF=autoreconf2.69 autotools_recursive_regenerate -I"$(realpath ./config)" LIBTOOL_BUILD_AUX="${COOKBOOK_LIBTOOL_DIR:-$COOKBOOK_HOST_SYSROOT}"/share/libtool/build-aux cp -fpv "$LIBTOOL_BUILD_AUX"/{config.sub,config.guess,install-sh} libiberty/ +cp -fpv "$LIBTOOL_BUILD_AUX"/{config.sub,config.guess,install-sh} zlib/contrib/minizip/ """ [build]