Bug 12703 - "icc" string in path, might lead to build errors.
Summary: "icc" string in path, might lead to build errors.
Status: RESOLVED WORKSFORME
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 2.4.2
Hardware: x86 Multiple
: Undecided enhancement
Target Milestone: ---
Assignee: Ross Burton
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2018-04-20 09:42 UTC by Riccardo
Modified: 2018-04-23 03:13 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Yes (doc changes required)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Riccardo 2018-04-20 09:42:37 UTC
This is a respin of bug 11592, building in folder path ~/Documents/Riccardo/Prova/poky/build causes the build itself to fail while compiling python3 recipe.
Moving to a lowercase only $PWD such as ~ made the same build succeed.
For some reasons python3 configure script is bailing-out while checking for gcc and detecting an unexisting icc (and then failing because of unknown $*FLAGS).

Please add a QA warning.

Attaching pastebin link with output

https://pastebin.com/6uYjQt0d
Comment 1 Ross Burton 2018-04-20 09:54:05 UTC
11592 was related to packages with uppercase names, which breaks dpkg.

I always do builds in a directory with an uppercase letter in, so that isn't the problem.  Something else must have changed, resolving works for me.  Please file a new bug if you can reproduce on demand from a pristine configuration.
Comment 2 Gianfranco 2018-04-20 14:36:22 UTC
Hello, after doing some deeper research, I discovered that this isn't an upper case issue, but rather an
"Do you have *icc* in your path name issue"
Most likely this comes from some weird python3 configure issue, I'll debug it when I get a chance.

For now to reproduce just use icc as build directory.
Comment 3 Gianfranco 2018-04-21 02:37:34 UTC
Ok, the problem is this one, and I crafted a quick and dirty patch
(this works assuming the compiler ends with gcc$ and not gcc-7$ or similar.

the stuff passed to --sysroot in $CC contained the *icc* string, adding the flags for icc compiler

CC='arm-poky-linux-gnueabi-gcc  -march=armv7ve -marm -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7 -DNDEBUG -fno-inline --sysroot=/home/test/poky/icc-build-directory/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/python3/3.5.3-r1.0/recipe-sysroot'

Ross, do you think is sane to submit something like this to python folks?

--- a/configure.ac	2018-04-21 11:10:43.351156044 +0200
+++ b/configure.ac	2018-04-21 11:12:17.329798702 +0200
@@ -1318,11 +1318,11 @@ fi],
 [AC_MSG_RESULT(no)])
 if test "$Py_LTO" = 'true' ; then
   case $CC in
-    *clang*)
+    *clang)
       # Any changes made here should be reflected in the GCC+Darwin case below
       LTOFLAGS="-flto"
       ;;
-    *gcc*)
+    *gcc)
       case $ac_sys_system in
         Darwin*)
           LTOFLAGS="-flto"
@@ -1382,7 +1382,7 @@ then
 fi
 LLVM_PROF_ERR=no
 case $CC in
-  *clang*)
+  *clang)
     # Any changes made here should be reflected in the GCC+Darwin case below
     PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
     PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
@@ -1397,7 +1397,7 @@ case $CC in
       fi
     fi
     ;;
-  *gcc*)
+  *gcc)
     case $ac_sys_system in
       Darwin*)
         PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
@@ -1421,7 +1421,7 @@ case $CC in
         ;;
     esac
     ;;
-  *icc*)
+  *icc)
     PGO_PROF_GEN_FLAG="-prof-gen"
     PGO_PROF_USE_FLAG="-prof-use"
     LLVM_PROF_MERGER="true"
@@ -1459,7 +1459,7 @@ then
 
         # Clang also needs -fwrapv
         case $CC in
-            *clang*) WRAP="-fwrapv"
+            *clang) WRAP="-fwrapv"
             ;;
         esac
 
@@ -1541,7 +1541,7 @@ yes)
     # ICC doesn't recognize the option, but only emits a warning
     ## XXX does it emit an unused result warning and can it be disabled?
     case "$CC" in
-    *icc*)
+    *icc)
     ac_cv_disable_unused_result_warning=no
     ;;
     *)
@@ -1796,7 +1796,7 @@ esac
 
 # ICC needs -fp-model strict or floats behave badly
 case "$CC" in
-*icc*)
+*icc)
     CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
     ;;
 esac
@@ -2562,7 +2562,7 @@ then
 		else CCSHARED="-Kpic -belf"
 		fi;;
 	IRIX*/6*)  case $CC in
-		   *gcc*) CCSHARED="-shared";;
+		   *gcc) CCSHARED="-shared";;
 		   *) CCSHARED="";;
 		   esac;;
 	esac
@@ -2603,7 +2603,7 @@ then
 			LINKFORSHARED="-Wl,--export-dynamic"
 		fi;;
 	SunOS/5*) case $CC in
-		  *gcc*)
+		  *gcc)
 		    if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
 		    then
 			LINKFORSHARED="-Xlinker --export-dynamic"
@@ -5233,7 +5233,7 @@ if test "$have_gcc_asm_for_x87" = yes; t
     # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
     # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
     case $CC in
-        *gcc*)
+        *gcc)
             AC_MSG_CHECKING(for gcc ipa-pure-const bug)
             saved_cflags="$CFLAGS"
             CFLAGS="-O2"
Comment 4 Gianfranco 2018-04-23 03:13:00 UTC
I opened an upstream bug report
https://bugs.python.org/issue33341