【问题标题】:Recipe for target 'graphite-clast-to-gimple.o' failed when I compile GCC Cross-Compiler编译 GCC 交叉编译器时,目标“graphite-clast-to-gimple.o”的配方失败
【发布时间】:2015-04-16 15:17:57
【问题描述】:

我想创建一个 GCC 交叉编译器,我按照这里的指令here 但问题是每次我制作 gcc 时都会遇到同样的错误。

../../gcc-4.8.2/gcc/graphite-clast-to-gimple.c:897:24: 错误:'isl_lp_ok'

未在此范围内声明

断言(lp_result == isl_lp_ok); ^ ../../gcc-4.8.2/gcc/graphite-clast-to-gimple.c:898:34:错误:

‘isl_int_get_gmp’没有在这个范围内声明

isl_int_get_gmp (isl_value, 低); ^

../../gcc-4.8.2/gcc/graphite-clast-to-gimple.c:900:57: 错误:'isl_set_max'

未在此范围内声明

lp_result = isl_set_max(域,维度,&isl_value); ^ ../../gcc-4.8.2/gcc/graphite-clast-to-gimple.c:904:27:错误:

‘isl_int_clear’没有在这个范围内声明

isl_int_clear (isl_value); ^

Makefile:1058:目标“graphite-clast-to-gimple.o”的配方失败

make[1]: *** [graphite-clast-to-gimple.o] 错误 1

make[1]: 离开目录'/home/mike/src/build-gcc/gcc'

Makefile:3927: 目标“all-gcc”的配方失败

make: *** [all-gcc] 错误 2

起初,我认为可能是版本问题,因为我的openSUSE上的gcc是4.8.3,但我使用4.8.2版本后没有任何变化。 非常感谢!

【问题讨论】:

    标签: c gcc makefile


    【解决方案1】:

    ISL 库的最新版本(0.14?)存在问题 - 从 4.9.2 开始,该 API 与 gcc 不兼容。至于构建 ClooG,0.18.2 中包含的 ISL-0.12.1 版本没有正确配置。所以你需要构建和安装自己的库,然后在配置 gcc 时使用它们。

    1/. isl-0.12.2

    > ./configure --prefix=$CROSSDIR --with-gmp-prefix=$GMPDIR
    > make install # and rehash, etc.
    

    CROSSDIR 是您安装交叉编译器工具链的位置,GMPDIR 是包含 GMP 的 libinclude 目录的根目录。不幸的是,这意味着您需要分别构建 GMP、MPFR 和 MPC 并安装,或者首先从包系统安装它们。但您可能不需要这个(见下文)。

    2/. cloog-0.18.2

    > ./configure --prefix=$CROSSDIR --with-isl-prefix=$CROSSDIR \
    --with-gmp-prefix=$GMPDIR
    

    Makefile 中有'cmake' 字符串存在一个荒谬的问题。解决方案(来自 clfs.org):

    > sed '/cmake/d' Makefile > Makefile.new
    > mv Makefile.new Makefile
    > make install # and rehash, etc.
    

    配置 gcc 时,使用:--with-isl=$CROSSDIR --with-cloog=$CROSSDIR,您将需要以下选项:--with-gmp--with-mpfr--with-mpc


    或者 - 按照您使用的说明,将 isl-0.12.2 和 cloog-0.18.2 移动到 gcc 源树中的 isl 和 cloog 子树可能就足够了。配置完成后,进入 cloog build 子目录并像上面一样编辑 Makefile。我没试过这个。由于其他原因,我在 CROSSDIR 下单独构建和安装软件包。

    【讨论】:

      【解决方案2】:

      如果您使用的是 Linux,您可能会获得适用于您系统的开发包。我知道基于 Debian 的系统(例如 Ubuntu 及其变体)的命令。

      sudo apt-get install libisl-dev
      sudo apt-get install libcloog-isl-dev
      

      之后,删除你的gcc文件夹中的isl和clog目录,然后尝试从以下位置继续:

      make all-gcc
      

      如果您没有基于 Debian 的系统,在 Google Forest 中四处寻找应该会有所帮助。

      【讨论】:

      • 或者更简单:aptitude build-dep gcc
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-09-03
      • 1970-01-01
      • 1970-01-01
      • 2020-02-05
      • 2018-08-08
      相关资源
      最近更新 更多