Fixed
Created: Oct 15, 2013
Updated: Dec 3, 2018
Resolved Date: Dec 19, 2013
Previous ID: LIN5-3738
Found In Version: 6.0
Fix Version: 6.0.0.2
Severity: Standard
Applicable for: Wind River Linux 6
Component/s: Userspace
snapshot:
=========
| x86_64-wrs-linux-libtool: compile: x86-64-wrswrap-linux-gnu-gcc -m64 --sysroot=/workspace/ers_rp_lsv_wr5_64_ISO/ers_rp/build-rp-wrl5//bitbake_build/tmp/sysroots/intel-xeon-core -DHAVE_CONFIG_H -I. -I.. -I../src -I../src -I/workspace/ers_rp_lsv_wr5_64_ISO/ers_rp/build-rp-wrl5/build/projectDir-intel-xeon-core-Ox8JaM/bitbake_build/tmp/sysroots/intel-xeon-core/usr/include -O2 -pipe -g -fvisibility=hidden -Wall -c whirlpool.c -fPIC -DPIC -o .libs/whirlpool.o
| ./tiger.c:24:19: fatal error: stdio.h: No such file or directory
| compilation terminated.
| make[2]: *** [tiger.lo] Error 1
| make[2]: *** Waiting for unfinished jobs....
| make[2]: Leaving directory `/workspace/ers_rp_lsv_wr5_64_ISO/ers_rp/build-rp-wrl5/build/projectDir-intel-xeon-core-Ox8JaM/bitbake_build/tmp/work/x86_64-wrs-linux/libgcrypt-1.5.0-r0/libgcrypt-1.5.0/cipher'
| make[1]: *** [all-recursive] Error 1
| make[1]: Leaving directory `/workspace/ers_rp_lsv_wr5_64_ISO/ers_rp/build-rp-wrl5/build/projectDir-intel-xeon-core-Ox8JaM/bitbake_build/tmp/work/x86_64-wrs-linux/libgcrypt-1.5.0-r0/libgcrypt-1.5.0'
| make: *** [all] Error 2
| ERROR: oe_runmake failed
| WARNING: /lworkspace/ers_rp_lsv_wr5_64_ISO/ers_rp/build-rp-wrl5/build/projectDir-intel-xeon-core-Ox8JaM/bitbake_build/tmp/work/x86_64-wrs-linux/libgcrypt-1.5.0-r0/temp/do_compile/run.do_compile.20558:110 exit 1 from
| exit 1
| ERROR: Function failed: do_compile (see /lworkspace/ers_rp_lsv_wr5_64_ISO/ers_rp/build-rp-wrl5/build/projectDir-intel-xeon-core-Ox8JaM/bitbake_build/tmp/work/x86_64-wrs-linux/libgcrypt-1.5.0-r0/temp/do_compile/log.do_compile.20558 for further information)
ERROR: Task 4 (/workspace/ers_rp_lsv_wr5_64_ISO/ers_rp/build-rp-wrl5/build/projectDir-intel-xeon-core-Ox8JaM/layers/oe-core/meta/recipes-support/libgcrypt/libgcrypt_1.5.0.bb, do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 280 tasks of which 275 didn't need to be rerun and 1 failed.
Summary: 1 task failed:
/workspace/ers_rp_lsv_wr5_64_ISO/ers_rp/build-rp-wrl5/build/projectDir-intel-xeon-core-Ox8JaM/layers/oe-core/meta/recipes-support/libgcrypt/libgcrypt_1.5.0.bb, do_compile
Summary: There was 1 ERROR message shown, returning a non-zero exit code.
make: *** [libgcrypt.compile] Error 1
make: Leaving directory `/lworkspace/ers_rp_lsv_wr5_64_ISO/ers_rp/build-rp-wrl5/build/projectDir-intel-xeon-core-Ox8JaM/build'
/*******************************************************/
The reason is the sysroot's directory was change to projectDir-intel-xeon-core-O1x8JaM from projectDir-intel-xeon-core-Ox8JaM, so can not find the needed header file.
After checking, it was caused by wrong behaviour in libgcrypt's Makefile, in this Makefile, there is a command:
/*****************************************/
o_flag_munging = sed -e 's/-O[2-9s]*/-O1/g'
/*****************************************/
It was used to do O1 optimization by force, but, unfoutunately, if some string including "-O", it will also change to "-O1", such as project directory name: projectDir-intel-xeon-core-Ox8JaM
let project name do not including string "-O"
We can build any 5.0.1 project to reproduce this issue, the most important is we should use a project directory name which include string"-O".