Modify

Opened 5 years ago

Closed 4 years ago

Last modified 2 years ago

#9235 closed defect (fixed)

x86 build fails during toolchain/gcc build

Reported by: linus.luessing@… Owned by: developers
Priority: high Milestone: Barrier Breaker 14.07
Component: toolchain Version: Trunk
Keywords: Cc:

Description

[...]
make[5]: Entering directory `/mnt/dev/openwrt/openwrt-x86-4/build_dir/toolchain-i386_gcc-linaro_uClibc-0.9.32/gcc-linaro-4.5-2011.02-0-minimal/gcc'
i486-linux-gnu-gcc   -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wc++-compat   -DHAVE_CONFIG_H  -o cc1-dummy c-lang.o stub-objc.o attribs.o c-errors.o c-lex.o c-pragma.o c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o c-opts.o c-format.o c-semantics.o c-ppoutput.o c-cppbuiltin.o c-objc-common.o c-dump.o c-pch.o c-parser.o i386-c.o c-gimplify.o tree-mudflap.o c-pretty-print.o c-omp.o \
          dummy-checksum.o main.o  libbackend.a ../libcpp/libcpp.a ../libdecnumber/libdecnumber.a ../libcpp/libcpp.a   ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a   -lppl_c -lppl -lgmpxx -L/mnt/dev/openwrt/openwrt-x86-4/staging_dir/host/lib -L/mnt/dev/openwrt/openwrt-x86-4/staging_dir/host/lib -L/mnt/dev/openwrt/openwrt-x86-4/staging_dir/host/lib -lmpc -lmpfr -lgmp -rdynamic -ldl  -L../zlib -lz 
/usr/bin/ld: /mnt/dev/openwrt/openwrt-x86-4/staging_dir/host/lib/libgmpxx.a(osfuns.o): undefined reference to symbol 'std::__throw_bad_cast()@@GLIBCXX_3.4'
/usr/bin/ld: note: 'std::__throw_bad_cast()@@GLIBCXX_3.4' is defined in DSO //usr/lib/libstdc++.so.6 so try adding it to the linker command line
//usr/lib/libstdc++.so.6: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
[...]

The only thing I did was:

Backfire works fine though. Also copying a .config from backfire to trunk and hitting make directly, without make oldconfig worked fine. I've tried downgrading several versions in the .config (e.g. gcc and further options) but that did not work out so far yet.

With the bisecting I got as far as this so far:
25091 -> ok
25145 -> broken (different error message)
25245 -> broken (different different error message)
Since 25251: broken, getting the error message shown above

Cheers, Linus

Attachments (0)

Change History (3)

comment:1 Changed 5 years ago by Stephen Oberholtzer <oliverklozoff@…>

I've hit this problem as well.

Further research indicates that the problem is caused by newer versions of gcc/binutils, which are trying to fix a potential pitfall by disallow implicit -l.
(more detail here: http://fedoraproject.org/wiki/UnderstandingDSOLinkChange )
Specifically, 'cc1-dummy' requires libstdc++, but doesn't reference it.
Older versions of ld would "steal" libstdc++ via libgmpxx; newer versions, however, are disallowing that.

I managed to make it compile by doing:
find . -name Makefile -print0 | xargs grep -w PPLLIBS

and adding '-lstdc++' to the end of the relevant line in each file.

I wanted to write a patch, but I do not understand OpenWrt's build system well enough to do so.

comment:2 Changed 4 years ago by nbd

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

fixed in r29721

comment:3 Changed 2 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.