Modify

Opened 4 years ago

Closed 4 years ago

#16249 closed defect (fixed)

ld error (binutils) when building collectd

Reported by: Anton van Bohemen <avbohemen@…> Owned by: developers
Priority: normal Milestone: Chaos Calmer 15.05
Component: toolchain Version: Trunk
Keywords: Cc:

Description

For some time I am unable to build collectd. ld throws an assertion fail. And no, this is not the broken netlink plugin. The buildlog says the following:

OpenWrt-libtool: link: rm -f .libs/collectd.nm .libs/collectd.nmS .libs/collectd.nmT
OpenWrt-libtool: link: (cd .libs && mips-openwrt-linux-uclibc-gcc -Os -pipe -mips32r2 -mtune=34kc -fno-caller-saves -mno-branch-likely -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -mips16 -minterlink-mips16 -fpic -c -fno-builtin "collectdS.c")
OpenWrt-libtool: link: rm -f ".libs/collectdS.c" ".libs/collectd.nm" ".libs/collectd.nmS" ".libs/collectd.nmT"
OpenWrt-libtool: link: mips-openwrt-linux-uclibc-gcc -Wall -Os -pipe -mips32r2 -mtune=34kc -fno-caller-saves -mno-branch-likely -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -mips16 -minterlink-mips16 -fpic -o collectd collectd-collectd.o collectd-common.o collectd-configfile.o collectd-filter_chain.o collectd-meta_data.o collectd-plugin.o collectd-utils_avltree.o collectd-utils_cache.o collectd-utils_complain.o collectd-utils_heap.o collectd-utils_ignorelist.o collectd-utils_llist.o collectd-utils_parse_option.o collectd-utils_random.o collectd-utils_tail_match.o collectd-utils_match.o collectd-utils_subst.o collectd-utils_tail.o collectd-utils_time.o collectd-types_list.o .libs/collectdS.o -Wl,--export-dynamic  -L/home/anton/openwrt/ar71xx/trunk/staging_dir/target-mips_34kc_uClibc-0.9.33.2/usr/lib -L/home/anton/openwrt/ar71xx/trunk/staging_dir/target-mips_34kc_uClibc-0.9.33.2/lib -L/home/anton/openwrt/ar71xx/trunk/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/usr/lib -L/home/anton/openwrt/ar71xx/trunk/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/lib -lpthread -lltdl liboconfig/.libs/liboconfig.a -lm -lz -ldl
/home/anton/openwrt/ar71xx/trunk/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/lib/gcc/mips-openwrt-linux-uclibc/4.8.3/../../../../mips-openwrt-linux-uclibc/bin/ld: BFD (GNU Binutils) 2.24.0 assertion fail elfxx-mips.c:10561
/home/anton/openwrt/ar71xx/trunk/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/lib/gcc/mips-openwrt-linux-uclibc/4.8.3/../../../../mips-openwrt-linux-uclibc/bin/ld: BFD (GNU Binutils) 2.24.0 assertion fail elfxx-mips.c:10561
collect2: error: ld returned 1 exit status
OpenWrt-libtool: link: rm -f ".libs/collectdS.o"
make[7]: *** [collectd] Error 1

I tried this with collectd 4.10.8, and also (with patches from patchwork) with versions 5.3.1 and 5.4.1. Build fails every time with the same double error.

ld: BFD (GNU Binutils) 2.24.0 assertion fail elfxx-mips.c:10561
ld: BFD (GNU Binutils) 2.24.0 assertion fail elfxx-mips.c:10561

My build environment is an Ubuntu 13.10 32-bit VM under VirtualBox 4.3.10 (soon to be upgraded to 14.04).

Attachments (0)

Change History (2)

comment:1 Changed 4 years ago by Anton van Bohemen <avbohemen@…>

Sorry about the duplicate. The assertion is about MIPS16. Adding

PKG_USE_MIPS16:=0

to feeds/packages/utils/collectd/Makefile fixes this... however, I am pretty sure I was able to compile collectd before with MIPS16 enabled. Any ideas?

comment:2 Changed 4 years ago by nbd

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

You changed the binutils version. Some code gets miscompiled with mips16, the default binutils version does not bail out, the new one you selected does.
mips16 support disabled in r40741

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.