Bug 51365 - assertion error's on compilation for arm
Summary: assertion error's on compilation for arm
Status: RESOLVED NOTOURBUG
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: systemd-bugs
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-23 12:55 UTC by Stefan Schantl
Modified: 2012-06-24 12:24 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Stefan Schantl 2012-06-23 12:55:47 UTC
Hello, when I'm trying to compile the current version of systemd (185) for our distribution, there will be displayed some assertion error's for the architectures armv5tel and armv7hl. 

/usr/bin/ld: BFD version 2.22 assertion fail ../../binutils-2.22/bfd/elf32-arm.c:12049
/usr/bin/ld: BFD version 2.22 assertion fail ../../binutils-2.22/bfd/elf32-arm.c:12049

I'm using gcc 4.7.0 with enabled SSP and binutils 2.22.

Full buildlog's for both architectures can be found here:
http://pakfire.ipfire.org/packages/release/systemd/0-185-1.ip3/logs/build.armv5tel.1.log
http://pakfire.ipfire.org/packages/release/systemd/0-185-1.ip3/logs/build.armv7hl.1.log

Howerver this is not a distribution specific problem, on current build logs from the fedora build system the same messages can be found:
http://arm.koji.fedoraproject.org/packages/systemd/185/2.fc18/data/logs/armv5tel/build.log
http://arm.koji.fedoraproject.org/packages/systemd/185/2.fc18/data/logs/armv7hl/build.log
Comment 1 Lennart Poettering 2012-06-24 02:55:15 UTC
That looks like a bug in your binutils, not systemd.

In fact, if the build tools crash when building a project it's definitely a build tool problem, never a project problem.
Comment 2 Michael Tremer 2012-06-24 04:09:47 UTC
Lennart, you are possibly right. If I had a guess I would say it is related to LTO or some stuff.

We could not see this error on any other package so far, so maybe there is some code which may possibly cause this error?

Newer versions of GCC (4.7.1) and binutils (2.22.52.0.3) abort the whole systemd build, so we need to do something about it :D
Comment 3 Lennart Poettering 2012-06-24 08:21:37 UTC
There's nothing really that interesting in the systemd build, except that we comprehensively make use of "-ffunction-sections -fdata-sections" plus "-Wl,--as-needed -Wl,--gc-sections". Dropping thes eoptions might fix the build for you (at the expense of much bigger binaries).
Comment 4 Michael Tremer 2012-06-24 12:24:57 UTC
We did some further investigation on the topic (latest binutils version) and manual builds.

Passing --gc-sections causes the problems on nearly all linker jobs on the ARM platform. Removing that from CCLDFLAGS lets us run the build through.

The issue is known to the binutils team for quite some time: http://sourceware.org/bugzilla/show_bug.cgi?id=14189

Thank you Lennart for giving the right hint.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.