user1878164
user1878164

Reputation: 23

Recipe for target 'graphite-clast-to-gimple.o' failed when I compile GCC Cross-Compiler

I would like to create a GCC cross-compiler and I follow the instruction here here But the problem is each time when I make gcc will have same error blow.

../../gcc-4.8.2/gcc/graphite-clast-to-gimple.c:897:24: error: ‘isl_lp_ok’

was not declared in this scope

assert (lp_result == isl_lp_ok); ^ ../../gcc-4.8.2/gcc/graphite-clast-to-gimple.c:898:34: error:

‘isl_int_get_gmp’ was not declared in this scope

isl_int_get_gmp (isl_value, low); ^

../../gcc-4.8.2/gcc/graphite-clast-to-gimple.c:900:57: error: ‘isl_set_max’

was not declared in this scope

lp_result = isl_set_max (domain, dimension, &isl_value); ^ ../../gcc-4.8.2/gcc/graphite-clast-to-gimple.c:904:27: error:

‘isl_int_clear’ was not declared in this scope

isl_int_clear (isl_value); ^

Makefile:1058: recipe for target 'graphite-clast-to-gimple.o' failed

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

make[1]: Leaving directory '/home/mike/src/build-gcc/gcc'

Makefile:3927: recipe for target 'all-gcc' failed

make: *** [all-gcc] Error 2

At first,I think it may caused by the version problem because the gcc on my openSUSE is 4.8.3,but nothing changed after I use version 4.8.2. Thanks a lot!

Upvotes: 1

Views: 2605

Answers (2)

Brett Hale
Brett Hale

Reputation: 22308

There's a problem with the latest version (0.14?) of the ISL library - the API is not compatible with gcc as of 4.9.2. As for building CLooG, the ISL-0.12.1 version included with 0.18.2 doesn't get configured properly. So you need to build and install your own libraries, and then use those when configuring gcc.

1/. isl-0.12.2

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

where CROSSDIR is where you're installing your cross compiler toolchain, and GMPDIR is the root directory containing lib and include directories for GMP. Unfortunately, this means you will need to build GMP, MPFR, and MPC separately and install, or install them from a package system first. But you might not need this (see below).

2/. cloog-0.18.2

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

There's a ridiculous issue where the Makefile has 'cmake' strings lying about. The solution (from clfs.org) :

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

When configuring gcc, use: --with-isl=$CROSSDIR --with-cloog=$CROSSDIR, and you will need options for: --with-gmp, --with-mpfr, --with-mpc


Alternatively - following the instructions you're using, it may be sufficient to move isl-0.12.2 & cloog-0.18.2 to the isl and cloog subtrees in the gcc source tree. After the configure, go into the cloog build subdirectory and edit the Makefile as above. I haven't tried this. I build and install the packages separately under CROSSDIR for other reasons.

Upvotes: 3

Forrest4096
Forrest4096

Reputation: 169

If you are on Linux, you could probably get the development packages for your system. I know the commands for a Debian-based system such as Ubuntu and its variants.

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

After that, delete the isl and cloog directories in your gcc folder, then try to continue from:

make all-gcc

If you don't have a Debian-based system, some hunting around in Google Forest should help.

Upvotes: 1

Related Questions