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:


ar71xx, updatedd fail to builds after r18094 with:

/staging_dir/toolchain-mips_gcc-4.3.3+cs_uClibc- could not read symbols: Bad value
collect2: ld returned 1 exit status
make[6]: * [] 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 - target brcm47xx):

make[6]: Leaving directory `/misc/Raid5/Projects/OpenWRT/trunk/build_dir/target-mipsel_uClibc-'
Making all in src/plugins
make[6]: Entering directory `/misc/Raid5/Projects/OpenWRT/trunk/build_dir/target-mipsel_uClibc-'
/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- -L/misc/Raid5/Projects/OpenWRT/trunk/staging_dir/target-mipsel_uClibc- -L/misc/Raid5/Projects/OpenWRT/trunk/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc- -L/misc/Raid5/Projects/OpenWRT/trunk/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-  -o -rpath /usr/lib/updatedd  libregfish.lo ../../libupdatedd-exception/ -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- -L/misc/Raid5/Projects/OpenWRT/trunk/staging_dir/target-mipsel_uClibc- -L/misc/Raid5/Projects/OpenWRT/trunk/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc- -L/misc/Raid5/Projects/OpenWRT/trunk/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc- -liberty -ldl -lnsl -lresolv  -mips32 -mtune=mips32 -msoft-float -Wl,-soname -Wl, -o .libs/
/misc/Raid5/Projects/OpenWRT/trunk/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc- /misc/Raid5/Projects/OpenWRT/trunk/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc- 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- could not read symbols: Bad value
collect2: ld returned 1 exit status
make[6]: *** [] 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 (

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-
CFLAGS="-Os -pipe -mips32 -mtune=mips32 -funit-at-a-time -fhonour-copts -msoft-float  -I/usr/src/openwrt/staging_dir/target-mipsel_uClibc- -I/usr/src/openwrt/staging_dir/target-mipsel_uClibc- -I/usr/src/openwrt/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc- -I/usr/src/openwrt/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc- " CXXFLAGS="-Os -pipe -mips32 -mtune=mips32 -funit-at-a-time -fhonour-copts -msoft-float  -I/usr/src/openwrt/staging_dir/target-mipsel_uClibc- -I/usr/src/openwrt/staging_dir/target-mipsel_uClibc- -I/usr/src/openwrt/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc- -I/usr/src/openwrt/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc- " LDFLAGS="-L/usr/src/openwrt/staging_dir/target-mipsel_uClibc- -L/usr/src/openwrt/staging_dir/target-mipsel_uClibc- -L/usr/src/openwrt/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc- -L/usr/src/openwrt/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc- " make -C /usr/src/openwrt/build_dir/target-mipsel_uClibc- 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-" all install ;
make[3]: Entering directory `/usr/src/openwrt/build_dir/target-mipsel_uClibc-'
cd . && /bin/bash /usr/src/openwrt/build_dir/target-mipsel_uClibc- --run aclocal-1.9 
 cd . && /bin/bash /usr/src/openwrt/build_dir/target-mipsel_uClibc- --run automake-1.9 --gnu version mismatch.  This is Automake 1.9.6, but the definition used by this AM_INIT_AUTOMAKE comes from Automake 1.10.  You should recreate aclocal.m4 with aclocal and run automake again.
make[3]: *** [] Error 1
make[3]: Leaving directory `/usr/src/openwrt/build_dir/target-mipsel_uClibc-'
make[2]: *** [/usr/src/openwrt/build_dir/target-mipsel_uClibc-] 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, 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 gets patched last, it happens to be more "fresh" than file, and missing script automatically calls autoconf to recreate 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
c) Patch first, and then and others - this will not trigger missing script to do autoreconf.
d) Patch updatedd 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 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

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

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

Note: See TracTickets for help on using tickets.