编译gcc-7.3.0时未找到uint64_t或int64_t错误 [英] uint64_t or int64_t not found error when compiling gcc-7.3.0

查看:1091
本文介绍了编译gcc-7.3.0时未找到uint64_t或int64_t错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I am building my own linux system from scratch.

由于我是一个初学者,所以我对该错误的了解不多,并且已经尝试了一些方法,但是仍然无法解决此问题.我遇到了编译gcc的步骤.

As I am a beginner I don't know much about the error, and I've tried some ways, but still I am unable to solve this. I came across a step to compile 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 时,出现以下错误

When I run make it gives the following error

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"无法找到某些标头:

If you look at this output you will see "configure" is not able to find some headers :

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"

And on my system I have this header file. So, I suspect, you're system need at this step to find those headers to be able to compile "gcc"

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

似乎您尝试说配置"标题位于此处:

Seem like you have try to say to "configure" that your header is located there :

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

请仔细检查configure.log,如果编译器使用了正确的"-I",并且此标头存在.

Please double check configure.log if the right "-I" was used by the compiler, and this header exist.

这篇关于编译gcc-7.3.0时未找到uint64_t或int64_t错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆