From: Thomas Sobczynski <tsobczynski@werfen.com>
To: Jonathan Wakely <jwakely.gcc@gmail.com>
Cc: Xi Ruoyao <xry111@mengyan1223.wang>,
"gcc-help@gcc.gnu.org" <gcc-help@gcc.gnu.org>
Subject: Re: [EXTERNAL] Re: Compiling GCC 11 for Windows targeting ARM on Linux
Date: Wed, 12 Jan 2022 18:39:28 +0000 [thread overview]
Message-ID: <VI1PR0402MB38530909A3F09C7AFB77D413CD529@VI1PR0402MB3853.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <CAH6eHdTMOFMd=pw8A3pym-yEG0X_Z3nmc6QaS5VbW4F15wcSOQ@mail.gmail.com>
Thanks much for the pointers thus far. I am now trying to take this in three chunks: build native GCC11 on GNU/Linux, then use that to build GCC11 on/for GNU/Linux targeting ARM, then use the previous two to build GCC11 on GNU/Linux for Windows targeting ARM.
The first step completes, so I have an installed GCC 11 native toolchain for Linux.
The second step doesn't finish; getting hung up on configuring libstdc++.
The tail of the build output leading up to the error:
checking for ISO C99 support to TR1 in <stdint.h>... no
checking for ISO C99 support to TR1 in <math.h>... no
no
no
checking stdbool.h usability... no
checking stdbool.h presence... yes
configure: WARNING: stdbool.h: present but cannot be compiled
configure: WARNING: stdbool.h: check for missing prerequisite headers?
configure: WARNING: stdbool.h: see the Autoconf documentation
configure: WARNING: stdbool.h: section "Present But Cannot Be Compiled"
configure: WARNING: stdbool.h: proceeding with the compiler's result
checking for stdbool.h... no
checking stdalign.h usability... no
checking stdalign.h presence... yes
configure: WARNING: stdalign.h: present but cannot be compiled
configure: WARNING: stdalign.h: check for missing prerequisite headers?
configure: WARNING: stdalign.h: see the Autoconf documentation
configure: WARNING: stdalign.h: section "Present But Cannot Be Compiled"
configure: WARNING: stdalign.h: proceeding with the compiler's result
checking for stdalign.h... no
checking for the value of EOF... configure: error: computing EOF failed
make[2]: *** [Makefile:13316: configure-target-libstdc++-v3] Error 1
make[2]: Leaving directory '/home/tsobczynski/Compiler/build-linux-cross'
make[1]: *** [Makefile:968: all] Error 2
make[1]: Leaving directory '/home/tsobczynski/Compiler/build-linux-cross'
The corresponding part of config.log for the library is:
configure:16488: checking for the value of EOF
configure:16494: /home/tsobczynski/Compiler/build-linux-cross/./gcc/xgcc -B/home/tsobczynski/Compiler/build-linux-cross/./gcc/ -B/home/tsobczynski/Compiler/linux-cross/arm-none-eabi/bin/ -B/home/tsobczynski/Compiler/linux-cross/arm-none-eabi/lib/ -isystem /home/tsobczynski/Compiler/linux-cross/arm-none-eabi/include -isystem /home/tsobczynski/Compiler/linux-cross/arm-none-eabi/sys-include -c -g -O2 -g -Os conftest.c >&5
conftest.c:14:10: fatal error: stdio.h: No such file or directory
14 | #include <stdio.h>
| ^~~~~~~~~
compilation terminated.
configure:16494: $? = 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 0
| #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:16494: /home/tsobczynski/Compiler/build-linux-cross/./gcc/xgcc -B/home/tsobczynski/Compiler/build-linux-cross/./gcc/ -B/home/tsobczynski/Compiler/linux-cross/arm-none-eabi/bin/ -B/home/tsobczynski/Compiler/linux-cross/arm-none-eabi/lib/ -isystem /home/tsobczynski/Compiler/linux-cross/arm-none-eabi/include -isystem /home/tsobczynski/Compiler/linux-cross/arm-none-eabi/sys-include -c -g -O2 -g -Os conftest.c >&5
conftest.c:14:10: fatal error: stdio.h: No such file or directory
14 | #include <stdio.h>
| ^~~~~~~~~
compilation terminated.
configure:16494: $? = 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 0
| #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:16497: error: computing EOF failed
The excerpted recipe I'm using to build the native/native/native toolchain:
cd $(COMPILER_ROOT)/build-linux-native && $(COMPILER_ROOT)/gcc/configure --prefix=${LINUX_TOOLCHAIN_ROOT} --enable-vtable-verify --enable-languages=c,c++,lto --disable-multilib --disable-bootstrap --enable-large-address-aware
$(LINUX_TOOLCHAIN_ROOT)/bin/gcc: $(COMPILER_ROOT)/build-linux-native/Makefile
$(MAKE) -j8 -C $(COMPILER_ROOT)/build-linux-native
$(MAKE) -C $(COMPILER_ROOT)/build-linux-native install
The excerpted recipe for the native/native/cross toolchain:
cd $(COMPILER_ROOT)/build-linux-cross && PATH="$(LINUX_TOOLCHAIN_ROOT)/bin:$(PATH)" $(COMPILER_ROOT)/gcc/configure --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --target=arm-none-eabi --prefix=${LINUX_CROSS_TOOLCHAIN_ROOT} --enable-vtable-verify --with-multilib-list=aprofile,rmprofile --enable-languages=c,c++,lto --enable-large-address-aware --disable-shared --with-newlib
PATH="$(LINUX_TOOLCHAIN_ROOT)/bin:$(PATH)" $(MAKE) -j8 -C $(COMPILER_ROOT)/build-linux-cross
PATH="$(LINUX_TOOLCHAIN_ROOT)/bin:$(PATH)" $(MAKE) -C $(COMPILER_ROOT)/build-linux-cross install
The search paths the configure script is passing to the compiler do not contain 'stdio.h', but the native toolchain I'm using to compile (same GCC 11.2.x) does have it:
$ find linux-cross -name 'stdio.h'
$ find linux -name 'stdio.h'
linux/include/c++/11.2.1/tr1/stdio.h
linux/lib/gcc/x86_64-pc-linux-gnu/11.2.1/include/ssp/stdio.h
I seemed to have the opposite problem earlier, where the GCC 9 native->ARM toolchain I installed was choking on headers from GCC 11 that it couldn't understand, which is why I built a native GCC 11 in the first place. Any thoughts on where I have gone wrong this time?
Thanks,
Tom
next prev parent reply other threads:[~2022-01-12 18:39 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-10 16:47 Thomas Sobczynski
2022-01-10 17:16 ` Xi Ruoyao
2022-01-11 2:49 ` [EXTERNAL] " Thomas Sobczynski
2022-01-11 3:44 ` Thomas Sobczynski
2022-01-11 6:53 ` Xi Ruoyao
2022-01-11 11:19 ` Jonathan Wakely
2022-01-11 11:14 ` Jonathan Wakely
2022-01-12 18:39 ` Thomas Sobczynski [this message]
2022-01-12 19:09 ` Jonathan Wakely
2022-01-11 11:09 ` Jonathan Wakely
2022-01-10 17:24 ` Jonathan Wakely
2022-01-11 0:27 ` [EXTERNAL] " Thomas Sobczynski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=VI1PR0402MB38530909A3F09C7AFB77D413CD529@VI1PR0402MB3853.eurprd04.prod.outlook.com \
--to=tsobczynski@werfen.com \
--cc=gcc-help@gcc.gnu.org \
--cc=jwakely.gcc@gmail.com \
--cc=xry111@mengyan1223.wang \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).