0

I am trying to build core-image-minimal using poky-pyro 2.3.1, its corresponding Intel-corei7-64 bsp, and building on Debian Jessie. I haven't customized it yet so its just the generic minimal image. Everything else cross-compiles except for python which gives me these errors:

| x86_64-poky-linux-gcc  -m64 -march=corei7 -mtune=corei7 -mfpmath=sse -msse4.2 --sysroot=/home/intel_build/tmp/work/corei7-64-poky-linux/python/2.7.13-r1/recipe-sysroot -c -fno-strict-aliasing -fp-model strict  -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/home/intel_build/tmp/work/corei7-64-poky-linux/python/2.7.13-r1=/usr/src/debug/python/2.7.13-r1 -fdebug-prefix-map=/home/intel_build/tmp/work/corei7-64-poky-linux/python/2.7.13-r1/recipe-sysroot-native= -fdebug-prefix-map=/home/intel_build/tmp/work/corei7-64-poky-linux/python/2.7.13-r1/recipe-sysroot=  -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/home/intel_build/tmp/work/corei7-64-poky-linux/python/2.7.13-r1=/usr/src/debug/python/2.7.13-r1 -fdebug-prefix-map=/home/intel_build/tmp/work/corei7-64-poky-linux/python/2.7.13-r1/recipe-sysroot-native= -fdebug-prefix-map=/home/intel_build/tmp/work/corei7-64-poky-linux/python/2.7.13-r1/recipe-sysroot=   -I. -IInclude -I../Python-2.7.13/Include  -fPIC -DPy_BUILD_CORE -o Modules/python.o ../Python-2.7.13/Modules/python.c
| x86_64-poky-linux-gcc  -m64 -march=corei7 -mtune=corei7 -mfpmath=sse -msse4.2 --sysroot=/home/intel_build/tmp/work/corei7-64-poky-linux/python/2.7.13-r1/recipe-sysroot -c -fno-strict-aliasing -fp-model strict  -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/home/intel_build/tmp/work/corei7-64-poky-linux/python/2.7.13-r1=/usr/src/debug/python/2.7.13-r1 -fdebug-prefix-map=/home/intel_build/tmp/work/corei7-64-poky-linux/python/2.7.13-r1/recipe-sysroot-native= -fdebug-prefix-map=/home/intel_build/tmp/work/corei7-64-poky-linux/python/2.7.13-r1/recipe-sysroot=  -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/home/intel_build/tmp/work/corei7-64-poky-linux/python/2.7.13-r1=/usr/src/debug/python/2.7.13-r1 -fdebug-prefix-map=/home/intel_build/tmp/work/corei7-64-poky-linux/python/2.7.13-r1/recipe-sysroot-native= -fdebug-prefix-map=/home/intel_build/tmp/work/corei7-64-poky-linux/python/2.7.13-r1/recipe-sysroot=   -I. -IInclude -I../Python-2.7.13/Include  -fPIC -DPy_BUILD_CORE -o Parser/acceler.o ../Python-2.7.13/Parser/acceler.c
| ERROR: oe_runmake failed
| x86_64-poky-linux-gcc  -m64 -march=corei7 -mtune=corei7 -mfpmath=sse -msse4.2 --sysroot=/home/intel_build/tmp/work/corei7-64-poky-linux/python/2.7.13-r1/recipe-sysroot -c -fno-strict-aliasing -fp-model strict  -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/home/intel_build/tmp/work/corei7-64-poky-linux/python/2.7.13-r1=/usr/src/debug/python/2.7.13-r1 -fdebug-prefix-map=/home/intel_build/tmp/work/corei7-64-poky-linux/python/2.7.13-r1/recipe-sysroot-native= -fdebug-prefix-map=/home/intel_build/tmp/work/corei7-64-poky-linux/python/2.7.13-r1/recipe-sysroot=  -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/home/intel_build/tmp/work/corei7-64-poky-linux/python/2.7.13-r1=/usr/src/debug/python/2.7.13-r1 -fdebug-prefix-map=/home/intel_build/tmp/work/corei7-64-poky-linux/python/2.7.13-r1/recipe-sysroot-native= -fdebug-prefix-map=/home/intel_build/tmp/work/corei7-64-poky-linux/python/2.7.13-r1/recipe-sysroot=   -I. -IInclude -I../Python-2.7.13/Include  -fPIC -DPy_BUILD_CORE -o Parser/grammar1.o ../Python-2.7.13/Parser/grammar1.c
| x86_64-poky-linux-gcc  -m64 -march=corei7 -mtune=corei7 -mfpmath=sse -msse4.2 --sysroot=/home/intel_build/tmp/work/corei7-64-poky-linux/python/2.7.13-r1/recipe-sysroot -c -fno-strict-aliasing -fp-model strict  -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/home/intel_build/tmp/work/corei7-64-poky-linux/python/2.7.13-r1=/usr/src/debug/python/2.7.13-r1 -fdebug-prefix-map=/home/intel_build/tmp/work/corei7-64-poky-linux/python/2.7.13-r1/recipe-sysroot-native= -fdebug-prefix-map=/home/intel_build/tmp/work/corei7-64-poky-linux/python/2.7.13-r1/recipe-sysroot=  -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/home/intel_build/tmp/work/corei7-64-poky-linux/python/2.7.13-r1=/usr/src/debug/python/2.7.13-r1 -fdebug-prefix-map=/home/intel_build/tmp/work/corei7-64-poky-linux/python/2.7.13-r1/recipe-sysroot-native= -fdebug-prefix-map=/home/intel_build/tmp/work/corei7-64-poky-linux/python/2.7.13-r1/recipe-sysroot=   -I. -IInclude -I../Python-2.7.13/Include  -fPIC -DPy_BUILD_CORE -o Parser/listnode.o ../Python-2.7.13/Parser/listnode.c
| x86_64-poky-linux-gcc: error: strict: No such file or directory
| x86_64-poky-linux-gcc: error: strict: No such file or directory
| x86_64-poky-linux-gcc: error: strict: No such file or directory
| x86_64-poky-linux-gcc: error: unrecognized command line option '-fp-model'
| Makefile:694: recipe for target 'Modules/python.o' failed
| make: *** [Modules/python.o] Error 1
| make: *** Waiting for unfinished jobs....
| x86_64-poky-linux-gcc: error: unrecognized command line option '-fp-model'
| x86_64-poky-linux-gcc: error: strict: No such file or directory
| Makefile:1373: recipe for target 'Parser/grammar1.o' failed
| make: *** [Parser/grammar1.o] Error 1
| x86_64-poky-linux-gcc: error: unrecognized command line option '-fp-model'
| Makefile:1373: recipe for target 'Parser/listnode.o' failed
| make: *** [Parser/listnode.o] Error 1
| x86_64-poky-linux-gcc: error: unrecognized command line option '-fp-model'
| Makefile:1373: recipe for target 'Parser/acceler.o' failed
| make: *** [Parser/acceler.o] Error 1
| ERROR: Function failed: do_compile (log file is located at /home/intel_build/tmp/work/corei7-64-poky-linux/python/2.7.13-r1/temp/log.do_compile.11642)

This happens for both python 2 and 3. I read up on it a bit and it seems the fp-model option is for the intel c compiler icc. Is there a library for gcc somewhere that I am missing, or do I just need to replace the fp-model with the gcc equivalent?

Anthony R
  • 1
  • 1
  • gcc's default is `-fno-fast-math`. I forget if there's a way to disable contraction of mul+add to FMA (including across separate C expressions). (https://stackoverflow.com/questions/15933100/how-to-use-fused-multiply-add-fma-instructions-with-sse-avx). Usually you should use at least `-fno-math-errno`, because nobody looks at `errno` to find out if `sqrt` returned `NaN`. Also, you should use `-march=native` if building binaries to run locally. That also sets `-mtune` to tune for you CPU, so use that instead of `corei7`. – Peter Cordes Sep 26 '17 at 18:52
  • I'm trying to cross-compile a bootable image for a separate intel computer, and bitbake is determining what flags the cross-compiler uses to create the binaries. – Anthony R Sep 26 '17 at 19:51
  • Ok, that's fine then. You could use a more specific `-march`, like `-march=nehalem` if that's what you're really targeting. (That implies sse4.2 but not AVX, like you've also enabled separately). `corei7` is probably pretty close to `nehalem`, or maybe identical. IDK. Nehalem is the first-gen Intel i7 series, and all later ones are `corei7-avx`. – Peter Cordes Sep 26 '17 at 19:55
  • Anyway, I think you should just remove `-fp-model strict`, because gcc's default is pretty close to that. I think ICC's default is a little bit like `gcc -ffast-math`, at least assuming that FP math is associative so it can auto-vectorize (even though rounding error means it isn't quite). – Peter Cordes Sep 26 '17 at 19:57
  • Seems like that worked fine, thank you for the assistance! – Anthony R Sep 29 '17 at 18:13

0 Answers0