Bug 4845

Summary: m4-native:do_configure failed with gcc version 4.1.2 on x86
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Chunrong Guo <b40290>
Component: coreAssignee: Randy MacLeod <randy.macleod>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: Medium CC: b40290, bluelightning, hongxu.jia, meta.mr.watcher, meta.watcher, richard.purdie, sgw
Version: 1.5   
Target Milestone: 1.5   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Chunrong Guo 2013-07-12 05:51:19 UTC
branch:master
poky :a63229917a5708de2d161aba0d67168ce0da6365

Test Env: 
CentOS release 5.9 (Final)
Linux 2.6.18-348.12.1.el5.centos.plus
gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-54)

$ source  ./oe-init-build-env 

add BUILD_CFLAGS_append = " -march=native" to local.conf

$bitbake m4-native
the below error log:
NOTE: Executing RunQueue Tasks
$<50>ERROR: Function failed: do_configure (log file is located at /home/poky/build/tmp/work/x86_64-linux/m4-native/1.4.16-r4/temp/log.do_configure.21791)
$<50>ERROR: Logfile of failure stored in: /home/poky/build/tmp/work/x86_64-linux/m4-native/1.4.16-r4/temp/log.do_configure.21791
Log data follows:
| DEBUG: Executing python function sysroot_cleansstate
| DEBUG: Python function sysroot_cleansstate finished
| DEBUG: Executing shell function autotools_preconfigure
| DEBUG: Shell function autotools_preconfigure finished
| DEBUG: Executing shell function do_configure
| NOTE: Running /home/b19537/jenkins/reports/poky/build/tmp/work/x86_64-linux/m4-native/1.4.16-r4/m4-1.4.16/configure  --build=x86_64-linux                  --host=x86_64-linux             --target=x86_64-linux                   --prefix=/home/b19537/jenkins/reports/poky/build/tmp/sysroots/x86_64-linux/usr             --exec_prefix=/home/b19537/jenkins/reports/poky/build/tmp/sysroots/x86_64-linux/usr             --bindir=/home/b19537/jenkins/reports/poky/build/tmp/sysroots/x86_64-linux/usr/bin                 --sbindir=/home/b19537/jenkins/reports/poky/build/tmp/sysroots/x86_64-linux/usr/sbin               --libexecdir=/home/b19537/jenkins/reports/poky/build/tmp/sysroots/x86_64-linux/usr/lib/m4                  --datadir=/home/b19537/jenkins/reports/poky/build/tmp/sysroots/x86_64-linux/usr/share                   --sysconfdir=/home/b19537/jenkins/reports/poky/build/tmp/sysroots/x86_64-linux/etc                 --sharedstatedir=/home/b19537/jenkins/reports/poky/build/tmp/sysroots/x86_64-linux/com             --localstatedir=/home/b19537/jenkins/reports/poky/build/tmp/sysroots/x86_64-linux/var     --libdir=/home/b19537/jenkins/reports/poky/build/tmp/sysroots/x86_64-linux/usr/lib               --includedir=/home/b19537/jenkins/reports/poky/build/tmp/sysroots/x86_64-linux/usr/include                 --oldincludedir=/home/b19537/jenkins/reports/poky/build/tmp/sysroots/x86_64-linux/usr/include              --infodir=/home/b19537/jenkins/reports/poky/build/tmp/sysroots/x86_64-linux/usr/share/info              --mandir=/home/b19537/jenkins/reports/poky/build/tmp/sysroots/x86_64-linux/usr/share/man                   --disable-silent-rules            --disable-dependency-tracking
| checking for a BSD-compatible install... /usr/bin/install -c
| checking whether build environment is sane... yes
| checking for a thread-safe mkdir -p... /bin/mkdir -p
| checking for gawk... gawk
| checking whether make sets $(MAKE)... yes
| checking for x86_64-linux-gcc... gcc
| checking whether the C compiler works... no
| configure: error: in `/home/poky/build/tmp/work/x86_64-linux/m4-native/1.4.16-r4/build':
| configure: error: C compiler cannot create executables
| See `config.log' for more details
| Configure failed. The contents of all config.log files follows to aid debugging
| ERROR: oe_runconf failed
| ERROR: Function failed: do_configure (log file is located at /home/b19537/jenkins/reports/poky/build/tmp/work/x86_64-linux/m4-native/1.4.16-r4/temp/log.do_configure.21791)
$<50>ERROR: Task 1044 (/home/poky/meta/recipes-devtools/m4/m4-native_1.4.16.bb, do_configure) failed with exit code '1'
$<50>NOTE: Tasks Summary: Attempted 19 tasks of which 18 didn't need to be rerun and 1 failed.
No currently running tasks (18 of 1669)

Summary: 1 task failed:
  /home/poky/meta/recipes-devtools/m4/m4-native_1.4.16.bb, do_configure
Summary: There was 1 WARNING message shown.
Summary: There was 1 ERROR message shown, returning a non-zero exit code.
Comment 1 Hongxu Jia 2013-07-12 07:00:25 UTC
gcc 4.1.2 doesn't support option `-march=native'.

It is supported in 4.2 or later, see details:

http://gcc.gnu.org/gcc-4.2/changes.html

You could update your host gcc to fix this.
So, I think it's not a bug.
Comment 2 Paul Eggleton 2013-07-15 17:23:58 UTC
Assigning to Randy as Mark tells me he's working on a fix for this.
Comment 3 Richard Purdie 2014-07-24 15:33:24 UTC
At this project gcc 4.1.2 is old and isn't something the project is planning to support.