Debian Bug report logs - #631639
__unused in libbsd. workaround for #522773 (linux) and #522774 (libc)

version graph

Package: libbsd-dev; Maintainer for libbsd-dev is Guillem Jover <guillem@debian.org>; Source for libbsd-dev is src:libbsd.

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

Date: Sat, 25 Jun 2011 17:09:02 UTC

Severity: wishlist

Tags: patch

Found in version libbsd/0.3.0-1

Done: Robert Millan <rmh@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

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


Report forwarded to debian-bugs-dist@lists.debian.org, rmh@debian.org, debian-bsd@lists.debian.org, tg@mirbsd.de, Debian GNU/kFreeBSD <debian-bsd@lists.debian.org>:
Bug#631639; Package libbsd-dev. (Sat, 25 Jun 2011 17:09:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Robert Millan <rmh@debian.org>:
New Bug report received and forwarded. Copy sent to rmh@debian.org, debian-bsd@lists.debian.org, tg@mirbsd.de, Debian GNU/kFreeBSD <debian-bsd@lists.debian.org>. (Sat, 25 Jun 2011 17:09:05 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: __unused in libbsd. workaround for #522773 (linux) and #522774 (libc)
Date: Sat, 25 Jun 2011 19:06:48 +0200
[Message part 1 (text/plain, inline)]
Package: libbsd-dev
Version: 0.3.0-1
Severity: wishlist
Tags: patch
User: debian-bsd@lists.debian.org
Usertags: kfreebsd

This patch implements a workaround for __unused name collision with Linux and
Glibc.  The trick is to define __unused only when in overlay mode, and then
provide replacements for broken headers using the overlay.

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: kfreebsd-amd64 (x86_64)

Kernel: kFreeBSD 8.2-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 libbsd-dev depends on:
ii  libbsd0                       0.3.0-1    utility functions from BSD systems

libbsd-dev recommends no packages.

libbsd-dev suggests no packages.

-- no debconf information
[libbsd_unused.diff (text/x-diff, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian GNU/kFreeBSD <debian-bsd@lists.debian.org>:
Bug#631639; Package libbsd-dev. (Sat, 25 Jun 2011 17:36:08 GMT) Full text and rfc822 format available.

Acknowledgement sent to Thorsten Glaser <tg@mirbsd.de>:
Extra info received and forwarded to list. Copy sent to Debian GNU/kFreeBSD <debian-bsd@lists.debian.org>. (Sat, 25 Jun 2011 17:36:08 GMT) Full text and rfc822 format available.

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

From: Thorsten Glaser <tg@mirbsd.de>
To: Robert Millan <rmh@debian.org>, 631639@bugs.debian.org
Subject: Re: Bug#631639: __unused in libbsd. workaround for #522773 (linux) and #522774 (libc)
Date: Sat, 25 Jun 2011 17:24:00 +0000 (UTC)
Robert Millan dixit:

>This patch implements a workaround for __unused name collision with Linux and
>Glibc.  The trick is to define __unused only when in overlay mode, and then

That won’t help. The overlay mode uses pkg-config which no BSD thing touches.

bye,
//mirabilos
-- 
Support mksh as /bin/sh and RoQA dash NOW!
‣ src:bash (256 (275) bugs: 0 RC, 177 (192) I&N, 79 (83) M&W, 0 F&P)
‣ src:dash (81 (89) bugs: 3 RC, 43 (46) I&N, 35 (40) M&W, 0 F&P)
‣ src:mksh (2 bugs: 0 RC, 0 I&N, 2 M&W, 0 F&P)




Information forwarded to debian-bugs-dist@lists.debian.org, Debian GNU/kFreeBSD <debian-bsd@lists.debian.org>:
Bug#631639; Package libbsd-dev. (Sat, 25 Jun 2011 18:45:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Robert Millan <rmh@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian GNU/kFreeBSD <debian-bsd@lists.debian.org>. (Sat, 25 Jun 2011 18:45:02 GMT) Full text and rfc822 format available.

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

From: Robert Millan <rmh@debian.org>
To: Thorsten Glaser <tg@mirbsd.de>
Cc: 631639@bugs.debian.org
Subject: Re: Bug#631639: __unused in libbsd. workaround for #522773 (linux) and #522774 (libc)
Date: Sat, 25 Jun 2011 20:41:56 +0200
2011/6/25 Thorsten Glaser <tg@mirbsd.de>:
> That won’t help. The overlay mode uses pkg-config which no BSD thing touches.

pkg-config can be invoked from debian/rules.  It's already used in freebsd-libs
and freebsd-utils.

It's trivial and non-intrusive, see:

http://anonscm.debian.org/viewvc/glibc-bsd/trunk/freebsd-libs/debian/rules?r1=3368&r2=3429

-- 
Robert Millan




Information forwarded to debian-bugs-dist@lists.debian.org, Debian GNU/kFreeBSD <debian-bsd@lists.debian.org>:
Bug#631639; Package libbsd-dev. (Fri, 25 Nov 2011 18:54:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Robert Millan <rmh@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian GNU/kFreeBSD <debian-bsd@lists.debian.org>. (Fri, 25 Nov 2011 18:54:03 GMT) Full text and rfc822 format available.

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

From: Robert Millan <rmh@debian.org>
To: 631639@bugs.debian.org, Guillem Jover <guillem@debian.org>
Subject: proposed workaround for __unused problem
Date: Fri, 25 Nov 2011 19:51:02 +0100
Hi Guillem,

Please can you comment on my proposed workaround in bug #631639?

-- 
Robert Millan




Information forwarded to debian-bugs-dist@lists.debian.org, Debian GNU/kFreeBSD <debian-bsd@lists.debian.org>:
Bug#631639; Package libbsd-dev. (Sun, 27 Nov 2011 23:48:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Guillem Jover <guillem@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian GNU/kFreeBSD <debian-bsd@lists.debian.org>. (Sun, 27 Nov 2011 23:48:03 GMT) Full text and rfc822 format available.

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

From: Guillem Jover <guillem@debian.org>
To: Robert Millan <rmh@debian.org>, 631639@bugs.debian.org
Subject: Re: Bug#631639: proposed workaround for __unused problem
Date: Mon, 28 Nov 2011 00:44:06 +0100
Hey Robert,

On Fri, 2011-11-25 at 19:51:02 +0100, Robert Millan wrote:
> Please can you comment on my proposed workaround in bug #631639?

Sorry for the disappearence regarding libbsd and libmd, I've been tied
up with other stuff and never got to finalize the bureaucratic part of
the libmd release, and to prepare a new libbsd release too. I'll try to
allocate some time this next week to handle both.

thanks,
guillem




Information forwarded to debian-bugs-dist@lists.debian.org, Debian GNU/kFreeBSD <debian-bsd@lists.debian.org>:
Bug#631639; Package libbsd-dev. (Sat, 31 Dec 2011 01:42:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Guillem Jover <guillem@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian GNU/kFreeBSD <debian-bsd@lists.debian.org>. (Sat, 31 Dec 2011 01:42:06 GMT) Full text and rfc822 format available.

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

From: Guillem Jover <guillem@debian.org>
To: Thorsten Glaser <tg@mirbsd.de>, 631639@bugs.debian.org
Subject: Re: Bug#631639: __unused in libbsd. workaround for #522773 (linux) and #522774 (libc)
Date: Sat, 31 Dec 2011 02:37:42 +0100
On Sat, 2011-06-25 at 17:24:00 +0000, Thorsten Glaser wrote:
> That won’t help. The overlay mode uses pkg-config which no BSD thing
> touches.

Well, even OpenBSD has its own re-implementation:

  <http://www.openbsd.org/cgi-bin/man.cgi?query=pkg-config&sektion=1&format=html>

regards,
guillem




Information forwarded to debian-bugs-dist@lists.debian.org, Debian GNU/kFreeBSD <debian-bsd@lists.debian.org>:
Bug#631639; Package libbsd-dev. (Sat, 31 Dec 2011 03:51:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Thorsten Glaser <tg@mirbsd.de>:
Extra info received and forwarded to list. Copy sent to Debian GNU/kFreeBSD <debian-bsd@lists.debian.org>. (Sat, 31 Dec 2011 03:51:03 GMT) Full text and rfc822 format available.

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

From: Thorsten Glaser <tg@mirbsd.de>
Cc: 631639@bugs.debian.org
Subject: Re: Bug#631639: __unused in libbsd. workaround for #522773 (linux) and #522774 (libc)
Date: Sat, 31 Dec 2011 03:40:30 +0000 (UTC)
Guillem Jover dixit:

>On Sat, 2011-06-25 at 17:24:00 +0000, Thorsten Glaser wrote:
>> That won’t help. The overlay mode uses pkg-config which no BSD thing
>> touches.
>
>Well, even OpenBSD has its own re-implementation:

Yes, but (a) not for their own stuff but to replace the GNU one
which has a bootstrapping issue wrt. libglib nowadays (BSD ports
start from a base OS system and compile everything from source
on each installation), and (b) my MirCoDeveloper says it doesn’t
work right anyway.

bye,
//mirabilos
-- 
FWIW, I'm quite impressed with mksh interactively. I thought it was much
*much* more bare bones. But it turns out it beats the living hell out of
ksh93 in that respect. I'd even consider it for my daily use if I hadn't
wasted half my life on my zsh setup. :-) -- Frank Terbeck in #!/bin/mksh




Information forwarded to debian-bugs-dist@lists.debian.org, Debian GNU/kFreeBSD <debian-bsd@lists.debian.org>:
Bug#631639; Package libbsd-dev. (Sat, 31 Dec 2011 14:00:07 GMT) Full text and rfc822 format available.

Acknowledgement sent to Robert Millan <rmh@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian GNU/kFreeBSD <debian-bsd@lists.debian.org>. (Sat, 31 Dec 2011 14:00:09 GMT) Full text and rfc822 format available.

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

From: Robert Millan <rmh@debian.org>
To: Thorsten Glaser <tg@mirbsd.de>, 631639@bugs.debian.org
Cc: debian-bsd@lists.debian.org, Guillem Jover <guillem@debian.org>
Subject: Re: Bug#631639: __unused in libbsd. workaround for #522773 (linux) and #522774 (libc)
Date: Sat, 31 Dec 2011 14:58:31 +0100
El 31 de desembre de 2011 4:40, Thorsten Glaser <tg@mirbsd.de> ha escrit:
> Yes, but (a) not for their own stuff but to replace the GNU one
> which has a bootstrapping issue wrt. libglib nowadays (BSD ports
> start from a base OS system and compile everything from source
> on each installation), and (b) my MirCoDeveloper says it doesn’t
> work right anyway.

How does any of this help with solving #631639?  Maybe someone could
comment on the patch I sent 6 months ago?  I couldn't care less about
pkg-config.  I'd rather have this problem solved so we can get rid of
that 2337-line patch in freebsd-utils.

-- 
Robert Millan




Information forwarded to debian-bugs-dist@lists.debian.org, Debian GNU/kFreeBSD <debian-bsd@lists.debian.org>:
Bug#631639; Package libbsd-dev. (Mon, 02 Jan 2012 03:33:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Guillem Jover <guillem@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian GNU/kFreeBSD <debian-bsd@lists.debian.org>. (Mon, 02 Jan 2012 03:33:03 GMT) Full text and rfc822 format available.

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

From: Guillem Jover <guillem@debian.org>
To: Robert Millan <rmh@debian.org>, 631639@bugs.debian.org
Subject: Re: Bug#631639: __unused in libbsd. workaround for #522773 (linux) and #522774 (libc)
Date: Mon, 2 Jan 2012 04:27:54 +0100
Hi!

On Sat, 2011-06-25 at 19:06:48 +0200, Robert Millan wrote:
> Package: libbsd-dev
> Version: 0.3.0-1
> Severity: wishlist
> Tags: patch
> User: debian-bsd@lists.debian.org
> Usertags: kfreebsd
> 
> This patch implements a workaround for __unused name collision with Linux and
> Glibc.  The trick is to define __unused only when in overlay mode, and then
> provide replacements for broken headers using the overlay.

I think this crosses my threshold of something acceptable for libbsd.
What I've done instead is prepare and send patches to Linux and glibc
upstream, which is the correct fix on this issue IMO:

  <http://marc.info/?l=linux-kernel&m=132547276312101&w=2>
  <http://www.cygwin.com/ml/libc-ports/2012-01/msg00000.html>

The one on libc-alpha is not yet visible though. Let's see how these go.

thanks,
guillem




Information forwarded to debian-bugs-dist@lists.debian.org, Debian GNU/kFreeBSD <debian-bsd@lists.debian.org>:
Bug#631639; Package libbsd-dev. (Mon, 02 Jan 2012 10:39:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Thorsten Glaser <tg@mirbsd.de>:
Extra info received and forwarded to list. Copy sent to Debian GNU/kFreeBSD <debian-bsd@lists.debian.org>. (Mon, 02 Jan 2012 10:39:08 GMT) Full text and rfc822 format available.

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

From: Thorsten Glaser <tg@mirbsd.de>
To: Guillem Jover <guillem@debian.org>, 631639@bugs.debian.org
Cc: Robert Millan <rmh@debian.org>, debian-bugs-dist@lists.debian.org, Debian GNU/kFreeBSD <debian-bsd@lists.debian.org>
Subject: Re: Bug#631639: __unused in libbsd. workaround for #522773 (linux) and #522774 (libc)
Date: Mon, 2 Jan 2012 10:32:51 +0000 (UTC)
Guillem Jover dixit:

>What I've done instead is prepare and send patches to Linux and glibc
>upstream, which is the correct fix on this issue IMO:

I’ve sent suggestions like these years ago. Let’s hope
they’ll accept it this time.

Thanks,
//mirabilos
-- 
  “Having a smoking section in a restaurant is like having
          a peeing section in a swimming pool.”
						-- Edward Burr




Information forwarded to debian-bugs-dist@lists.debian.org, Debian GNU/kFreeBSD <debian-bsd@lists.debian.org>:
Bug#631639; Package libbsd-dev. (Mon, 02 Jan 2012 21:33:10 GMT) Full text and rfc822 format available.

Acknowledgement sent to Guillem Jover <guillem@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian GNU/kFreeBSD <debian-bsd@lists.debian.org>. (Mon, 02 Jan 2012 21:33:10 GMT) Full text and rfc822 format available.

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

From: Guillem Jover <guillem@debian.org>
To: Robert Millan <rmh@debian.org>, 631639@bugs.debian.org
Subject: Re: Bug#631639: __unused in libbsd. workaround for #522773 (linux) and #522774 (libc)
Date: Mon, 2 Jan 2012 22:31:43 +0100
On Mon, 2012-01-02 at 04:27:54 +0100, Guillem Jover wrote:
> On Sat, 2011-06-25 at 19:06:48 +0200, Robert Millan wrote:
> > Package: libbsd-dev
> > Version: 0.3.0-1
> > Severity: wishlist
> > Tags: patch
> > User: debian-bsd@lists.debian.org
> > Usertags: kfreebsd
> > 
> > This patch implements a workaround for __unused name collision with Linux and
> > Glibc.  The trick is to define __unused only when in overlay mode, and then
> > provide replacements for broken headers using the overlay.
> 
> I think this crosses my threshold of something acceptable for libbsd.
> What I've done instead is prepare and send patches to Linux and glibc
> upstream, which is the correct fix on this issue IMO:
> 
>   <http://marc.info/?l=linux-kernel&m=132547276312101&w=2>
>   <http://www.cygwin.com/ml/libc-ports/2012-01/msg00000.html>
> 
> The one on libc-alpha is not yet visible though. Let's see how these go.

Now visible at:

  <http://sourceware.org/ml/libc-alpha/2012-01/msg00001.html>

thanks,
guillem




Information forwarded to debian-bugs-dist@lists.debian.org, Debian GNU/kFreeBSD <debian-bsd@lists.debian.org>:
Bug#631639; Package libbsd-dev. (Tue, 03 Jan 2012 18:39:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Robert Millan <rmh@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian GNU/kFreeBSD <debian-bsd@lists.debian.org>. (Tue, 03 Jan 2012 18:39:05 GMT) Full text and rfc822 format available.

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

From: Robert Millan <rmh@debian.org>
To: Guillem Jover <guillem@debian.org>
Cc: 631639@bugs.debian.org
Subject: Re: Bug#631639: __unused in libbsd. workaround for #522773 (linux) and #522774 (libc)
Date: Tue, 3 Jan 2012 19:35:03 +0100
El 2 de gener de 2012 4:27, Guillem Jover <guillem@debian.org> ha escrit:
> I think this crosses my threshold of something acceptable for libbsd.
> What I've done instead is prepare and send patches to Linux and glibc
> upstream, which is the correct fix on this issue IMO:

The Linux patch is submitted and in ignore queue since 2009:

https://bugzilla.kernel.org/show_bug.cgi?id=14186

If you're lucky, maybe your retry gets Linux fixed.  I wouldn't hold
my breath with Drepper though.

Anyway, no harm in retrying, it can't get any worse than
http://sourceware.org/bugzilla/show_bug.cgi?id=4980

Maybe aiming at EGLIBC would be better?

-- 
Robert Millan




Information forwarded to debian-bugs-dist@lists.debian.org, Debian GNU/kFreeBSD <debian-bsd@lists.debian.org>:
Bug#631639; Package libbsd-dev. (Tue, 03 Jan 2012 19:00:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jonathan Nieder <jrnieder@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian GNU/kFreeBSD <debian-bsd@lists.debian.org>. (Tue, 03 Jan 2012 19:00:05 GMT) Full text and rfc822 format available.

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

From: Jonathan Nieder <jrnieder@gmail.com>
To: Robert Millan <rmh@debian.org>
Cc: 631639@bugs.debian.org
Subject: Re: __unused in libbsd. workaround for #522773 (linux) and #522774 (libc)
Date: Tue, 3 Jan 2012 12:57:55 -0600
Robert Millan wrote:

> The Linux patch is submitted and in ignore queue since 2009:
>
> https://bugzilla.kernel.org/show_bug.cgi?id=14186

I don't see a patch there.  Anyway, using kernel bugzilla is not a way
to get anyone to actually do anything.  The best you can hope for is
that someone will eventually forward your report as an email.

A better strategy is generally to write a patch, find the relevant
maintainers in the MAINTAINERS file or changelog and cc them (see
“6) Select your CC (e-mail carbon copy) list” in
Documentation/SubmittingPatches), resend as appropriate if they forget
about it, and act on their comments.

For the case at hand: upstream seems interested:

 http://thread.gmane.org/gmane.linux.kernel/1234225/focus=2410

If someone wants to chisel away at this (e.g., starting with icmp.h
and sysctl.h, then x86 or mips) following Sam's advice, I'll be happy.

Glad to see this doesn't seem to be stalled any more.

Jonathan




Information forwarded to debian-bugs-dist@lists.debian.org, Debian GNU/kFreeBSD <debian-bsd@lists.debian.org>:
Bug#631639; Package libbsd-dev. (Tue, 03 Jan 2012 19:03:12 GMT) Full text and rfc822 format available.

Acknowledgement sent to Thorsten Glaser <tg@mirbsd.de>:
Extra info received and forwarded to list. Copy sent to Debian GNU/kFreeBSD <debian-bsd@lists.debian.org>. (Tue, 03 Jan 2012 19:03:12 GMT) Full text and rfc822 format available.

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

From: Thorsten Glaser <tg@mirbsd.de>
To: Robert Millan <rmh@debian.org>, 631639@bugs.debian.org
Cc: Guillem Jover <guillem@debian.org>, Debian GNU/kFreeBSD <debian-bsd@lists.debian.org>
Subject: Re: Bug#631639: __unused in libbsd. workaround for #522773 (linux) and #522774 (libc)
Date: Tue, 3 Jan 2012 18:51:15 +0000 (UTC)
Robert Millan dixit:

>Maybe aiming at EGLIBC would be better?

EGLIBC refused this because it would distance them from GLIBC.

Even when I suggested to run this as ed/sed/perl -pie/whatever
during header installation time.

*sigh*,
//mirabilos
-- 
22:20⎜<asarch> The crazy that persists in his craziness becomes a master
22:21⎜<asarch> And the distance between the craziness and geniality is
only measured by the success 18:35⎜<asarch> "Psychotics are consistently
inconsistent. The essence of sanity is to be inconsistently inconsistent




Reply sent to Robert Millan <rmh@debian.org>:
You have taken responsibility. (Thu, 05 Jul 2012 18:45:06 GMT) Full text and rfc822 format available.

Notification sent to Robert Millan <rmh@debian.org>:
Bug acknowledged by developer. (Thu, 05 Jul 2012 18:45:06 GMT) Full text and rfc822 format available.

Message #75 received at 631639-done@bugs.debian.org (full text, mbox):

From: Robert Millan <rmh@debian.org>
To: 631639-done@bugs.debian.org
Subject: closing
Date: Thu, 5 Jul 2012 20:41:39 +0200
Hi,

I've put a fix for __unused problem in freebsd-glue so that libbsd
doesn't need to include this kind of hacks.  As far as I'm concerned,
this bug can be closed (but feel free to reopen if you disagree).

-- 
Robert Millan




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Fri, 03 Aug 2012 07:30:49 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 16 14:22:54 2014; Machine Name: buxtehude.debian.org

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