gcc make error libcpp / charset.c(1747):error:标识符“saved_error_handler”未定义

问题描述 投票:0回答:1

嗨,我正在尝试在群集(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

我已经四处寻找但没有得到这个答案。有人可以帮帮我吗?

linux gcc makefile configure
1个回答
1
投票

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

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

© www.soinside.com 2019 - 2024. All rights reserved.