Closed 4ntoine closed 4 years ago
CT_TOOLCHAIN_TYPE="cross"
seems to be wrong, trying CT_TOOLCHAIN_TYPE="canadian"..
Nope, did not help, still having:
[INFO ] =================================================================
[INFO ] Installing C library
[INFO ] Installing C library: done in 24.33s (at 07:57)
[INFO ] =================================================================
[INFO ] Installing final compiler for build
[ERROR] checking for the value of EOF... configure: error: computing EOF failed
[ERROR] make[2]: *** [configure-target-libstdc++-v3] Error 1
[ERROR]
[ERROR] >>
[ERROR] >> Build failed in step 'Installing final compiler for build'
[ERROR] >> called in step '(top-level)'
[ERROR] >>
[ERROR] >> Error happened in: CT_DoExecLog[scripts/functions@257]
[ERROR] >> called from: do_cc_core_backend[scripts/build/cc/gcc.sh@483]
[ERROR] >> called from: do_cc_for_build[scripts/build/cc/gcc.sh@558]
[ERROR] >> called from: main[scripts/crosstool-NG.sh@638]
[ERROR] >>
[ERROR] >> For more info on this error, look at the file: 'build.log'
[ERROR] >> There is a list of known issues, some with workarounds, in:
[ERROR] >> 'share/doc/crosstool-ng/ct-ng.1.20.0/B - Known issues.txt'
[ERROR]
[ERROR] (elapsed: 10:20.16)
[10:20] / ct-ng:148: recipe for target 'build' failed
make[1]: *** [build] Error 2
ct-ng:151: recipe for target 'build.8' failed
make: *** [build.8] Error 2
Same error if trying with CT_HOST="arm-unknown-linux-gnueabi"
(and toolchain compiled with upstream crosstool-ng, installed and added to PATH)
Dont think this is related to #1188, do a google search on "checking for the value of EOF", I think you have some directories mixed up.
look into the config.log in /opt/Espressif/crosstool-NG-android/.build/xtensa-lx106-elf/build/build-cc-final-build-x86_64-build_unknown-linux-gnu
for more clues.
@nolange i did googled before obviously, but unfortunately at the moment i don't have enough understanding on what's wrong and how to fix it. Will continue, any advice is appreciated
hmm, config.log
in /opt/Espressif/crosstool-NG-android/.build/xtensa-lx106-elf/build/build-cc-final-build-x86_64-build_unknown-linux-gnu
has configure: exit 0
, no mentions of "EOF issue" there
this is from "/opt/Espressif/crosstool-NG-android/.build/xtensa-lx106-elf/build/build-cc-final-build-x86_64-build_unknown-linux-gnu/xtensa-lx106-elf/libstdc++-v3/config.log" due to missing header:
...
configure:20638: /opt/Espressif/crosstool-NG-android/.build/xtensa-lx106-elf/build/build-cc-final-build-x86_64-build_unknown-linux-gnu/./gcc/xgcc -B/opt/Espressif/crosstool-NG-android/.build/xtensa-lx106-elf/build/build-cc-final-build-x86_64-build_unknown-linux-gnu/./gcc/ -B/opt/Espressif/crosstool-NG-android/.build/xtensa-lx106-elf/buildtools/xtensa-lx106-elf/bin/ -B/opt/Espressif/crosstool-NG-android/.build/xtensa-lx106-elf/buildtools/xtensa-lx106-elf/lib/ -isystem /opt/Espressif/crosstool-NG-android/.build/xtensa-lx106-elf/buildtools/xtensa-lx106-elf/include -isystem /opt/Espressif/crosstool-NG-android/.build/xtensa-lx106-elf/buildtools/xtensa-lx106-elf/sys-include -c -g -O2 -g -Os conftest.c >&5
In file included from /opt/Espressif/crosstool-NG-android/.build/xtensa-lx106-elf/buildtools/xtensa-lx106-elf/include/_ansi.h:16,
from /opt/Espressif/crosstool-NG-android/.build/xtensa-lx106-elf/buildtools/xtensa-lx106-elf/include/stdio.h:29,
from conftest.c:14:
/opt/Espressif/crosstool-NG-android/.build/xtensa-lx106-elf/buildtools/xtensa-lx106-elf/include/sys/config.h:170:10: fatal error: xtensa/config/core-isa.h: No such file or directory
170 | #include <xtensa/config/core-isa.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
configure:20638: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "package-unused"
| #define PACKAGE_TARNAME "libstdc++"
| #define PACKAGE_VERSION "version-unused"
| #define PACKAGE_STRING "package-unused version-unused"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define LT_OBJDIR ".libs/"
| #define _GLIBCXX_HOSTED 1
| #define _GLIBCXX_VERBOSE 1
| #define _GLIBCXX_USE_LONG_LONG 1
| #define _GLIBCXX_FULLY_DYNAMIC_STRING 0
| /* end confdefs.h. */
| #include <stdio.h>
| int
| main ()
| {
| static int test_array [1 - 2 * !((EOF) < 0)];
| test_array [0] = 0;
| return test_array [0];
|
| ;
| return 0;
| }
configure:20641: error: computing EOF failed
...
I've pushed a branch xtensa-1.24.x with a defconfig aarch64-linux-gnu,xtensa-lx106-elf that I used to build a static toolchain for aarch64-linux host, xtensa-lx106-elf target. Please give it a try. It may need more configuration tweaks to match the toolchain built by the esp-open-sdk as I did the simplest config possible from the top of my head just to see if it builds.
Hi, @jcmvbkbc. Thanks for looking into it!
I had to change host to "aarch64-linux-android" to use it with standalone toolchain from Android NDK 21b (received it using "./build/tools/make_standalone_toolchain.py --arch arm64 --api 21 --install-dir /home/anton/x-tools/arm64-ndk").
Eventually i get the following:
[INFO ] =================================================================
[INFO ] Installing gettext for host
[EXTRA] Configuring gettext
[EXTRA] Building gettext
[ERROR] /opt/Espressif/crosstool-NG/.build/HOST-aarch64-linux-android/xtensa-lx106-elf/src/gettext/gettext-tools/gnulib-lib/spawn_faction_addclose.c:50:19: error: member reference base type 'posix_spawn_file_actions_t' (aka 'struct __posix_spawn_file_actions *') is not a structure or union
[ERROR] /opt/Espressif/crosstool-NG/.build/HOST-aarch64-linux-android/xtensa-lx106-elf/src/gettext/gettext-tools/gnulib-lib/spawn_faction_addclose.c:50:42: error: member reference base type 'posix_spawn_file_actions_t' (aka 'struct __posix_spawn_file_actions *') is not a structure or union
[ERROR] /opt/Espressif/crosstool-NG/.build/HOST-aarch64-linux-android/xtensa-lx106-elf/src/gettext/gettext-tools/gnulib-lib/spawn_faction_addclose.c:59:24: error: member reference base type 'posix_spawn_file_actions_t' (aka 'struct __posix_spawn_file_actions *') is not a structure or union
[ERROR] /opt/Espressif/crosstool-NG/.build/HOST-aarch64-linux-android/xtensa-lx106-elf/src/gettext/gettext-tools/gnulib-lib/spawn_faction_addclose.c:59:47: error: member reference base type 'posix_spawn_file_actions_t' (aka 'struct __posix_spawn_file_actions *') is not a structure or union
[ERROR] /opt/Espressif/crosstool-NG/.build/HOST-aarch64-linux-android/xtensa-lx106-elf/src/gettext/gettext-tools/gnulib-lib/spawn_faction_addclose.c:64:19: error: member reference base type 'posix_spawn_file_actions_t' (aka 'struct __posix_spawn_file_actions *') is not a structure or union
[ERROR] /opt/Espressif/crosstool-NG/.build/HOST-aarch64-linux-android/xtensa-lx106-elf/src/gettext/gettext-tools/gnulib-lib/spawn_faction_adddup2.c:50:19: error: member reference base type 'posix_spawn_file_actions_t' (aka 'struct __posix_spawn_file_actions *') is not a structure or union
[ERROR] /opt/Espressif/crosstool-NG/.build/HOST-aarch64-linux-android/xtensa-lx106-elf/src/gettext/gettext-tools/gnulib-lib/spawn_faction_adddup2.c:50:42: error: member reference base type 'posix_spawn_file_actions_t' (aka 'struct __posix_spawn_file_actions *') is not a structure or union
[ERROR] /opt/Espressif/crosstool-NG/.build/HOST-aarch64-linux-android/xtensa-lx106-elf/src/gettext/gettext-tools/gnulib-lib/spawn_faction_adddup2.c:59:24: error: member reference base type 'posix_spawn_file_actions_t' (aka 'struct __posix_spawn_file_actions *') is not a structure or union
[ERROR] /opt/Espressif/crosstool-NG/.build/HOST-aarch64-linux-android/xtensa-lx106-elf/src/gettext/gettext-tools/gnulib-lib/spawn_faction_adddup2.c:59:47: error: member reference base type 'posix_spawn_file_actions_t' (aka 'struct __posix_spawn_file_actions *') is not a structure or union
[ERROR] /opt/Espressif/crosstool-NG/.build/HOST-aarch64-linux-android/xtensa-lx106-elf/src/gettext/gettext-tools/gnulib-lib/spawn_faction_adddup2.c:65:19: error: member reference base type 'posix_spawn_file_actions_t' (aka 'struct __posix_spawn_file_actions *') is not a structure or union
[ERROR] make[6]: *** [Makefile:2962: spawn_faction_addclose.lo] Error 1
[ERROR] make[6]: *** Waiting for unfinished jobs....
[ERROR] make[6]: *** [Makefile:2962: spawn_faction_adddup2.lo] Error 1
[ERROR] /opt/Espressif/crosstool-NG/.build/HOST-aarch64-linux-android/xtensa-lx106-elf/src/gettext/gettext-tools/gnulib-lib/spawn_faction_init.c:34:30: error: member reference base type 'posix_spawn_file_actions_t' (aka 'struct __posix_spawn_file_actions *') is not a structure or union
[ERROR] /opt/Espressif/crosstool-NG/.build/HOST-aarch64-linux-android/xtensa-lx106-elf/src/gettext/gettext-tools/gnulib-lib/spawn_faction_init.c:35:39: error: member reference base type 'posix_spawn_file_actions_t' (aka 'struct __posix_spawn_file_actions *') is not a structure or union
[ERROR] /opt/Espressif/crosstool-NG/.build/HOST-aarch64-linux-android/xtensa-lx106-elf/src/gettext/gettext-tools/gnulib-lib/spawn_faction_init.c:42:15: error: member reference base type 'posix_spawn_file_actions_t' (aka 'struct __posix_spawn_file_actions *') is not a structure or union
[ERROR] /opt/Espressif/crosstool-NG/.build/HOST-aarch64-linux-android/xtensa-lx106-elf/src/gettext/gettext-tools/gnulib-lib/spawn_faction_init.c:43:15: error: member reference base type 'posix_spawn_file_actions_t' (aka 'struct __posix_spawn_file_actions *') is not a structure or union
[ERROR] make[6]: *** [Makefile:2962: spawn_faction_init.lo] Error 1
[ERROR] /opt/Espressif/crosstool-NG/.build/HOST-aarch64-linux-android/xtensa-lx106-elf/src/gettext/gettext-tools/gnulib-lib/spawn_faction_addopen.c:51:19: error: member reference base type 'posix_spawn_file_actions_t' (aka 'struct __posix_spawn_file_actions *') is not a structure or union
[ERROR] /opt/Espressif/crosstool-NG/.build/HOST-aarch64-linux-android/xtensa-lx106-elf/src/gettext/gettext-tools/gnulib-lib/spawn_faction_addopen.c:51:42: error: member reference base type 'posix_spawn_file_actions_t' (aka 'struct __posix_spawn_file_actions *') is not a structure or union
[ERROR] /opt/Espressif/crosstool-NG/.build/HOST-aarch64-linux-android/xtensa-lx106-elf/src/gettext/gettext-tools/gnulib-lib/spawn_faction_addopen.c:60:24: error: member reference base type 'posix_spawn_file_actions_t' (aka 'struct __posix_spawn_file_actions *') is not a structure or union
[ERROR] /opt/Espressif/crosstool-NG/.build/HOST-aarch64-linux-android/xtensa-lx106-elf/src/gettext/gettext-tools/gnulib-lib/spawn_faction_addopen.c:60:47: error: member reference base type 'posix_spawn_file_actions_t' (aka 'struct __posix_spawn_file_actions *') is not a structure or union
[ERROR] /opt/Espressif/crosstool-NG/.build/HOST-aarch64-linux-android/xtensa-lx106-elf/src/gettext/gettext-tools/gnulib-lib/spawn_faction_addopen.c:68:19: error: member reference base type 'posix_spawn_file_actions_t' (aka 'struct __posix_spawn_file_actions *') is not a structure or union
[ERROR] make[6]: *** [Makefile:2962: spawn_faction_addopen.lo] Error 1
[ERROR] /opt/Espressif/crosstool-NG/.build/HOST-aarch64-linux-android/xtensa-lx106-elf/src/gettext/gettext-tools/gnulib-lib/spawn_faction_destroy.c:29:21: error: member reference base type 'posix_spawn_file_actions_t' (aka 'struct __posix_spawn_file_actions *') is not a structure or union
[ERROR] make[6]: *** [Makefile:2962: spawn_faction_destroy.lo] Error 1
[ERROR] /opt/Espressif/crosstool-NG/.build/HOST-aarch64-linux-android/xtensa-lx106-elf/src/gettext/gettext-tools/gnulib-lib/spawnattr_setflags.c:42:7: error: member reference base type 'posix_spawnattr_t' (aka 'struct __posix_spawnattr *') is not a structure or union
[ERROR] make[6]: *** [Makefile:2962: spawnattr_setflags.lo] Error 1
[ERROR] /opt/Espressif/crosstool-NG/.build/HOST-aarch64-linux-android/xtensa-lx106-elf/src/gettext/gettext-tools/gnulib-lib/spawnattr_setsigmask.c:30:16: error: member reference base type 'posix_spawnattr_t' (aka 'struct __posix_spawnattr *') is not a structure or union
[ERROR] make[6]: *** [Makefile:2962: spawnattr_setsigmask.lo] Error 1
[ERROR] make[5]: *** [Makefile:2618: all] Error 2
[ERROR] make[4]: *** [Makefile:2028: all-recursive] Error 1
[ERROR] make[3]: *** [Makefile:1894: all] Error 2
[ERROR] make[2]: *** [Makefile:414: all-recursive] Error 1
[ERROR] make[1]: *** [Makefile:370: all] Error 2
[ERROR]
[ERROR] >>
[ERROR] >> Build failed in step 'Installing gettext for host'
[ERROR] >> called in step '(top-level)'
[ERROR] >>
[ERROR] >> Error happened in: CT_DoExecLog[scripts/functions@376]
[ERROR] >> called from: do_gettext_backend[scripts/build/companion_libs/330-gettext.sh@134]
[ERROR] >> called from: do_gettext_for_host[scripts/build/companion_libs/330-gettext.sh@51]
[ERROR] >> called from: do_companion_libs_for_host[scripts/build/companion_libs.sh@36]
[ERROR] >> called from: main[scripts/crosstool-NG.sh@694]
[ERROR] >>
[ERROR] >> For more info on this error, look at the file: 'build.log'
[ERROR] >> There is a list of known issues, some with workarounds, in:
[ERROR] >> https://crosstool-ng.github.io/docs/known-issues/
[ERROR] >>
[ERROR] >> NOTE: Your configuration includes features marked EXPERIMENTAL.
[ERROR] >> Before submitting a bug report, try to reproduce it without enabling
[ERROR] >> any experimental features. Otherwise, you'll need to debug it
[ERROR] >> and present an explanation why it is a bug in crosstool-NG - or
[ERROR] >> preferably, a fix.
[ERROR] >>
[ERROR] >> If you feel this is a bug in crosstool-NG, report it at:
[ERROR] >> https://github.com/crosstool-ng/crosstool-ng/issues/
[ERROR] >>
[ERROR] >> Make sure your report includes all the information pertinent to this issue.
[ERROR] >> Read the bug reporting guidelines here:
[ERROR] >> http://crosstool-ng.github.io/support/
[ERROR]
[ERROR] (elapsed: 9:47.10)
[09:48] / make: *** [ct-ng:261: build] Error 2
What toolchain should be used for "aarch64-linux-gnu"? I've tried "./ct-ng aarch64-linux-gnu" but it was not found. Am i missing anything else?
Worked for me if compiling with toolchain from the following ubuntu packages (NOT from NDK):
sudo apt install g++-aarch64-linux-gnu
sudo apt install gcc-aarch64-linux-gnu
assume using the following:
--arch arm --api 21 --install-dir ~/x-tools/arm-ndk-21
and~/x-tools/arm-ndk-21/bin
is added toPATH
.~/x-tools/xtensa-lx106-elf
and~/x-tools/xtensa-lx106-elf/bin
is added to PATHcreated "arm-ndk,xtensa-lx106-elf" sample:
and created configuration from it:
and manually edited
.configuration
to have the versions above (it seems ./ct-ng overwrote them to default)It results into the following: