繁体   English   中英

编译 gcc-7.3.0 时未找到 uint64_t 或 int64_t 错误

[英]uint64_t or int64_t not found error when compiling gcc-7.3.0

我正在从头开始构建自己的 linux 系统。

由于我是初学者,我对错误知之甚少,我尝试了一些方法,但仍然无法解决此问题。 我遇到了编译gcc的步骤。

我用来编译的命令是

CC=$LFS_TGT-gcc \
CXX=$LFS_TGT-g++\
AR=$LFS_TGT-ar \
RANLIB=$LFS_TGT-ranlib \
../gcc-7.3.0/configure \
--prefix=/tools \
--with-local-prefix=/tools \
--with-native-system-header-dir=/tools/include \
--enable-languages=c,c++ \
--disable-libstdcxx-pch \
--disable-multilib \
--disable-bootstrap \
--disable-libgomp

当我运行make它会出现以下错误

Configuring in ./gcc
configure: creating cache ./config.cache
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking LIBRARY_PATH variable... ok
checking GCC_EXEC_PREFIX variable... ok
checking whether to place generated files in the source directory... no
checking whether a default linker was specified... no
checking whether a default assembler was specified... no
checking for x86_64-pc-linux-gnu-gcc... x86_64-lfs-linux-gnu-gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether x86_64-lfs-linux-gnu-gcc accepts -g... yes
checking for x86_64-lfs-linux-gnu-gcc option to accept ISO C89... none needed
checking whether we are using the GNU C++ compiler... no
checking whether x86_64-lfs-linux-gnu-g++AR=x86_64-lfs-linux-gnu-ar accepts -g... no
checking for x86_64-pc-linux-gnu-gnatbind... no
checking for x86_64-pc-linux-gnu-gnatmake... no
checking whether compiler driver understands Ada... no
checking how to run the C++ preprocessor... /lib/cpp
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... no
checking for sys/types.h... no
checking for sys/stat.h... no
checking for stdlib.h... no
checking for string.h... no
checking for memory.h... no
checking for strings.h... no
checking for inttypes.h... no
checking for stdint.h... no
checking for unistd.h... no
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... no
checking how to run the C preprocessor... x86_64-lfs-linux-gnu-gcc -E
checking for inline... no
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... unknown
checking for _LARGE_FILES value needed for large files... unknown
checking size of void *... 0
checking size of short... 0
checking size of int... 0
checking size of long... 0
checking for long long... no
checking for int8_t... no
checking for int16_t... no
checking for int32_t... no
checking for int64_t... no
checking for long long int... no
checking for intmax_t... no
checking for intptr_t... no
checking for uint8_t... no
checking for uint16_t... no
checking for uint32_t... no
checking for uint64_t... no
checking for unsigned long long int... no
checking for uintmax_t... no
checking for uintptr_t... no
configure: error: uint64_t or int64_t not found
Makefile:4186: recipe for target 'configure-gcc' failed
make[1]: *** [configure-gcc] Error 1
make[1]: Leaving directory '/mnt/lfs/sources/old-gcc'
Makefile:902: recipe for target 'all' failed
make: *** [all] Error 2

谁能帮我解决这个问题? 任何想法表示赞赏。

如果您查看此输出,您将看到“configure”无法找到某些标题:

checking for ANSI C header files... no
checking for sys/types.h... no
checking for sys/stat.h... no
checking for stdlib.h... no
checking for string.h... no
checking for memory.h... no

在我的系统上,我有这个头文件。 所以,我怀疑,你在这一步需要系统找到那些能够编译“gcc”的头文件

ls -l /usr/include/stdlib.h
-rw-r--r--. 1 root root 34030 Aug  7  2019 /usr/include/stdlib.h

似乎您试图说“配置”您的标题位于那里:

--with-native-system-header-dir=/tools/include

如果编译器使用了正确的“-I”,并且这个头文件存在,请仔细检查 configure.log。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM