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
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.
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
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).
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.