koreader / koxtoolchain

Build script for various toolchains used by KOReader
59 stars 22 forks source link

Seemingly fails to build on aarch64 Linux #37

Closed tux-linux closed 1 month ago

tux-linux commented 1 year ago

Hello, I'm trying to build this on an Apple Silicon Mac with a Linux VM virtualized on it (Arch Linux ARM). I get the following error:

Error ``` [build@inkbox koxtoolchain]$ ./gen-tc.sh kobo [*] Building CrossTool-NG . . . [-] ct-ng git repo: https://github.com/NiLuJe/crosstool-ng.git [-] ct-ng commit hash: 3e2d99d030cbecc0119aa08bd06d062f59669d45 [-] compiling with 9 parallel jobs [-] toolchain target: arm-kobo-linux-gnueabihf ~/inkbox/compiled-binaries/koxtoolchain/build ~/inkbox/compiled-binaries/koxtoolchain Cloning into 'CT-NG'... remote: Enumerating objects: 43642, done. remote: Counting objects: 100% (16/16), done. remote: Compressing objects: 100% (12/12), done. remote: Total 43642 (delta 5), reused 10 (delta 4), pack-reused 43626 Receiving objects: 100% (43642/43642), 15.79 MiB | 2.27 MiB/s, done. Resolving deltas: 100% (27855/27855), done. ~/inkbox/compiled-binaries/koxtoolchain/build/CT-NG ~/inkbox/compiled-binaries/koxtoolchain/build ~/inkbox/compiled-binaries/koxtoolchain From https://github.com/NiLuJe/crosstool-ng * [new branch] 1.1 -> origin/1.1 * [new branch] 1.10 -> origin/1.10 * [new branch] 1.11 -> origin/1.11 * [new branch] 1.12 -> origin/1.12 * [new branch] 1.13 -> origin/1.13 * [new branch] 1.14 -> origin/1.14 * [new branch] 1.15 -> origin/1.15 * [new branch] 1.16 -> origin/1.16 * [new branch] 1.17 -> origin/1.17 * [new branch] 1.18 -> origin/1.18 * [new branch] 1.19 -> origin/1.19 * [new branch] 1.2 -> origin/1.2 * [new branch] 1.20 -> origin/1.20 * [new branch] 1.21 -> origin/1.21 * [new branch] 1.22 -> origin/1.22 * [new branch] 1.23-kindle -> origin/1.23-kindle * [new branch] 1.24-kindle -> origin/1.24-kindle * [new branch] 1.25-koreader -> origin/1.25-koreader * [new branch] 1.3 -> origin/1.3 * [new branch] 1.4 -> origin/1.4 * [new branch] 1.5 -> origin/1.5 * [new branch] 1.6 -> origin/1.6 * [new branch] 1.7 -> origin/1.7 * [new branch] 1.8 -> origin/1.8 * [new branch] 1.9 -> origin/1.9 * [new branch] kindle -> origin/kindle * [new branch] master -> origin/master Note: switching to '3e2d99d030cbecc0119aa08bd06d062f59669d45'. You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by switching back to a branch. If you want to create a new branch to retain commits you create, you may do so (now or later) by using -c with the switch command. Example: git switch -c Or undo this operation with: git switch - Turn off this advice by setting config variable advice.detachedHead to false HEAD is now at 3e2d99d0 *sigh* INFO :: *** Generating package version descriptions INFO :: Master packages: android-ndk autoconf automake avr-libc binutils bison cloog dtc duma elf2flt expat gcc gdb gettext glibc-ports glibc gmp gnuprumcu isl libelf libiconv libtool linux ltrace m4 make mingw-w64 moxiebox mpc mpfr musl ncurses newlib-nano newlib picolibc strace uClibc zlib INFO :: Generating 'config/versions/android-ndk.in' INFO :: Generating 'config/versions/autoconf.in' INFO :: Generating 'config/versions/automake.in' INFO :: Generating 'config/versions/avr-libc.in' INFO :: Generating 'config/versions/binutils.in' INFO :: Generating 'config/versions/bison.in' INFO :: Generating 'config/versions/cloog.in' INFO :: Generating 'config/versions/dtc.in' INFO :: Generating 'config/versions/duma.in' INFO :: Generating 'config/versions/elf2flt.in' INFO :: Generating 'config/versions/expat.in' INFO :: Generating 'config/versions/gcc.in' INFO :: Generating 'config/versions/gdb.in' INFO :: Generating 'config/versions/gettext.in' INFO :: Generating 'config/versions/glibc-ports.in' INFO :: Generating 'config/versions/glibc.in' INFO :: Generating 'config/versions/gmp.in' INFO :: Generating 'config/versions/gnuprumcu.in' INFO :: Generating 'config/versions/isl.in' INFO :: Generating 'config/versions/libelf.in' INFO :: Generating 'config/versions/libiconv.in' INFO :: Generating 'config/versions/libtool.in' INFO :: Generating 'config/versions/linux.in' INFO :: Generating 'config/versions/ltrace.in' INFO :: Generating 'config/versions/m4.in' INFO :: Generating 'config/versions/make.in' INFO :: Generating 'config/versions/mingw-w64.in' INFO :: Generating 'config/versions/moxiebox.in' INFO :: Generating 'config/versions/mpc.in' INFO :: Generating 'config/versions/mpfr.in' INFO :: Generating 'config/versions/musl.in' INFO :: Generating 'config/versions/ncurses.in' INFO :: Generating 'config/versions/newlib-nano.in' INFO :: Generating 'config/versions/newlib.in' INFO :: Generating 'config/versions/picolibc.in' INFO :: Generating 'config/versions/strace.in' INFO :: Generating 'config/versions/uClibc.in' INFO :: Generating 'config/versions/zlib.in' INFO :: *** Generating menu/choice selections INFO :: Generating arch.in (choice) INFO :: Generating kernel.in (choice) INFO :: Generating cc.in (choice) INFO :: Generating binutils.in (choice) INFO :: Generating libc.in (choice) INFO :: Generating debug.in (menu) INFO :: Generating comp_tools.in (menu) INFO :: Generating comp_libs.in (menu) INFO :: *** Gathering the list of data files to install INFO :: *** Running autoreconf perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LANG = "en_US.UTF-8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LANG = "en_US.UTF-8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LANG = "en_US.UTF-8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LANG = "en_US.UTF-8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). configure.ac:96: warning: AC_PROG_LEX without either yywrap or noyywrap is obsolete ./lib/autoconf/programs.m4:716: _AC_PROG_LEX is expanded from... ./lib/autoconf/programs.m4:709: AC_PROG_LEX is expanded from... configure.ac:96: the top level configure.ac:293: warning: The macro `AC_HEADER_STDC' is obsolete. configure.ac:293: You should run autoupdate. ./lib/autoconf/headers.m4:704: AC_HEADER_STDC is expanded from... configure.ac:293: the top level perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LANG = "en_US.UTF-8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LANG = "en_US.UTF-8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LANG = "en_US.UTF-8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LANG = "en_US.UTF-8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). INFO :: *** Done! checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a race-free mkdir -p... /usr/bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking how to create a pax tar archive... gnutar checking whether make supports nested variables... (cached) yes checking whether to enable maintainer-specific portions of Makefiles... yes checking build system type... aarch64-unknown-linux-gnu checking host system type... aarch64-unknown-linux-gnu checking whether ln -s works... yes checking whether install takes --strip-program option... yes checking for ggrep... no checking for grep... grep checking for absolute path to grep... /usr/bin/grep checking for gegrep... no checking for egrep... egrep checking for absolute path to egrep... /usr/bin/egrep checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for sed... /usr/bin/sed checking for GNU sed >= 4.0... yes checking for gcc... gcc checking whether the C compiler works... no configure: error: in `/home/build/inkbox/compiled-binaries/koxtoolchain/build/CT-NG': configure: error: C compiler cannot create executables See `config.log' for more details [build@inkbox koxtoolchain]$ cat build/CT-NG/config.log This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by crosstool-NG configure 1.24.0.519_3e2d99d, which was generated by GNU Autoconf 2.71. Invocation command line was $ ./configure --prefix=/home/build/inkbox/compiled-binaries/koxtoolchain/build/CT_NG_BUILD ## --------- ## ## Platform. ## ## --------- ## hostname = inkbox uname -m = aarch64 uname -r = 6.2.10-1-aarch64-ARCH uname -s = Linux uname -v = #1 SMP PREEMPT_DYNAMIC Fri Apr 7 10:32:52 MDT 2023 /usr/bin/uname -p = unknown /bin/uname -X = unknown /bin/arch = unknown /usr/bin/arch -k = unknown /usr/convex/getsysinfo = unknown /usr/bin/hostinfo = unknown /bin/machine = unknown /usr/bin/oslevel = unknown /bin/universe = unknown PATH: /home/build/x-tools/arm-kobo-linux-gnueabihf/bin/ PATH: /usr/lib/code-server/lib/vscode/bin/remote-cli/ PATH: /usr/local/sbin/ PATH: /usr/local/bin/ PATH: /usr/bin/ PATH: /usr/bin/site_perl/ PATH: /usr/bin/vendor_perl/ PATH: /usr/bin/core_perl/ ## ----------- ## ## Core tests. ## ## ----------- ## configure:2876: looking for aux files: config.rpath compile config.guess config.sub missing install-sh configure:2889: trying ./scripts/ configure:2918: ./scripts/config.rpath found configure:2918: ./scripts/compile found configure:2918: ./scripts/config.guess found configure:2918: ./scripts/config.sub found configure:2918: ./scripts/missing found configure:2900: ./scripts/install-sh found configure:3055: checking for a BSD-compatible install configure:3128: result: /usr/bin/install -c configure:3139: checking whether build environment is sane configure:3194: result: yes configure:3353: checking for a race-free mkdir -p configure:3397: result: /usr/bin/mkdir -p configure:3404: checking for gawk configure:3425: found /usr/bin/gawk configure:3436: result: gawk configure:3447: checking whether make sets $(MAKE) configure:3470: result: yes configure:3500: checking whether make supports nested variables configure:3518: result: yes configure:3593: checking how to create a pax tar archive configure:3604: tar --version tar (GNU tar) 1.34 Copyright (C) 2021 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later . This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by John Gilmore and Jay Fenlason. configure:3607: $? = 0 configure:3647: tardir=conftest.dir && eval tar --format=posix -chf - "$tardir" >conftest.tar configure:3650: $? = 0 configure:3654: tar -xf - . | This is free software: you are free to change and redistribute it. | There is NO WARRANTY, to the extent permitted by law. | | Written by Jay Fenlason, Tom Lord, Ken Pizzini, | Paolo Bonzini, Jim Meyering, and Assaf Gordon. | | This sed program was built without SELinux support. | | GNU sed home page: . | General help using GNU software: . | E-mail bug reports to: . configure:4636: result: /usr/bin/sed configure:4639: checking for GNU sed >= 4.0 configure:4643: result: yes configure:4743: checking for gcc configure:4764: found /usr/bin/gcc configure:4775: result: gcc configure:5128: checking for C compiler version configure:5137: gcc --version >&5 gcc (GCC) 12.1.0 Copyright (C) 2022 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. configure:5148: $? = 0 configure:5137: gcc -v >&5 Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/aarch64-unknown-linux-gnu/12.1.0/lto-wrapper Target: aarch64-unknown-linux-gnu Configured with: /build/gcc/src/gcc/configure --enable-languages=c,c++,fortran,go,lto,objc,obj-c++ --enable-bootstrap --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://github.com/archlinuxarm/PKGBUILDs/issues --with-linker-hash-style=gnu --with-system-zlib --enable-__cxa_atexit --enable-checking=release --enable-clocale=gnu --enable-default-pie --enable-default-ssp --enable-gnu-indirect-function --enable-gnu-unique-object --enable-linker-build-id --enable-lto --enable-plugin --enable-shared --enable-threads=posix --disable-libssp --disable-libstdcxx-pch --disable-multilib --disable-werror --host=aarch64-unknown-linux-gnu --build=aarch64-unknown-linux-gnu --with-arch=armv8-a --enable-fix-cortex-a53-835769 --enable-fix-cortex-a53-843419 Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 12.1.0 (GCC) configure:5148: $? = 0 configure:5137: gcc -V >&5 gcc: error: unrecognized command-line option '-V' gcc: fatal error: no input files compilation terminated. configure:5148: $? = 1 configure:5137: gcc -qversion >&5 gcc: error: unrecognized command-line option '-qversion'; did you mean '--version'? gcc: fatal error: no input files compilation terminated. configure:5148: $? = 1 configure:5137: gcc -version >&5 gcc: error: unrecognized command-line option '-version' gcc: fatal error: no input files compilation terminated. configure:5148: $? = 1 configure:5168: checking whether the C compiler works configure:5190: gcc -O3 -ffast-math -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=hard -mthumb -pipe -fomit-frame-pointer -frename-registers -fweb -flto=9 -fuse-linker-plugin -isystem/home/build/Kindle/CrossTool/Build_KOBO/include -L/home/build/Kindle/CrossTool/Build_KOBO/lib -Wl,-O1 -Wl,--as-needed conftest.c >&5 gcc: error: unrecognized command-line option '-mfpu=neon' gcc: error: unrecognized command-line option '-mfloat-abi=hard' gcc: error: unrecognized command-line option '-mthumb' configure:5194: $? = 1 configure:5234: result: no configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "crosstool-NG" | #define PACKAGE_TARNAME "crosstool-ng" | #define PACKAGE_VERSION "1.24.0.519_3e2d99d" | #define PACKAGE_STRING "crosstool-NG 1.24.0.519_3e2d99d" | #define PACKAGE_BUGREPORT "crossgcc@sourceware.org" | #define PACKAGE_URL "http://crosstool-ng.org" | #define PACKAGE "crosstool-ng" | #define VERSION "1.24.0.519_3e2d99d" | /* end confdefs.h. */ | | int | main (void) | { | | ; | return 0; | } configure:5239: error: in `/home/build/inkbox/compiled-binaries/koxtoolchain/build/CT-NG': configure:5241: error: C compiler cannot create executables See `config.log' for more details ## ---------------- ## ## Cache variables. ## ## ---------------- ## ac_cv_build=aarch64-unknown-linux-gnu ac_cv_env_AUTOCONF_set= ac_cv_env_AUTOCONF_value= ac_cv_env_AUTOMAKE_set= ac_cv_env_AUTOMAKE_value= ac_cv_env_AUTORECONF_set= ac_cv_env_AUTORECONF_value= ac_cv_env_AWK_set= ac_cv_env_AWK_value= ac_cv_env_BASH_SHELL_set= ac_cv_env_BASH_SHELL_value= ac_cv_env_BISON_set= ac_cv_env_BISON_value= ac_cv_env_CCC_set= ac_cv_env_CCC_value= ac_cv_env_CC_set= ac_cv_env_CC_value= ac_cv_env_CFLAGS_set=set ac_cv_env_CFLAGS_value='-O3 -ffast-math -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=hard -mthumb -pipe -fomit-frame-pointer -frename-registers -fweb -flto=9 -fuse-linker-plugin' ac_cv_env_CPPFLAGS_set=set ac_cv_env_CPPFLAGS_value=-isystem/home/build/Kindle/CrossTool/Build_KOBO/include ac_cv_env_CPP_set= ac_cv_env_CPP_value= ac_cv_env_CURSES_CFLAGS_set= ac_cv_env_CURSES_CFLAGS_value= ac_cv_env_CURSES_LIBS_set= ac_cv_env_CURSES_LIBS_value= ac_cv_env_CXXFLAGS_set=set ac_cv_env_CXXFLAGS_value='-O3 -ffast-math -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=hard -mthumb -pipe -fomit-frame-pointer -frename-registers -fweb -flto=9 -fuse-linker-plugin' ac_cv_env_CXX_set= ac_cv_env_CXX_value= ac_cv_env_EGREP_set= ac_cv_env_EGREP_value= ac_cv_env_GREP_set= ac_cv_env_GREP_value= ac_cv_env_INSTALL_set= ac_cv_env_INSTALL_value= ac_cv_env_LDFLAGS_set=set ac_cv_env_LDFLAGS_value='-L/home/build/Kindle/CrossTool/Build_KOBO/lib -Wl,-O1 -Wl,--as-needed' ac_cv_env_LIBS_set= ac_cv_env_LIBS_value= ac_cv_env_LIBTOOLIZE_set= ac_cv_env_LIBTOOLIZE_value= ac_cv_env_LIBTOOL_set= ac_cv_env_LIBTOOL_value= ac_cv_env_M4_set= ac_cv_env_M4_value= ac_cv_env_MAKE_set= ac_cv_env_MAKE_value= ac_cv_env_MENU_LIBS_set= ac_cv_env_MENU_LIBS_value= ac_cv_env_OBJCOPY_set= ac_cv_env_OBJCOPY_value= ac_cv_env_OBJDUMP_set= ac_cv_env_OBJDUMP_value= ac_cv_env_PANEL_LIBS_set= ac_cv_env_PANEL_LIBS_value= ac_cv_env_PATCH_set= ac_cv_env_PATCH_value= ac_cv_env_PKG_CONFIG_LIBDIR_set=set ac_cv_env_PKG_CONFIG_LIBDIR_value=/home/build/Kindle/CrossTool/Build_KOBO/lib/pkgconfig ac_cv_env_PKG_CONFIG_PATH_set=set ac_cv_env_PKG_CONFIG_PATH_value= ac_cv_env_PKG_CONFIG_set=set ac_cv_env_PKG_CONFIG_value=pkg-config ac_cv_env_PYTHON_set= ac_cv_env_PYTHON_value= ac_cv_env_READELF_set= ac_cv_env_READELF_value= ac_cv_env_SED_set= ac_cv_env_SED_value= ac_cv_env_YACC_set= ac_cv_env_YACC_value= ac_cv_env_YFLAGS_set= ac_cv_env_YFLAGS_value= ac_cv_env_build_alias_set= ac_cv_env_build_alias_value= ac_cv_env_host_alias_set= ac_cv_env_host_alias_value= ac_cv_env_target_alias_set= ac_cv_env_target_alias_value= ac_cv_func_mmap_fixed_mapped=yes ac_cv_host=aarch64-unknown-linux-gnu ac_cv_path_EGREP='/usr/bin/grep -E' ac_cv_path_GREP=/usr/bin/grep ac_cv_path_SED=/usr/bin/sed ac_cv_path_install='/usr/bin/install -c' ac_cv_path_mkdir=/usr/bin/mkdir ac_cv_prog_AWK=gawk ac_cv_prog_ac_ct_CC=gcc ac_cv_prog_ac_ct_EGREP=egrep ac_cv_prog_ac_ct_GREP=grep ac_cv_prog_make_make_set=yes am_cv_make_support_nested_variables=yes am_cv_prog_tar_pax=gnutar ctng_cv_install_with_strip_program=yes ## ----------------- ## ## Output variables. ## ## ----------------- ## ACLOCAL='${SHELL} '\''/home/build/inkbox/compiled-binaries/koxtoolchain/build/CT-NG/scripts/missing'\'' aclocal-1.16' ALLOCA='' AMDEPBACKSLASH='' AMDEP_FALSE='' AMDEP_TRUE='' AMTAR='$${TAR-tar}' AM_BACKSLASH='\' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' AM_DEFAULT_VERBOSITY='0' AM_V='$(V)' AUTOCONF='${SHELL} '\''/home/build/inkbox/compiled-binaries/koxtoolchain/build/CT-NG/scripts/missing'\'' autoconf' AUTOHEADER='${SHELL} '\''/home/build/inkbox/compiled-binaries/koxtoolchain/build/CT-NG/scripts/missing'\'' autoheader' AUTOMAKE='${SHELL} '\''/home/build/inkbox/compiled-binaries/koxtoolchain/build/CT-NG/scripts/missing'\'' automake-1.16' AUTORECONF='' AWK='gawk' BASH_COMPLETION_DIR='${datadir}/bash-completion/completions' BASH_SHELL='' BISON='' CC='gcc' CCDEPMODE='' CFLAGS='-O3 -ffast-math -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=hard -mthumb -pipe -fomit-frame-pointer -frename-registers -fweb -flto=9 -fuse-linker-plugin' CPP='' CPPFLAGS='-isystem/home/build/Kindle/CrossTool/Build_KOBO/include' CPU_COUNT='' CSCOPE='cscope' CTAGS='ctags' CURSES_CFLAGS='' CURSES_LIBS='' CXX='' CXXDEPMODE='' CXXFLAGS='-O3 -ffast-math -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=hard -mthumb -pipe -fomit-frame-pointer -frename-registers -fweb -flto=9 -fuse-linker-plugin' CYGPATH_W='echo' DATE='' DEFS='' DEPDIR='' ECHO_C='' ECHO_N='-n' ECHO_T='' EGREP='/usr/bin/grep -E' ETAGS='etags' EXEEXT='' GREP='/usr/bin/grep' HAVE_CXX11='' INSTALL='/usr/bin/install -c' INSTALL_BASH_COMPLETION_FALSE='#' INSTALL_BASH_COMPLETION_TRUE='' INSTALL_DATA='${INSTALL} -m 644' INSTALL_PROGRAM='${INSTALL}' INSTALL_SCRIPT='${INSTALL}' INSTALL_STRIP_PROGRAM='$(install_sh) -c -s' INSTALL_USER_MANUAL_FALSE='' INSTALL_USER_MANUAL_TRUE='' INTLLIBS='' INTL_MACOSX_LIBS='' KCONFIG_='' KCONFIG_autoconf_2_65_or_newer='' KCONFIG_automake_1_15_or_newer='' KCONFIG_autoreconf_2_65_or_newer='' KCONFIG_bison_2_7_or_newer='' KCONFIG_curl='' KCONFIG_cvs='' KCONFIG_dtc='' KCONFIG_git='' KCONFIG_gnu_m4_1_4_12_or_newer='' KCONFIG_has_cxx11='' KCONFIG_install_with_strip_program='def_bool y' KCONFIG_libtool_2_4_or_newer='' KCONFIG_libtoolize_2_4_or_newer='' KCONFIG_lzip='' KCONFIG_make_3_81_or_newer='' KCONFIG_make_4_0_or_newer='' KCONFIG_md5sum='' KCONFIG_meson='' KCONFIG_ninja='' KCONFIG_python='' KCONFIG_python_3_4_or_newer='' KCONFIG_sha1sum='' KCONFIG_sha256sum='' KCONFIG_sha512sum='' KCONFIG_static_link='' KCONFIG_svn='' KCONFIG_wget='' LDFLAGS='-L/home/build/Kindle/CrossTool/Build_KOBO/lib -Wl,-O1 -Wl,--as-needed' LEX='' LEXLIB='' LEX_OUTPUT_ROOT='' LIBICONV='' LIBINTL='' LIBOBJS='' LIBS='' LIBTOOL='' LIBTOOLIZE='' LN_S='ln -s' LTLIBICONV='' LTLIBINTL='' LTLIBOBJS='' M4='' MAINT='' MAINTAINER_MODE_FALSE='#' MAINTAINER_MODE_TRUE='' MAKE='' MAKEINFO='${SHELL} '\''/home/build/inkbox/compiled-binaries/koxtoolchain/build/CT-NG/scripts/missing'\'' makeinfo' MENU_LIBS='' MKDIR_P='/usr/bin/mkdir -p' OBJCOPY='' OBJDUMP='' OBJEXT='' PACKAGE='crosstool-ng' PACKAGE_BUGREPORT='crossgcc@sourceware.org' PACKAGE_NAME='crosstool-NG' PACKAGE_STRING='crosstool-NG 1.24.0.519_3e2d99d' PACKAGE_TARNAME='crosstool-ng' PACKAGE_URL='http://crosstool-ng.org' PACKAGE_VERSION='1.24.0.519_3e2d99d' PANEL_LIBS='' PATCH='' PATH_SEPARATOR=':' PKG_CONFIG='pkg-config' PKG_CONFIG_LIBDIR='/home/build/Kindle/CrossTool/Build_KOBO/lib/pkgconfig' PKG_CONFIG_PATH='' POSUB='' PYTHON='' RANLIB='arm-kobo-linux-gnueabihf-gcc-ranlib' READELF='' SED='/usr/bin/sed' SET_MAKE='' SHELL='/bin/sh' STRIP='' USE_NLS='' VERSION='1.24.0.519_3e2d99d' YACC='' YFLAGS='' ac_ct_CC='gcc' ac_ct_CXX='' ac_ct_EGREP='egrep' ac_ct_GREP='grep' ac_ct_OBJCOPY='' ac_ct_OBJDUMP='' ac_ct_PATCH='' ac_ct_READELF='' am__EXEEXT_FALSE='' am__EXEEXT_TRUE='' am__fastdepCC_FALSE='' am__fastdepCC_TRUE='' am__fastdepCXX_FALSE='' am__fastdepCXX_TRUE='' am__include='' am__isrc='' am__leading_dot='.' am__nodep='' am__quote='' am__tar='tar --format=posix -chf - "$$tardir"' am__untar='tar -xf -' bindir='${exec_prefix}/bin' build='aarch64-unknown-linux-gnu' build_alias='' build_cpu='aarch64' build_os='linux-gnu' build_vendor='unknown' bzip2='' curl='' cut='' cvs='' datadir='${datarootdir}' datarootdir='${prefix}/share' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' dtc='' dvidir='${docdir}' enable_local='no' exec_prefix='NONE' file='' flex='' git='' gzip='' help2man='' host='aarch64-unknown-linux-gnu' host_alias='' host_cpu='aarch64' host_os='linux-gnu' host_vendor='unknown' htmldir='${docdir}' includedir='${prefix}/include' infodir='${datarootdir}/info' install_sh='${SHELL} /home/build/inkbox/compiled-binaries/koxtoolchain/build/CT-NG/scripts/install-sh' kconfig_options='' libdir='${exec_prefix}/lib' libexecdir='${exec_prefix}/libexec' localedir='${datarootdir}/locale' localstatedir='${prefix}/var' lzip='' makeinfo='' mandir='${datarootdir}/man' md5sum='' meson='' mkdir_p='$(MKDIR_P)' ninja='' oldincludedir='/usr/include' pdfdir='${docdir}' prefix='/home/build/inkbox/compiled-binaries/koxtoolchain/build/CT_NG_BUILD' program_transform_name='s,x,x,' psdir='${docdir}' readlink='' runstatedir='${localstatedir}/run' sbindir='${exec_prefix}/sbin' sha1sum='' sha256sum='' sha512sum='' sharedstatedir='${prefix}/com' svn='' sysconfdir='${prefix}/etc' tar='' target_alias='' unzip='' wget='' which='' xz='' ## ----------- ## ## confdefs.h. ## ## ----------- ## /* confdefs.h */ #define PACKAGE_NAME "crosstool-NG" #define PACKAGE_TARNAME "crosstool-ng" #define PACKAGE_VERSION "1.24.0.519_3e2d99d" #define PACKAGE_STRING "crosstool-NG 1.24.0.519_3e2d99d" #define PACKAGE_BUGREPORT "crossgcc@sourceware.org" #define PACKAGE_URL "http://crosstool-ng.org" #define PACKAGE "crosstool-ng" #define VERSION "1.24.0.519_3e2d99d" configure: exit 77 [build@inkbox koxtoolchain]$ ```

Relevant lines seem to be the following:

configure:5168: checking whether the C compiler works
configure:5190: gcc -O3 -ffast-math -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=hard -mthumb  -pipe -fomit-frame-pointer -frename-registers -fweb -flto=9 -fuse-linker-plugin -isystem/home/build/Kindle/CrossTool/Build_KOBO/include -L/home/build/Kindle/CrossTool/Build_KOBO/lib -Wl,-O1 -Wl,--as-needed conftest.c  >&5
gcc: error: unrecognized command-line option '-mfpu=neon'
gcc: error: unrecognized command-line option '-mfloat-abi=hard'
gcc: error: unrecognized command-line option '-mthumb'

GCC and kernel versions:

[build@inkbox koxtoolchain]$ gcc --version
gcc (GCC) 12.1.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[build@inkbox koxtoolchain]$ uname -a
Linux inkbox 6.2.10-1-aarch64-ARCH #1 SMP PREEMPT_DYNAMIC Fri Apr  7 10:32:52 MDT 2023 aarch64 GNU/Linux
[build@inkbox koxtoolchain]$

Any ideas ? Thanks a lot !

NiLuJe commented 1 year ago

You may have CFLAGS & co set in your env? Don't ;).

I'm also pretty sure you'll need to build w/ an older make version, and I don't recall if that's done automatically on those configs (if the glibc fails to build with a weird make job error, that'd be the reason).

FWIW, updating those is (still ;p) at the top of my TODO list, so I'll be playing along Soon(TM).

NiLuJe commented 1 year ago

(I'd also need much more context to say what's happening here, because I don't even know what this configure output is from ;)).

NiLuJe commented 1 year ago

And, while I can't think of anything that would be problematic on that front, I don't think anyone's ever tested those on any other host architecture than x86_64, so doing that on aarch64 is basically another potential source of random fun times.

tux-linux commented 1 year ago

(I'd also need much more context to say what's happening here, because I don't even know what this configure output is from ;)).

Didn't you see the drop-down "Error" button in my issue ?

tux-linux commented 1 year ago

And, while I can't think of anything that would be problematic on that front, I don't think anyone's ever tested those on any other host architecture than x86_64, so doing that on aarch64 is basically another potential source of random fun times.

I did compile it once (summer 2021) on a Raspberry Pi 400 running Manjaro ARM, so there's probably a way around it ;)

NiLuJe commented 1 year ago

Didn't you see the drop-down "Error" button in my issue ?

PEBCAK, rofl. I expanded it, then failed to scroll down, then collapsed it and forgot all about it ;p.

(In my defense, it is 6AM ;D).

tux-linux commented 1 year ago

You may have CFLAGS & co set in your env? Don't ;).

I'm also pretty sure you'll need to build w/ an older make version, and I don't recall if that's done automatically on those configs (if the glibc fails to build with a weird make job error, that'd be the reason).

FWIW, updating those is (still ;p) at the top of my TODO list, so I'll be playing along Soon(TM).

I didn't set anything previously but I'll check, thanks

NiLuJe commented 1 year ago

Yeah, looking at the full log (\o/), it definitely looks like a whole lot of stuff is set in the env.

NiLuJe commented 1 year ago

c.f., https://github.com/koreader/koxtoolchain/blob/97e4dcd6e9e20c90062038dc6e2fb18adc0da40d/refs/x-compile.sh#L218-L219

This isn't done in the koxtoolchain variant of the build scripts, but that's such a low hanging fruit that Il'l probably do it there too in the next round of updates ;).

NiLuJe commented 1 year ago

I don't recall if that's done automatically on those configs

If it isn't, doing that should be as simple as ticking make in the "Companion tools" section of the menuconfig (repo should be pinned to a commit old enough that the versions available are okay).

tux-linux commented 1 year ago

Issue seems to have disappeared after using fish or/and tmux to start the build process. Now I'm getting stuck at Building C library for over than 20 minutes and I don't really know what is going on. Here is the build log until I sent SIGTERM. (Too big for GitHub I think) http://pkgs-inkbox.duckdns.org:25560/misc/build.log.txt Thanks for your help!

tux-linux commented 1 year ago

This seems to be the main issue, as it appears to loop around it forever...

[ALL  ]      arm-kobo-linux-gnueabihf-gcc  -g -O2 -fcommon -U_FORTIFY_SOURCE     -mcpu=cortex-a8  -mfpu=neon -mhard-float  -Wno-missing-attributes -Wno-array-bounds -Wno-array-parameter -Wno-stringop-overflow -Wno-maybe-uninitialized  stpncpy_chk.c -c -std=gnu99 -fgnu89-inline -Wall -Winline -Wwrite-strings -fmerge-all-constants -Wstrict-prototypes        -I../include -I/home/build/inkbox/compiled-binaries/koxtoolchain/build/kobo/.build/arm-kobo-linux-gnueabihf/build/build-libc-final/multilib/debug -I/home/build/inkbox/compiled-binaries/koxtoolchain/build/kobo/.build/arm-kobo-linux-gnueabihf/build/build-libc-final/multilib -I../ports/sysdeps/arm/elf -I../ports/sysdeps/unix/sysv/linux/arm/eabi/nptl -I../ports/sysdeps/unix/sysv/linux/arm/eabi -I../ports/sysdeps/unix/sysv/linux/arm/nptl -I../ports/sysdeps/unix/sysv/linux/arm -I../ports/sysdeps/unix/sysv/linux -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../ports/sysdeps/unix/sysv -I../nptl/sysdeps/unix/sysv -I../sysdeps/unix/sysv -I../ports/sysdeps/unix/arm -I../ports/sysdeps/unix -I../nptl/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix -I../ports/sysdeps/arm/eabi -I../ports/sysdeps/arm/fpu -I../ports/sysdeps/arm/nptl -I../ports/sysdeps/arm -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -I../ports -I../nptl  -I.. -I../libio -I. -nostdinc -isystem /home/build/inkbox/compiled-binaries/koxtoolchain/build/kobo/.build/arm-kobo-linux-gnueabihf/buildtools/lib/gcc/arm-kobo-linux-gnueabihf/11.2.0/include -isystem /home/build/inkbox/compiled-binaries/koxtoolchain/build/kobo/.build/arm-kobo-linux-gnueabihf/buildtools/lib/gcc/arm-kobo-linux-gnueabihf/11.2.0/include-fixed -isystem /home/build/x-tools/arm-kobo-linux-gnueabihf/arm-kobo-linux-gnueabihf/sysroot/usr/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h        -o /home/build/inkbox/compiled-binaries/koxtoolchain/build/kobo/.build/arm-kobo-linux-gnueabihf/build/build-libc-final/multilib/debug/stpncpy_chk.o -MD -MP -MF /home/build/inkbox/compiled-binaries/koxtoolchain/build/kobo/.build/arm-kobo-linux-gnueabihf/build/build-libc-final/multilib/debug/stpncpy_chk.o.dt -MT /home/build/inkbox/compiled-binaries/koxtoolchain/build/kobo/.build/arm-kobo-linux-gnueabihf/build/build-libc-final/multilib/debug/stpncpy_chk.o
[ALL  ]      In file included from ../sysdeps/generic/elf/backtracesyms.c:27:
[ALL  ]      ../ports/sysdeps/unix/sysv/linux/arm/ldsodefs.h:41: warning: "MORE_ELF_HEADER_DATA" redefined
[ALL  ]         41 | #define MORE_ELF_HEADER_DATA                                  | 
[ALL  ]      In file included from ../ports/sysdeps/unix/sysv/linux/arm/ldsodefs.h:23,
[ALL  ]                       from ../sysdeps/generic/elf/backtracesyms.c:27:
[ALL  ]      ../sysdeps/unix/sysv/linux/ldsodefs.h:64: note: this is the location of the previous definition
[ALL  ]         64 | #define MORE_ELF_HEADER_DATA       |
tux-linux commented 1 year ago

It actually hangs there and the minutes/seconds counter in the build script stops and hangs as well, whilst htop still reports 100% CPU usage on 2 cores.

[ALL  ]      (echo '#define SYSCALL_NAME mprotect';  echo '#define SYSCALL_NARGS 3';  echo '#define SYSCALL_SYMBOL __mprotect';  echo '#include <syscall-template.S>';  echo 'weak_alias (__mprotect, mprotect)';  echo 'libc_hidden_weak (mprotect)'; ) | arm-kobo-linux-gnueabihf-gcc  -g -O2 -fcommon -U_FORTIFY_SOURCE     -mcpu=cortex-a8  -mfpu=neon -mhard-float  -Wno-missing-attributes -Wno-array-bounds -Wno-array-parameter -Wno-stringop-overflow -Wno-maybe-uninitialized  -c   -I../include -I/home/build/inkbox/compiled-binaries/koxtoolchain/build/kobo/.build/arm-kobo-linux-gnueabihf/build/build-libc-final/multilib/misc -I/home/build/inkbox/compiled-binaries/koxtoolchain/build/kobo/.build/arm-kobo-linux-gnueabihf/build/build-libc-final/multilib -I../ports/sysdeps/arm/elf -I../ports/sysdeps/unix/sysv/linux/arm/eabi/nptl -I../ports/sysdeps/unix/sysv/linux/arm/eabi -I../ports/sysdeps/unix/sysv/linux/arm/nptl -I../ports/sysdeps/unix/sysv/linux/arm -I../ports/sysdeps/unix/sysv/linux -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../ports/sysdeps/unix/sysv -I../nptl/sysdeps/unix/sysv -I../sysdeps/unix/sysv -I../ports/sysdeps/unix/arm -I../ports/sysdeps/unix -I../nptl/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix -I../ports/sysdeps/arm/eabi -I../ports/sysdeps/arm/fpu -I../ports/sysdeps/arm/nptl -I../ports/sysdeps/arm -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -I../ports -I../nptl  -I.. -I../libio -I. -nostdinc -isystem /home/build/inkbox/compiled-binaries/koxtoolchain/build/kobo/.build/arm-kobo-linux-gnueabihf/buildtools/lib/gcc/arm-kobo-linux-gnueabihf/11.2.0/include -isystem /home/build/inkbox/compiled-binaries/koxtoolchain/build/kobo/.build/arm-kobo-linux-gnueabihf/buildtools/lib/gcc/arm-kobo-linux-gnueabihf/11.2.0/include-fixed -isystem /home/build/x-tools/arm-kobo-linux-gnueabihf/arm-kobo-linux-gnueabihf/sysroot/usr/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h  -DPIC -DSHARED      -DASSEMBLER  -Wa,--noexecstack   -o /home/build/inkbox/compiled-binaries/koxtoolchain/build/kobo/.build/arm-kobo-linux-gnueabihf/build/build-libc-final/multilib/misc/rtld-mprotect.os -x assembler-with-cpp - -MD -MP -MF /home/build/inkbox/compiled-binaries/koxtoolchain/build/kobo/.build/arm-kobo-linux-gnueabihf/build/build-libc-final/multilib/misc/rtld-mprotect.os.dt -MT /home/build/inkbox/compiled-binaries/koxtoolchain/build/kobo/.build/arm-kobo-linux-gnueabihf/build/build-libc-final/multilib/misc/rtld-mprotect.os -DNOT_IN_libc=1 -DIS_IN_rtld=1
[ALL  ]      In file included from ../sysdeps/unix/sysv/linux/getpagesize.c:24:
[ALL  ]      ../ports/sysdeps/unix/sysv/linux/arm/ldsodefs.h:41: warning: "MORE_ELF_HEADER_DATA" redefined
[ALL  ]         41 | #define MORE_ELF_HEADER_DATA                                  | 
[ALL  ]      In file included from ../ports/sysdeps/unix/sysv/linux/arm/ldsodefs.h:23,
[ALL  ]                       from ../sysdeps/unix/sysv/linux/getpagesize.c:24:
[ALL  ]      ../sysdeps/unix/sysv/linux/ldsodefs.h:64: note: this is the location of the previous definition
[ALL  ]         64 | #define MORE_ELF_HEADER_DATA       | 
[ALL  ]      make[5]: Leaving directory '/home/build/inkbox/compiled-binaries/koxtoolchain/build/kobo/.build/src/glibc-2.15/misc'

(no output after this)

image
NiLuJe commented 1 year ago

Linking may be extra slow for some reason, but I see no reason to panic, I've rarely (if ever) seen a compiler/linker spin in the mud for nothing.

NiLuJe commented 1 year ago

Okay, repro'd here; it's a much sneakier side-effect of the make 4.4.x incompatibilities than the plain failure I was expecting...

Enabling using make 4.3 as the build make via the Companion tools config I mentioned earlier fixes it.

I'll deal with it one way or another when bumping the TCs, I guess...

NiLuJe commented 1 year ago

Random shell history dump, but, basically follow the script and do stuff at the menuconfig stage ;p.

9985  18.4.2023 01:43  0:00  cd build/
 9986  18.4.2023 01:43  0:00  ls -lash
 9987  18.4.2023 01:43  0:00  realpath CT_NG_BUILD
 9988  18.4.2023 01:44  0:00  export PATH="/var/tmp/niluje/koxtoolchain/build/CT_NG_BUILD/bin:${PATH}"
 9989  18.4.2023 01:44  0:00  cd kobo
 9990  18.4.2023 01:44  0:00  ls
 9991  18.4.2023 01:44  0:00  ct-ng clean
 9992  18.4.2023 01:45  0:00  ct-ng arm-kobo-linux-gnueabihf
 9993  18.4.2023 01:45  0:00  ct-ng oldconfig
 9994  18.4.2023 01:45  0:00  ct-ng menuconfig
 9995  18.4.2023 01:45  0:00  unset CFLAGS CXXFLAGS LDFLAGS
 9996  18.4.2023 01:46  0:00  nice ct-ng build
tux-linux commented 1 year ago

Thanks, this worked (I think).

NiLuJe commented 1 month ago

Should no longer be an issue, ct-ng now enforces using make 4.3 on the affected versions.