簡體   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