Debian Bug report logs - #646918
/usr/include/sys/nlist_aout.h:51: error: redefinition of ‘struct nlist’

Package: kfreebsd-kernel-headers; Maintainer for kfreebsd-kernel-headers is GNU/kFreeBSD Maintainers <debian-bsd@lists.debian.org>; Source for kfreebsd-kernel-headers is src:kfreebsd-kernel-headers.

Reported by: Robert Millan <rmh@debian.org>

Date: Fri, 28 Oct 2011 12:24:01 UTC

Severity: normal

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, debian-bsd@lists.debian.org, GNU Libc Maintainers <debian-glibc@lists.debian.org>:
Bug#646918; Package libc0.1-dev. (Fri, 28 Oct 2011 12:24:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Robert Millan <rmh@debian.org>:
New Bug report received and forwarded. Copy sent to debian-bsd@lists.debian.org, GNU Libc Maintainers <debian-glibc@lists.debian.org>. (Fri, 28 Oct 2011 12:24:14 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Robert Millan <rmh@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: /usr/include/sys/nlist_aout.h:51: error: redefinition of ‘struct nlist’
Date: Fri, 28 Oct 2011 13:40:30 +0200
[Message part 1 (text/plain, inline)]
Package: libc0.1-dev
Version: 2.11.2-10
Severity: normal

The following code compiles on FreeBSD but not on Debian GNU/kFreeBSD:

#include <a.out.h>
#include <sys/nlist_aout.h>

main ()
{
  struct nlist nl;
  nl.n_un.n_strx = 0;
}

It appears there are conflicting definitions of "struct nlist", one of them in
libc-dev and the other in kfreebsd-kernel-headers:

$ gcc /tmp/test.c -o /tmp/test
In file included from /tmp/test.c:2:
/usr/include/sys/nlist_aout.h:51: error: redefinition of â€struct nlistâ€
/tmp/test.c: In function â€mainâ€:
/tmp/test.c:7: error: â€struct nlist†has no member named â€n_unâ€

-- System Information:
Debian Release: 6.0.3
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: kfreebsd-amd64 (x86_64)

Kernel: kFreeBSD 8.1-1-amd64
Locale: LANG=ca_AD.UTF-8, LC_CTYPE=ca_AD.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages libc0.1-dev depends on:
ii  kfreebsd-kernel-headers       0.53       kernel of FreeBSD headers for deve
ii  libc-dev-bin                  2.11.2-10  Embedded GNU C Library: Developmen
ii  libc0.1                       2.11.2-10  Embedded GNU C Library: Shared lib

Versions of packages libc0.1-dev recommends:
ii  gcc [c-compiler]              4:4.4.5-1  The GNU C compiler
ii  gcc-4.3 [c-compiler]          4.3.5-4    The GNU C compiler
ii  gcc-4.4 [c-compiler]          4.4.5-8    The GNU C compiler

Versions of packages libc0.1-dev suggests:
pn  glibc-doc                     <none>     (no description available)
ii  manpages-dev                  3.27-1     Manual pages about using GNU/Linux

-- no debconf information
[test.c (text/x-c, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, GNU Libc Maintainers <debian-glibc@lists.debian.org>:
Bug#646918; Package libc0.1-dev. (Sun, 30 Oct 2011 16:48:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Aurelien Jarno <aurelien@aurel32.net>:
Extra info received and forwarded to list. Copy sent to GNU Libc Maintainers <debian-glibc@lists.debian.org>. (Sun, 30 Oct 2011 16:48:03 GMT) Full text and rfc822 format available.

Message #10 received at 646918@bugs.debian.org (full text, mbox):

From: Aurelien Jarno <aurelien@aurel32.net>
To: Robert Millan <rmh@debian.org>, 646918@bugs.debian.org
Cc: control@bugs.debian.org
Subject: Re: Bug#646918: /usr/include/sys/nlist_aout.h:51: error: redefinition of ‘struct nlist’
Date: Sun, 30 Oct 2011 17:44:58 +0100
reassign 646918 kfreebsd-kernel-headers
thanks

On Fri, Oct 28, 2011 at 01:40:30PM +0200, Robert Millan wrote:
> Package: libc0.1-dev
> Version: 2.11.2-10
> Severity: normal
> 
> The following code compiles on FreeBSD but not on Debian GNU/kFreeBSD:
> 
> #include <a.out.h>
> #include <sys/nlist_aout.h>
> 
> main ()
> {
>   struct nlist nl;
>   nl.n_un.n_strx = 0;
> }
> 
> It appears there are conflicting definitions of "struct nlist", one of them in
> libc-dev and the other in kfreebsd-kernel-headers:
> 
> $ gcc /tmp/test.c -o /tmp/test
> In file included from /tmp/test.c:2:
> /usr/include/sys/nlist_aout.h:51: error: redefinition of ??struct nlist??
> /tmp/test.c: In function ??main??:
> /tmp/test.c:7: error: ??struct nlist?? has no member named ??n_un??
> 

It compiles fine on plain FreeBSD because <sys/nlist_aout.h> checks if
<a.out.h> has been included before and defines the structure differently
in that case.

<sys/nlist_aout.h> has to be modified for GNU/kFreeBSD, that is by 
checking for __A_OUT_GNU_H__ instead of _AOUT_INCLUDE_ and by defining
the first part of the structure the same way as in the GNU libc (that is
by using a transparent union).

I am therefore reassigning the bug to kfreebsd-kernel-headers.

-- 
Aurelien Jarno	                        GPG: 1024D/F1BCDB73
aurelien@aurel32.net                 http://www.aurel32.net




Bug reassigned from package 'libc0.1-dev' to 'kfreebsd-kernel-headers'. Request was from Aurelien Jarno <aurelien@aurel32.net> to control@bugs.debian.org. (Sun, 30 Oct 2011 16:48:05 GMT) Full text and rfc822 format available.

Bug No longer marked as found in versions eglibc/2.11.2-10. Request was from Aurelien Jarno <aurelien@aurel32.net> to control@bugs.debian.org. (Sun, 30 Oct 2011 16:48:06 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed Apr 23 21:30:10 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.