Bug 9048 - Failed to build iptables with extensible sdk on Fedora 23 i686
Summary: Failed to build iptables with extensible sdk on Fedora 23 i686
Status: VERIFIED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: devtools / tool chain (show other bugs)
Version: 2.1
Hardware: x86 Multiple
: Medium normal
Target Milestone: 2.2 M4
Assignee: Robert Yang
QA Contact: Yi Zhao
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2016-02-04 09:43 UTC by Yi Zhao
Modified: 2016-10-14 03:24 UTC (History)
6 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: New (Never tested)
Verified:
Documentation change: Don't know


Attachments
config.log (87.06 KB, text/x-log)
2016-02-05 01:50 UTC, Yi Zhao
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yi Zhao 2016-02-04 09:43:07 UTC
Git rev: master/3d2c0f5902cacf9d8544bf263b51ef0dd1a7218c

Host: 
Fedora 23 i686 with latest update
$ uname -a
Linux pek-usp-6 4.3.4-300.fc23.i686+PAE #1 SMP Mon Jan 25 13:58:27 UTC 2016 i686 i686 i386 GNU/Linux

$ /lib/libc.so.6 
GNU C Library (GNU libc) stable release version 2.22, by Roland McGrath et al.
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 5.3.1 20151207 (Red Hat 5.3.1-2).
Available extensions:
	The C stubs add-on version 2.1.2.
	crypt add-on version 2.1 by Michael Glad and others
	GNU Libidn by Simon Josefsson
	Native POSIX Threads Library by Ulrich Drepper et al
	BIND-8.2.3-T5B
	RT using linux kernel aio
libc ABIs: UNIQUE IFUNC
For bug reporting instructions, please see:
<http://www.gnu.org/software/libc/bugs.html>.

$ gcc -v
Using built-in specs.
COLLECT_GCC=/usr/bin/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/i686-redhat-linux/5.3.1/lto-wrapper
Target: i686-redhat-linux
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,objc,obj-c++,fortran,ada,go,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --disable-libgcj --with-isl --enable-libmpx --enable-gnu-indirect-function --with-tune=generic --with-arch=i686 --build=i686-redhat-linux
Thread model: posix
gcc version 5.3.1 20151207 (Red Hat 5.3.1-2) (GCC) 


Reproduce steps:
##################################
1. Build extensible sdk and install it on fedora 23 i686

2. Set the environment
   $ . /buildarea/poky_sdk/environment-setup-i586-poky-linux
   $ export
   declare -x AR="i586-poky-linux-ar"
   declare -x ARCH="i386"
   declare -x AS="i586-poky-linux-as  "
   declare -x CC="i586-poky-linux-gcc  -m32 -march=i586 --sysroot=/buildarea/poky_sdk/tmp/sysroots/qemux86"
   declare -x CFLAGS=" -O2 -pipe -g -feliminate-unused-debug-types"
   declare -x CONFIGURE_FLAGS="--target=i586-poky-linux --host=i586-poky-linux --build=i686-linux --with-libtool-sysroot=/buildarea/poky_sdk/tmp/sysroots/qemux86"

3. Build iptables:
$ cd iptables-1.4.21/
$ ./configure ${CONFIGURE_FLAGS}
####################################
configure: WARNING: unrecognized options: --with-libtool-sysroot
configure: loading site script /buildarea/poky_sdk/site-config-i586-poky-linux
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for i586-poky-linux-strip... i586-poky-linux-strip
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for i586-poky-linux-gcc... i586-poky-linux-gcc  -m32 -march=i586 --sysroot=/buildarea/poky_sdk/tmp/sysroots/qemux86
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... yes
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether i586-poky-linux-gcc  -m32 -march=i586 --sysroot=/buildarea/poky_sdk/tmp/sysroots/qemux86 accepts -g... yes
checking for i586-poky-linux-gcc  -m32 -march=i586 --sysroot=/buildarea/poky_sdk/tmp/sysroots/qemux86 option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of i586-poky-linux-gcc  -m32 -march=i586 --sysroot=/buildarea/poky_sdk/tmp/sysroots/qemux86... gcc3
checking whether i586-poky-linux-gcc  -m32 -march=i586 --sysroot=/buildarea/poky_sdk/tmp/sysroots/qemux86 and cc understand -c and -o together... yes
checking for i586-poky-linux-ar... i586-poky-linux-ar
checking the archiver (i586-poky-linux-ar) interface... unknown
configure: error: could not determine i586-poky-linux-ar interface
#################################################

This issue only happens on Fedora 23 i686. On other distributions include Fedora 23 x86_64, it works fine.
Comment 1 Richard Purdie 2016-02-04 16:05:03 UTC
Do you have the config.log for this failure?
Comment 2 Yi Zhao 2016-02-05 01:50:43 UTC
Created attachment 2968 [details]
config.log
Comment 3 Armin Kuster 2016-02-09 02:06:29 UTC
setup env to install F23 on. In process of trying to reproduce.
Comment 4 Armin Kuster 2016-02-09 17:24:51 UTC
Here are my steps:

I did all test steps in a F23 i586 install within a VM on my mac.

1) bitbake -c populate_sdk_ext core-image-minimal
2) ./poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-ext-1.7.sh
3)  . ./environment-setup-core2-64-poky-linux
4) devtool add iptables {path to iptables sources}
5) devtool build  iptables

no errors

using master:b33e440cc6fbd703e8045d94b806790343e72eb6 

did I get the steps correct? 

Should I try at the git commit listed in this bug?
Comment 5 Yi Zhao 2016-02-15 04:34:03 UTC
(In reply to comment #4)
> Here are my steps:
> 
> I did all test steps in a F23 i586 install within a VM on my mac.
> 
> 1) bitbake -c populate_sdk_ext core-image-minimal
> 2) ./poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-ext-1.7.sh
> 3)  . ./environment-setup-core2-64-poky-linux
> 4) devtool add iptables {path to iptables sources}
> 5) devtool build  iptables
> 
> no errors
> 
> using master:b33e440cc6fbd703e8045d94b806790343e72eb6 
> 
> did I get the steps correct? 
> 
> Should I try at the git commit listed in this bug?

Hi Armin,

Sorry for late reply due to our Chinese New Year vacation.
I didn't use devtool to build iptables. 

My steps are:
. ./environment-setup-core2-64-poky-linux
cd iptables-1.4.21/; ./configure ${CONFIGURE_FLAGS}

This is a test case for sdk toolchain: https://bugzilla.yoctoproject.org/tr_show_case.cgi?case_id=369

I think it should also be available for ext sdk.
Comment 6 Richard Purdie 2016-02-15 21:53:58 UTC
The key piece from config.log is:

configure:4218: checking the archiver (i586-poky-linux-ar) interface
configure:4228: i586-poky-linux-gcc  -m32 -march=i586 --sysroot=/buildarea/poky_sdk/tmp/sysroots/qemux86 -c  -O2 -pipe -g -feliminate-unused-debug-types  conftest.c >&5
configure:4228: $? = 0
configure:4230: i586-poky-linux-ar cru libconftest.a conftest.o >&5
i586-poky-linux-ar: relocation error: /usr/lib/libc.so.6: symbol _dl_starting_up, version GLIBC_PRIVATE not defined in file ld-linux.so.2 with link time reference
configure:4233: $? = 127
configure:4239: i586-poky-linux-ar -NOLOGO -OUT:conftest.lib conftest.o >&5
i586-poky-linux-ar: relocation error: /usr/lib/libc.so.6: symbol _dl_starting_up, version GLIBC_PRIVATE not defined in file ld-linux.so.2 with link time reference
configure:4242: $? = 127
configure:4256: result: unknown
configure:4272: error: could not determine i586-poky-linux-ar interface

which suggests something in the relocation code means this is using the wrong libc...
Comment 7 Yi Zhao 2016-07-13 01:49:35 UTC
This issue still happens on 2.1.1 rc1 and Fedora 24 i686
Comment 8 Robert Yang 2016-10-13 09:41:59 UTC
Works for me on master branch. (YP 2.2)
Comment 9 Robert Yang 2016-10-13 09:42:45 UTC
Works for me.
Comment 10 Yi Zhao 2016-10-14 03:24:42 UTC
This issue should be related with bug 9287.
Verified with 2.2 rc1.
git rev: morty/371ab635086e2878ada1f00a59c7ec826481ba0a