Bug 7289

Summary: Fail to build iptables with mips toolchain sdk
Product: [Yocto Project Subprojects] ADT Reporter: Yi Zhao <yi.zhao>
Component: adtAssignee: Randy Witt <randy.e.witt>
Status: VERIFIED INVALID QA Contact: Alexandru Georgescu <alexandru.c.georgescu>
Severity: normal    
Priority: Medium+ CC: alexandru.c.georgescu, jessica.zhang, ke.zou, poky.adt.watcher, poky.watcher, richard.purdie, ross.burton, sgw, yi.zhao, zhangle.yang
Version: 1.8   
Target Milestone: 1.8 M3   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: Regression (Used to work)
Verified: Documentation change: No (bug/feature does not impact docs)
Attachments:
Description Flags
autogen.log
none
configure.log
none
make.log none

Description Yi Zhao 2015-02-05 07:52:36 UTC
Toolchain sdk location: http://autobuilder.yoctoproject.org/pub/nightly/20150202-1/toolchain/

Git rev: master/22c38e2d8a058619e3d05534b5e830b750aa4241


Steps:
1. Download the mips toolchain sdk from above link and install it.
2. Setup environment:
   $ source /opt/poky/1.7/environment-setup-mips32r2-poky-linux
3. Build iptables 1.4.21:
   $ cd iptables-1.4.21/
   $ ./autogen.sh
   $ ./configure ${CONFIGURE_FLAGS}
   $ make

Error message:
########################
make  all-recursive
make[1]: Entering directory `/home/build/iptables-1.4.21'
Making all in libiptc
make[2]: Entering directory `/home/build/iptables-1.4.21/libiptc'
../mips-poky-linux-libtool  --tag=CC   --mode=compile mips-poky-linux-gcc  -meb -mabi=32 -mhard-float -march=mips32r2 --sysroot=/opt/poky/1.7/sysroots/mips32r2-poky-linux -DHAVE_CONFIG_H -I. -I..  -D_LARGEFILE_SOURCE=1 -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 -D_REENTRANT 	-DXTABLES_LIBDIR=\"/usr/local/lib/xtables\" -DXTABLES_INTERNAL -I../include -I../include   -Wall -Waggregate-return -Wmissing-declarations 	-Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes 	-Winline -pipe -O2 -pipe -g -feliminate-unused-debug-types -MT libip4tc.lo -MD -MP -MF .deps/libip4tc.Tpo -c -o libip4tc.lo libip4tc.c
mips-poky-linux-libtool: Version mismatch error.  This is libtool 2.4.2 Debian-2.4.2-1.2, but the
mips-poky-linux-libtool: definition of this LT_INIT comes from libtool 2.4.5.
mips-poky-linux-libtool: You should recreate aclocal.m4 with macros from libtool 2.4.2 Debian-2.4.2-1.2
mips-poky-linux-libtool: and run autoconf again.
make[2]: *** [libip4tc.lo] Error 63
make[2]: Leaving directory `/home/build/iptables-1.4.21/libiptc'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/build/iptables-1.4.21'
make: *** [all] Error 2
#########################

If I skip the step "./autogen.sh", it can be built successfully, but there is a warning message when configure:
###################
configure: WARNING: unrecognized options: --with-libtool-sysroot
###################

This issue only exists for mips toolchain. And it doesn't happen on all distributions. I tested several distributions, it only happened on Ubuntu (14.10/14.04), Debian 7 and CentOS 6. but not happened on Fedora 21, openSUSE 13.2 and CentOS 7

The detail logs are attached.
Comment 1 Yi Zhao 2015-02-05 07:55:36 UTC
Created attachment 2391 [details]
autogen.log
Comment 2 Yi Zhao 2015-02-05 07:55:53 UTC
Created attachment 2392 [details]
configure.log
Comment 3 Yi Zhao 2015-02-05 07:56:12 UTC
Created attachment 2393 [details]
make.log
Comment 4 Ross Burton 2015-02-25 15:38:36 UTC
The problem is that libtool is mismatching.  Instead of using autogen, try running autoreconf.
Comment 5 Yi Zhao 2015-02-28 07:48:04 UTC
(In reply to comment #4)
> The problem is that libtool is mismatching.  Instead of using autogen, try
> running autoreconf.

Running autoreconf could work but caused a warning message when configure:
###################
configure: WARNING: unrecognized options: --with-libtool-sysroot
###################
Comment 6 Yi Zhao 2015-03-06 09:57:18 UTC
This issue doesn't exist in 1.8 M3 rc3 testing
Comment 7 Ross Burton 2015-03-06 11:34:46 UTC
Closing then.
Comment 8 Alexandru Georgescu 2015-03-26 06:24:28 UTC
verified as per above comments.