Bug 67960

Summary: [bisected] [ia64] systemd fails to compile with error: redefinition of 'struct ia64_fpreg'
Product: systemd Reporter: Émeric Maschino <emeric.maschino>
Component: generalAssignee: systemd-bugs
Status: RESOLVED NOTOURBUG QA Contact: systemd-bugs
Severity: normal    
Priority: medium CC: emeric.maschino, pachoramos1
Version: unspecified   
Hardware: IA64 (Itanium)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 67961    
Attachments: Failed compilation of systemd with error: redefinition of 'struct ia64_fpreg'

Description Émeric Maschino 2013-08-09 22:55:56 UTC
Created attachment 83908 [details]
Failed compilation of systemd with error: redefinition of 'struct ia64_fpreg'

Hello,

Trying to compile systemd-201, 204 or 206-r1 on Gentoo ia64 Linux all fail with error: redefinition of 'struct ia64_fpreg' in src/core/execute.c.

Originally reported in Gentoo bug tracker [1], I was asked to report upstream [2][3].

I've checked that this error is also present in upstream code. I've bisected it to commit 8351ceaea9480d9c2979aa2ff0f4982cfdfef58d (execute: support syscall filtering using seccomp filters).

Complete build log attached.

Please let me know if I can help further.

Thanks,

     Émeric

[1] https://bugs.gentoo.org/show_bug.cgi?id=480218
[2] https://bugs.gentoo.org/show_bug.cgi?id=480218#c4
[3] https://bugs.gentoo.org/show_bug.cgi?id=480218#c5
Comment 1 Zbigniew Jedrzejewski-Szmek 2013-08-10 02:27:33 UTC
It's looks like a bug in kernel headers and/or glibc headers. It would be best if you could investigate which of those two is broken, and file the bug there.
Comment 2 Zbigniew Jedrzejewski-Szmek 2013-08-10 02:34:00 UTC
(In reply to comment #1)
> It's looks like a bug in kernel headers and/or glibc headers. It would be
> best if you could investigate which of those two is broken, and file the bug
> there.
You need to take the full list of #includes, and remove them step by step until you find the minimal set that reproduces the error.
Comment 3 Émeric Maschino 2013-08-10 18:14:46 UTC
(In reply to comment #2)
> You need to take the full list of #includes, and remove them step by step
> until you find the minimal set that reproduces the error.

That's interesting. Do you think the same systemd source code could successfully compile with a different version of kernel or glibc? I'm asking this, because it appears that Debian successfully built systemd-204 for ia64 [1][2].

     Émeric

[1] http://snapshot.debian.org/package/systemd/204-1/
[2] http://snapshot.debian.org/package/systemd/204-2/
Comment 4 Émeric Maschino 2013-08-10 19:31:23 UTC
(In reply to comment #2)
> You need to take the full list of #includes, and remove them step by step
> until you find the minimal set that reproduces the error.

You're absolutely right, this has nothing to do with systemd.

I just successfully compiled systemd-204 on a Debian ia64 system.

Bu contrast, the exact same systemd-204 source code fails to compile on Gentoo ia64 with error: redefinition of 'struct ia64_fpreg'.

Googling a little bit, I found this 10-year old bug reported against glibc [1].

This explain why systemd compiles fine on Debian: eglibc is shipped rather than glibc.

Sorry for the noise, closing bug.

     Émeric


[1] http://sourceware.org/bugzilla/show_bug.cgi?id=762
Comment 5 Pacho Ramos 2013-10-01 21:38:59 UTC
Until glibc is fixed, maybe a workaround like the following (currently needed for "audit") could be used in systemd to allow its compilation on ia64 (since looks like glibc bug is there for really a long time without solution):
http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/sys-process/audit/files/audit-2.1.3-ia64-compile-fix.patch?view=markup
Comment 6 Lennart Poettering 2013-10-01 23:34:41 UTC
(In reply to comment #5)
> Until glibc is fixed, maybe a workaround like the following (currently
> needed for "audit") could be used in systemd to allow its compilation on
> ia64 (since looks like glibc bug is there for really a long time without
> solution):
> http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/sys-process/audit/
> files/audit-2.1.3-ia64-compile-fix.patch?view=markup

I am pretty sure that it's a better idea to apply such a fix to glibc on ia64 on your distro rather than to each and every app making use of it...

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.