gpt4 book ai didi

linux - gcc 使错误 libcpp/charset.c(1747) : error: identifier "saved_error_handler" is undefined

转载 作者:太空宇宙 更新时间:2023-11-04 10:08:05 25 4
gpt4 key购买 nike

您好,我正在尝试在集群(SHARCNET、linux 系统)上安装 gcc-8.1.0。这是我的配置和制作:

./configure --prefix=/home/zhuobuer/gcc-8.1.0/8.1.0/ --enable-multilib
make

它返回给我并显示如下错误:

checking for iconv... (cached) no
../.././libcpp/system.h(198): warning #47: incompatible redefinition of macro "__NO_STRING_INLINES"
#define __NO_STRING_INLINES
^

configure: creating ./config.status
../.././libcpp/charset.c(1747): error: identifier "saved_error_handler" is undefined
bool (*saved_error_handler) (cpp_reader *, int, int, rich_location *,
^

../.././libcpp/charset.c(1747): error: type name is not allowed
bool (*saved_error_handler) (cpp_reader *, int, int, rich_location *,
^

../.././libcpp/charset.c(1747): error: expected an expression
bool (*saved_error_handler) (cpp_reader *, int, int, rich_location *,
^

../.././libcpp/charset.c(1747): error: type name is not allowed
bool (*saved_error_handler) (cpp_reader *, int, int, rich_location *,
^

../.././libcpp/charset.c(1747): error: type name is not allowed
bool (*saved_error_handler) (cpp_reader *, int, int, rich_location *,
^

../.././libcpp/charset.c(1747): error: type name is not allowed
bool (*saved_error_handler) (cpp_reader *, int, int, rich_location *,
^

../.././libcpp/charset.c(1747): error: expected an expression
bool (*saved_error_handler) (cpp_reader *, int, int, rich_location *,
^

../.././libcpp/charset.c(1748): error: expected an expression
const char *, va_list *)
^

../.././libcpp/charset.c(1748): error: type name is not allowed
const char *, va_list *)
^

../.././libcpp/charset.c(1748): error: expected an expression
const char *, va_list *)
^

../.././libcpp/charset.c(1749): error: expected a ";"
ATTRIBUTE_FPTR_PRINTF(5,0);
^

compilation aborted for ../.././libcpp/charset.c (code 2)

make[3]: *** [charset.o] Error 2

make[3]: Leaving directory `/home/zhuobuer/gcc-8.1.0/host-x86_64-pc-linux-gnu/libcpp'

make[2]: *** [all-stage1-libcpp] Error 2

make[2]: *** Waiting for unfinished jobs....

config.status: creating Makefile

config.status: creating config.h

config.status: config.h is unchanged

config.status: executing depdir commands

make[2]: Leaving directory `/home/zhuobuer/gcc-8.1.0'

make[1]: *** [stage1-bubble] Error 2

make[1]: Leaving directory `/home/zhuobuer/gcc-8.1.0'

make: *** [all] Error 2

我已经四处搜索,但还没有得到这个问题的答案。有人可以帮我吗?

最佳答案

我在使用 Intel 编译器进行编译时遇到了同样的错误,但使用 GNU 编译器时却没有。

尝试使用(以前版本的)GNU 编译器进行编译。这可能会解决您的问题。

关于linux - gcc 使错误 libcpp/charset.c(1747) : error: identifier "saved_error_handler" is undefined,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50918124/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com