Bug 8376

Summary: gcc-cross-initial 5.2 fails to build if isl installed on host system
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Richard Tollerton <rich.tollerton>
Component: coreAssignee: Richard Tollerton <rich.tollerton>
Status: VERIFIED FIXED QA Contact: Bogdan Alexandru Voiculescu <bogdanx.a.voiculescu>
Severity: major    
Priority: Medium+ CC: bogdanx.a.voiculescu, meta.mr.watcher, meta.watcher
Version: 2.0   
Target Milestone: 2.0   
Hardware: All   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: Regression (Used to work)
Verified: Documentation change: No (bug/feature does not impact docs)

Description Richard Tollerton 2015-09-22 20:32:45 UTC
I just tried building oe-core master; it failed while building gcc-cross-initial with many errors like this one:

/ssd/rtollert/oe-core-build/tmp-glibc/work-shared/gcc-5.2.0-r0/gcc-5.2.0/gcc/graphite-dependences.c: In function 'isl_union_map* extend_schedule(isl_union_map*)':
/ssd/rtollert/oe-core-build/tmp-glibc/work-shared/gcc-5.2.0-r0/gcc-5.2.0/gcc/graphite-dependences.c:283:82: error: invalid conversion from 'int (*)(isl_map*, void*)' to 'isl_stat (*)(isl_map*, void*)' [-fpermissive]
   res = isl_union_map_foreach_map (x, max_number_of_out_dimensions, (void *) &max);
                                                                                  ^
Note that we don't presently package isl, but it *was* enabled, cf config.log:

configure:5989: checking for compatible ISL
configure:6002: gcc  -o conftest -isystem/ssd/rtollert/oe-core-build/tmp-glibc/sysroots/x86_64-linux/usr/include -O2 -pipe    -L/ssd/rtollert/oe-core-build/tmp-glibc/sysroots/x86_64-linux/usr/lib -L/ssd/rtollert/oe-core-build/tmp-glibc/sysroots/x86_64-linux/lib -Wl,-rpath-link,/ssd/rtollert/oe-core-build/tmp-glibc/sysroots/x86_64-linux/usr/lib -Wl,-rpath-link,/ssd/rtollert/oe-core-build/tmp-glibc/sysroots/x86_64-linux/lib -Wl,-rpath,/ssd/rtollert/oe-core-build/tmp-glibc/sysroots/x86_64-linux/usr/lib -Wl,-rpath,/ssd/rtollert/oe-core-build/tmp-glibc/sysroots/x86_64-linux/lib -Wl,-O1  -lisl conftest.c  -lisl >&5
configure:6002: $? = 0
configure:6009: result: yes

Looks like gcc might have autodetected the host libisl.

The most direct way to fix this is to add an isl recipe and have gcc depend on it.
Comment 1 Ross Burton 2015-09-22 21:47:29 UTC
The easiest way should be to pass --without-isl to configure.  Can you verify that this solves the problem?
Comment 2 Richard Tollerton 2015-09-22 23:56:29 UTC
Yes, this also fixed the build:

diff --git a/meta/recipes-devtools/gcc/gcc-5.2.inc b/meta/recipes-devtools/gcc/gcc-5.2.inc
index f691f58..f6673e6 100644
--- a/meta/recipes-devtools/gcc/gcc-5.2.inc
+++ b/meta/recipes-devtools/gcc/gcc-5.2.inc
@@ -98,6 +98,7 @@ EXTRA_OECONF_BASE = "\
     --with-cloog=no \
     --enable-checking=release \
     --enable-cheaders=c_global \
+    --without-isl \
 "

 EXTRA_OECONF_INITIAL = "\
@@ -109,6 +110,7 @@ EXTRA_OECONF_INITIAL = "\
     --disable-lto \
     --disable-plugin \
     --enable-decimal-float=no \
+    --without-isl \
 "

 EXTRA_OECONF_append_libc-uclibc = " --disable-decimal-float "
Comment 3 Ross Burton 2015-09-23 10:01:50 UTC
Cool.  Can you send a proper patch to the list?
Comment 4 Richard Tollerton 2015-09-23 14:39:17 UTC
Done. I'll also attempt to update the bugzilla fields, please fix whatever I screwed up.
Comment 5 Richard Tollerton 2015-09-28 17:41:51 UTC
Fixed in 555e8d110435cf4af1e1ab4699c2fa55898e9d80.
Comment 6 Bogdan Alexandru Voiculescu 2015-10-26 15:16:50 UTC
Verified on 505a82673ac2487df5ea343a6422c2fc47018831