New: systemd 215 doesn't build
https://bugs.busybox.net/show_bug.cgi?id=7286
Summary: systemd 215 doesn't build
Product: buildroot
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: minor
Priority: P5
Component: Other
AssignedTo: unassigned at buildroot.uclibc.org
ReportedBy: philn at igalia.com
CC: buildroot at uclibc.org
Estimated Hours: 0.0
Created attachment 5540
--> https://bugs.busybox.net/attachment.cgi?id=5540
build log
I'm trying to build Systemd for a Raspberry Pi. Attaching the build log. Please let me know if you need more infos about my buildroot config.
Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
[Buildroot] [Bug 7286] systemd 215 doesn't build
https://bugs.busybox.net/show_bug.cgi?id=7286
--- Comment #1 from philn at igalia.com 2014-07-31 08:14:04 UTC --- Tried a recent git snapshot too (2b49732c3d511007ae2c413997e56c40f678d79a) and had the same error.
Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
[Buildroot] [Bug 7286] systemd 215 doesn't build
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=7286
--- Comment #2 from philn at igalia.com 2014-07-31 08:20:41 UTC --- Created attachment 5546
--> https://bugs.busybox.net/attachment.cgi?id=5546
buildroot config
Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
[Buildroot] [Bug 7286] systemd 215 doesn't build
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=7286
--- Comment #3 from nroach44 at gmail.com 2014-07-31 10:37:55 UTC --- Testing using the defconfig: Setting glibc and systemd and then -O{1,2,3} (not -O{s,1}), I get build errors very similar (probably the same but jumbled due to multithreading).
Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
[Buildroot] [Bug 7286] systemd 215 doesn't build
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=7286
--- Comment #4 from nroach44 at gmail.com 2014-07-31 10:39:03 UTC --- Testing using the defconfig: Setting glibc and systemd and then -O{1,2,3} (not -O{s,1}), I get build errors very similar (probably the same but jumbled due to multithreading).(In reply to comment #3)
Quoted 3 lines
Testing using the defconfig: Setting glibc and systemd and then -O{1,2,3} (not -O{s,1}), I get build errors very similar (probably the same but jumbled due to multithreading).
that should be "not -O{s,0}"
Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
[Buildroot] [Bug 7286] systemd 215 doesn't build
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=7286
--- Comment #5 from Eric Le Bihan <[email protected]> 2014-07-31 17:38:29 UTC --- The build fails because systemd is configured with the --enable-compat-libs option.
This option has been added because since systemd 209, some libraries have been merged into libsystemd.so:
- libsystemd-daemon.so
- libsystemd-id128.so
- libsystemd-journal.so
- libsystemd-login.so
When this option is enabled, the deprecated libraries will be built, so external programs, which depend on them and have not yet migrated to libsystemd, can still compile. But these libs will refer to the parts used to build libsystemd.
For example, if we look at libsystemd-journal.so, we can see that is built from libsystemd-journal.c. This file is generated from:
- src/compat-libs/linkwarning.h
- src/compat-libs/libsystemd-journal.sym
Via some macros in linkwarning.h the symbols will be compiled as an unallocated section and linking to them will cause a warning to be printed.
From the build log, we can see that GCC complains the symbol is being defined twice:
{{/tmp/ccEK7EwW.ltrans13.ltrans.o: In function `sd_journal_reliable_fd':
ccEK7EwW.ltrans13.o:(.text+0x784): multiple definition of `sd_journal_reliable_fd' libsystemd_journal_internal_la-sd-journal.o (symbol from plugin):(.text+0x0):
first defined here
}}
In the attached Buildroot config file, we have "BR2_OPTIMIZE_2=y", which adds "-Wp,-D_FORTIFY_SOURCE=2" to CPPFLAGS and "-flto -ffat-lto-objects" to CFLAGS.
I tried the attached configuration with ccache disabled and "BR2_OPTIMIZE_S=y", which cause the aforementioned options to be dropped, and the build is successful.
In the configure script, there is a check for these options, but it seems to only print a warning message...
Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
[Buildroot] [Bug 7286] systemd 215 doesn't build
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=7286
--- Comment #6 from philn at igalia.com 2014-08-04 07:01:44 UTC --- So what would be the approach to fix this issue then? Ensuring the CPPFLAGS and CFLAGS don't contain these options when building systemd?
Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
[Buildroot] [Bug 7286] systemd 215 doesn't build
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=7286
--- Comment #7 from Eric Le Bihan <[email protected]> 2014-08-04 08:25:22 UTC --- Created attachment 5552
--> https://bugs.busybox.net/attachment.cgi?id=5552
Workaround by disabling link time optimization
Here is a workaround which disable link time optimization for systemd.
Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
[Buildroot] [Bug 7286] systemd 215 doesn't build
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=7286
--- Comment #8 from Thomas De Schampheleire <[email protected]> 2014-08-09 15:19:01 UTC --- Eric, is this the fix we should apply for 2014.08 or should something else be
done? In the first case, could you send the patch to the list? In the second
case, could you give more details about what you think should be done?
Thanks, Thomas
Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
[Buildroot] [Bug 7286] systemd 215 doesn't build
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=7286
--- Comment #9 from Eric Le Bihan <[email protected]> 2014-08-12 20:41:51 UTC --- The bug was reported upstream
(https://bugs.freedesktop.org/show_bug.cgi?id=78923) but has been marked as rejected, as it is likely to be a compiler/linker issue (though the last comment says the issue is not raised when using GCC 4.8.3, which is the version precisely used in our case!).
Comments in another bug report
(https://bugzilla.redhat.com/show_bug.cgi?id=1067245#c13) suggest testing with GCC 4.9.
Anyway, the patch is now in patchwork:
http://patchwork.ozlabs.org/patch/379472/. I suggest applying it.
Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
[Buildroot] [Bug 7286] systemd 215 doesn't build
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=7286
Thomas Petazzoni <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED--- Comment #10 from Thomas Petazzoni <[email protected]> 2014-08-15 20:32:21 UTC --- Fixed by
http://git.buildroot.net/buildroot/commit/?id=d9054017cfc25c8f89225e1d18c71f112d25f9a0.
Closing bug. Thanks!
Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.