Modify

Opened 8 years ago

Closed 8 years ago

Last modified 4 years ago

#6193 closed defect (fixed)

updatedd fail to builds with gcc 4.3.3+cs

Reported by: anonymous Owned by: developers
Priority: normal Milestone: Barrier Breaker 14.07
Component: toolchain Version:
Keywords: Cc:

Description

ar71xx, updatedd fail to builds after r18094 with:

/staging_dir/toolchain-mips_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/lib/libiberty.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[6]: * [libregfish.la] Error 1

Attachments (2)

004-updatedd-fix-libiberty-dependency.patch (3.5 KB) - added by Alexey Loukianov <mooroon2@…> 8 years ago.
feeds-updatedd-makefile-patch.patch (404 bytes) - added by Alexey Loukianov <mooroon2@…> 8 years ago.
Patch to updatedd Makefile to fo full autoreconfigure on build

Download all attachments as: .zip

Change History (12)

comment:2 Changed 8 years ago by Alexey Loukianov <mooroon2@…>

Same problem with dlink dir-320 + kernel 2.6 (mipsel, uClibc 0.9.30.1 - target brcm47xx):

make[6]: Leaving directory `/misc/Raid5/Projects/OpenWRT/trunk/build_dir/target-mipsel_uClibc-0.9.30.1/updatedd-2.6/src'
Making all in src/plugins
make[6]: Entering directory `/misc/Raid5/Projects/OpenWRT/trunk/build_dir/target-mipsel_uClibc-0.9.30.1/updatedd-2.6/src/plugins'
/bin/sh ../../libtool --tag=CC --mode=link mipsel-openwrt-linux-uclibc-gcc -Wall -Wwrite-strings -Wstrict-prototypes -Wno-trigraphs -Os -pipe -mips32 -mtune=mips32 -funit-at-a-time -fhonour-copts -msoft-float   -L/misc/Raid5/Projects/OpenWRT/trunk/staging_dir/target-mipsel_uClibc-0.9.30.1/usr/lib -L/misc/Raid5/Projects/OpenWRT/trunk/staging_dir/target-mipsel_uClibc-0.9.30.1/lib -L/misc/Raid5/Projects/OpenWRT/trunk/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/lib -L/misc/Raid5/Projects/OpenWRT/trunk/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1/lib  -o libregfish.la -rpath /usr/lib/updatedd  libregfish.lo ../../libupdatedd-exception/libupdatedd-exception.la -liberty -ldl -lnsl -lresolv
mipsel-openwrt-linux-uclibc-gcc -shared  .libs/libregfish.o -Wl,--whole-archive ../../libupdatedd-exception/.libs/libupdatedd-exception.a -Wl,--no-whole-archive  -L/misc/Raid5/Projects/OpenWRT/trunk/staging_dir/target-mipsel_uClibc-0.9.30.1/usr/lib -L/misc/Raid5/Projects/OpenWRT/trunk/staging_dir/target-mipsel_uClibc-0.9.30.1/lib -L/misc/Raid5/Projects/OpenWRT/trunk/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/lib -L/misc/Raid5/Projects/OpenWRT/trunk/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1/lib -liberty -ldl -lnsl -lresolv  -mips32 -mtune=mips32 -msoft-float -Wl,-soname -Wl,libregfish.so.0 -o .libs/libregfish.so.0.0.0
/misc/Raid5/Projects/OpenWRT/trunk/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/lib/gcc/mipsel-openwrt-linux-uclibc/4.3.3/../../../../mipsel-openwrt-linux-uclibc/bin/ld: /misc/Raid5/Projects/OpenWRT/trunk/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/lib/libiberty.a(strncmp.o): relocation R_MIPS_26 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/misc/Raid5/Projects/OpenWRT/trunk/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/lib/libiberty.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[6]: *** [libregfish.la] Error 1

comment:3 Changed 8 years ago by Alexey Loukianov <mooroon2@…>

Looks like this bug is related with the fact that libiberty is a static-only lib (http://gcc.gnu.org/ml/gcc/2009-07/msg00157.html).

I hadn't got enough time to make myself clear what is the exact cause of this bug, but at least I have found a way to avoid it: updatedd require libiberty only of "Tru64" systems (WTH is it?), as vsprintf is only available in libiberty on that platform. So it is safe to remove checks for vsprintf in libiberty from configure (actually, the check itself is incorrect - it just tries to compile with -liberty, and in case there are not complains from linker it thinks that libiberty is required - while it is not and just the same code sniplet would compile and link fine without libiberty).

I've done quick-n-dirty patch that fixes this compilation issue (I'll attach it to this ticket in a minute).

Changed 8 years ago by Alexey Loukianov <mooroon2@…>

comment:4 Changed 8 years ago by brian@…

Is this a patch that will be landed or is this issue still under investigation? Surely this must be hampering everyone, yes?

comment:5 Changed 8 years ago by brian@…

When I apply this patch and try to build updatedd configure runs, does it substitutions on the various files and then errors out as such:

config.status: executing depfiles commands
touch /usr/src/openwrt/build_dir/target-mipsel_uClibc-0.9.30.1/updatedd-2.6/.configured_
CFLAGS="-Os -pipe -mips32 -mtune=mips32 -funit-at-a-time -fhonour-copts -msoft-float  -I/usr/src/openwrt/staging_dir/target-mipsel_uClibc-0.9.30.1/usr/include -I/usr/src/openwrt/staging_dir/target-mipsel_uClibc-0.9.30.1/include -I/usr/src/openwrt/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/include -I/usr/src/openwrt/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1/include " CXXFLAGS="-Os -pipe -mips32 -mtune=mips32 -funit-at-a-time -fhonour-copts -msoft-float  -I/usr/src/openwrt/staging_dir/target-mipsel_uClibc-0.9.30.1/usr/include -I/usr/src/openwrt/staging_dir/target-mipsel_uClibc-0.9.30.1/include -I/usr/src/openwrt/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/include -I/usr/src/openwrt/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1/include " LDFLAGS="-L/usr/src/openwrt/staging_dir/target-mipsel_uClibc-0.9.30.1/usr/lib -L/usr/src/openwrt/staging_dir/target-mipsel_uClibc-0.9.30.1/lib -L/usr/src/openwrt/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/lib -L/usr/src/openwrt/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1/lib " make -C /usr/src/openwrt/build_dir/target-mipsel_uClibc-0.9.30.1/updatedd-2.6/. AR=mipsel-openwrt-linux-uclibc-ar AS="mipsel-openwrt-linux-uclibc-gcc -c -Os -pipe -mips32 -mtune=mips32 -funit-at-a-time -fhonour-copts -msoft-float" LD=mipsel-openwrt-linux-uclibc-ld NM=mipsel-openwrt-linux-uclibc-nm CC="mipsel-openwrt-linux-uclibc-gcc" GCC="mipsel-openwrt-linux-uclibc-gcc" CXX="mipsel-openwrt-linux-uclibc-g++" RANLIB=mipsel-openwrt-linux-uclibc-ranlib STRIP=mipsel-openwrt-linux-uclibc-strip OBJCOPY=mipsel-openwrt-linux-uclibc-objcopy OBJDUMP=mipsel-openwrt-linux-uclibc-objdump SIZE=mipsel-openwrt-linux-uclibc-size CROSS="mipsel-openwrt-linux-uclibc-" ARCH="mipsel" DESTDIR="/usr/src/openwrt/build_dir/target-mipsel_uClibc-0.9.30.1/updatedd-2.6/ipkg-install" all install ;
make[3]: Entering directory `/usr/src/openwrt/build_dir/target-mipsel_uClibc-0.9.30.1/updatedd-2.6'
cd . && /bin/bash /usr/src/openwrt/build_dir/target-mipsel_uClibc-0.9.30.1/updatedd-2.6/missing --run aclocal-1.9 
 cd . && /bin/bash /usr/src/openwrt/build_dir/target-mipsel_uClibc-0.9.30.1/updatedd-2.6/missing --run automake-1.9 --gnu 
configure.ac:24: version mismatch.  This is Automake 1.9.6,
configure.ac:24: but the definition used by this AM_INIT_AUTOMAKE
configure.ac:24: comes from Automake 1.10.  You should recreate
configure.ac:24: aclocal.m4 with aclocal and run automake again.
make[3]: *** [Makefile.in] Error 1
make[3]: Leaving directory `/usr/src/openwrt/build_dir/target-mipsel_uClibc-0.9.30.1/updatedd-2.6'
make[2]: *** [/usr/src/openwrt/build_dir/target-mipsel_uClibc-0.9.30.1/updatedd-2.6/.built] Error 2
make[2]: Leaving directory `/usr/src/openwrt/feeds/packages/net/updatedd'
make[1]: *** [package/feeds/packages/updatedd/compile] Error 2
make[1]: Leaving directory `/usr/src/openwrt'
make: *** [package/feeds/packages/updatedd-compile] Error 2

comment:6 Changed 8 years ago by Alexey Loukianov <mooroon2@…>

Try to strip out from patch changes to configure.ac, or move them to be the first in patch file. Updatedd automake definitions require automake 1.10 while openwrt uses automake 1.9.6. As configure.ac gets patched last, it happens to be more "fresh" than configure.in file, and missing script automatically calls autoconf to recreate configure.in. Autoconf in its turn calls automake, and it fails on AM_INIT_AUTOMAKE macro called with parameters that are only valid for automake 1.10 or later.

So there are several choices to overcome problem:
a) Use automake 1.10 in openwrt toolchain.
b) Do not patch configure.ac.
c) Patch configure.ac first, and then configure.in and others - this will not trigger missing script to do autoreconf.
d) Patch updatedd configure.ac to be compatible with automake-1.9.6.

comment:7 Changed 8 years ago by brian@…

I already did try re-ordering the patch so that configure was the last file patched and that didn't help.

comment:8 Changed 8 years ago by brian@…

However, removing the configure.ac hunk altogether seems to have done the trick.

Changed 8 years ago by Alexey Loukianov <mooroon2@…>

Patch to updatedd Makefile to fo full autoreconfigure on build

comment:9 Changed 8 years ago by Alexey Loukianov <mooroon2@…>

Well, I had just posted here another patch that should trigger full autoreconfiguration of updatedd on build.
Try to place 004-updatedd-fix-libiberty-dependency.patch to feeds/packages/net/updatedd/patches, and then apply feeds-updatedd-makefile-patch.patch.

There's a good chance that your build will succeed. Then again, it might not ;-D.

comment:10 Changed 8 years ago by florian

  • Resolution set to fixed
  • Status changed from new to closed

Applied first patch in r18642, thanks guys!

comment:11 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.