Debian Bug report logs - #434040
apmd: changing order of includes should not screw thing

Package: apmd; Maintainer for apmd is Anibal Monsalve Salazar <anibal@debian.org>; Source for apmd is src:apmd.

Reported by: Frans Pop <elendil@planet.nl>

Date: Sat, 21 Jul 2007 05:51:01 UTC

Severity: important

Tags: d-i, patch

Merged with 435700

Done: Anibal Monsalve Salazar <anibal@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, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#434040; Package libdebian-installer. Full text and rfc822 format available.

Acknowledgement sent to Frans Pop <elendil@planet.nl>:
New Bug report received and forwarded. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. Full text and rfc822 format available.

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

From: Frans Pop <elendil@planet.nl>
To: BTS submit <submit@bugs.debian.org>
Subject: libdebian-installer: type declaration conflict
Date: Sat, 21 Jul 2007 07:47:32 +0200
[Message part 1 (text/plain, inline)]
Package: libdebian-installer
Version: 0.52
Severity: serious

While compiling kbd-chooser on sparc64, I got the following errors.
Looks like there's some conflict with linux-libc-dev (2.6.22-1)?


In file included from /usr/include/debian-installer/types.h:29,
                 from /usr/include/debian-installer/exec.h:26,
                 from /usr/include/debian-installer.h:5,
                 from ksyms.c:5:
/usr/include/sys/types.h:62: error: conflicting types for ‘dev_t’
/usr/include/linux/types.h:13: error: previous declaration of ‘dev_t’ was here
/usr/include/sys/types.h:67: error: conflicting types for ‘gid_t’
/usr/include/linux/types.h:27: error: previous declaration of ‘gid_t’ was here
/usr/include/sys/types.h:72: error: conflicting types for ‘mode_t’
/usr/include/linux/types.h:15: error: previous declaration of ‘mode_t’ was here
/usr/include/sys/types.h:77: error: conflicting types for ‘nlink_t’
/usr/include/linux/types.h:16: error: previous declaration of ‘nlink_t’ was here
/usr/include/sys/types.h:82: error: conflicting types for ‘uid_t’
/usr/include/linux/types.h:26: error: previous declaration of ‘uid_t’ was here
/usr/include/sys/types.h:116: error: conflicting types for ‘daddr_t’
/usr/include/linux/types.h:19: error: previous declaration of ‘daddr_t’ was here
In file included from /usr/include/sys/types.h:133,
                 from /usr/include/debian-installer/types.h:29,
                 from /usr/include/debian-installer/exec.h:26,
                 from /usr/include/debian-installer.h:5,
                 from ksyms.c:5:
/usr/include/time.h:105: error: conflicting types for ‘timer_t’
/usr/include/linux/types.h:22: error: previous declaration of ‘timer_t’ was here
In file included from /usr/include/sys/types.h:220,
                 from /usr/include/debian-installer/types.h:29,
                 from /usr/include/debian-installer/exec.h:26,
                 from /usr/include/debian-installer.h:5,
                 from ksyms.c:5:
/usr/include/sys/select.h:49: error: conflicting types for ‘suseconds_t’
/usr/include/linux/types.h:21: error: previous declaration of ‘suseconds_t’ was here
/usr/include/sys/select.h:78: error: conflicting types for ‘fd_set’
/usr/include/linux/types.h:12: error: previous declaration of ‘fd_set’ was here
In file included from /usr/include/debian-installer/types.h:29,
                 from /usr/include/debian-installer/exec.h:26,
                 from /usr/include/debian-installer.h:5,
                 from ksyms.c:5:
/usr/include/sys/types.h:235: error: conflicting types for ‘blkcnt_t’
/usr/include/linux/types.h:124: error: previous declaration of ‘blkcnt_t’ was here
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#434040; Package libdebian-installer. Full text and rfc822 format available.

Acknowledgement sent to Frans Pop <elendil@planet.nl>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. Full text and rfc822 format available.

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

From: Frans Pop <elendil@planet.nl>
To: 434040@bugs.debian.org
Cc: linux-libc-dev@packages.debian.org
Subject: Re: Bug#434040: libdebian-installer: type declaration conflict
Date: Sat, 21 Jul 2007 10:43:52 +0200
[Message part 1 (text/plain, inline)]
reassign 434040 linux-libc-dev
tags 434040 d-i
thanks

On Saturday 21 July 2007 07:47, Frans Pop wrote:
> While compiling kbd-chooser on sparc64, I got the following errors.
> Looks like there's some conflict with linux-libc-dev (2.6.22-1)?

> In file included from /usr/include/debian-installer/types.h:29,
>                  from /usr/include/debian-installer/exec.h:26,
>                  from /usr/include/debian-installer.h:5,
>                  from ksyms.c:5:
> /usr/include/sys/types.h:62: error: conflicting types for ‘dev_t’
> /usr/include/linux/types.h:13: error: previous declaration of ‘dev_t’ was here
> /usr/include/sys/types.h:67: error: conflicting types for ‘gid_t’
> /usr/include/linux/types.h:27: error: previous declaration of ‘gid_t’ was here
> /usr/include/sys/types.h:72: error: conflicting types for ‘mode_t’
> /usr/include/linux/types.h:15: error: previous declaration of ‘mode_t’ was here
[...]

According to Bastian this is an issue in linux-libc-dev or libc-dev:
<waldi> fjp: its a bug between libc-dev and linux-libc-dev ...
<fjp> waldi: OK. Already reported and being worked on? BR#?
<waldi> the later provides backward-compatible user definitions which
the libc should disable but always do
<waldi> i think about dropping them at once
[Message part 2 (application/pgp-signature, inline)]

Bug reassigned from package `libdebian-installer' to `linux-libc-dev'. Request was from Frans Pop <elendil@planet.nl> to control@bugs.debian.org. (Sat, 21 Jul 2007 08:45:05 GMT) Full text and rfc822 format available.

Tags added: d-i Request was from Frans Pop <elendil@planet.nl> to control@bugs.debian.org. (Sat, 21 Jul 2007 08:45:06 GMT) Full text and rfc822 format available.

Merged 434040 435700. Request was from Alexander Wirt <formorer@debian.org> to control@bugs.debian.org. (Fri, 03 Aug 2007 19:00:08 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Kernel Team <debian-kernel@lists.debian.org>:
Bug#434040; Package linux-libc-dev. Full text and rfc822 format available.

Acknowledgement sent to Joey Hess <joeyh@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Kernel Team <debian-kernel@lists.debian.org>. Full text and rfc822 format available.

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

From: Joey Hess <joeyh@debian.org>
To: 435700@bugs.debian.org, 434040@bugs.debian.org, 429064@bugs.debian.org
Subject: thank you
Date: Wed, 27 Feb 2008 15:22:33 -0500
[Message part 1 (text/plain, inline)]
I've always wanted a system where this works:

#include <string.h>
#include <apm.h>

But this blows up horribly:

#include <apm.h>
#include <string.h>

I'd like to congradulate all involved maintainers in making this
possible, and on avoiding doing anything on this bug for longer than I'd
have imagined was possible. I love working around problems like this
over and over again, and without you, I'd have nothing to do to fill my
long, empty, days. Thank you for creating a thing of beauty and giving
my life meaning.

-- 
see shy jo
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Kernel Team <debian-kernel@lists.debian.org>:
Bug#434040; Package linux-libc-dev. (Fri, 03 Oct 2008 15:06:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Josselin Mouette <joss@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Kernel Team <debian-kernel@lists.debian.org>. (Fri, 03 Oct 2008 15:06:02 GMT) Full text and rfc822 format available.

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

From: Josselin Mouette <joss@debian.org>
To: 434040@bugs.debian.org
Subject: Conflicting declarations for dev_t
Date: Fri, 03 Oct 2008 17:03:09 +0200
[Message part 1 (text/plain, inline)]
Hi,

There have not been any updates to the status of this bug for several
months, although this is definitely something that should be fixed for
lenny.

Is there anything that is possible to help fixing this before the
release? I see you consider entirely dropping these declarations, do you
need for example a full rebuild of the archive with a version without
them?

Cheers,
-- 
 .''`.
: :' :      We are debian.org. Lower your prices, surrender your code.
`. `'       We will add your hardware and software distinctiveness to
  `-        our own. Resistance is futile.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Kernel Team <debian-kernel@lists.debian.org>:
Bug#434040; Package linux-libc-dev. (Wed, 22 Oct 2008 21:18:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Larry Doolittle <ldoolitt@recycle.lbl.gov>:
Extra info received and forwarded to list. Copy sent to Debian Kernel Team <debian-kernel@lists.debian.org>. (Wed, 22 Oct 2008 21:18:02 GMT) Full text and rfc822 format available.

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

From: Larry Doolittle <ldoolitt@recycle.lbl.gov>
To: Josselin Mouette <joss@debian.org>
Cc: 434040@bugs.debian.org, Joey Hess <joeyh@debian.org>
Subject: Debian bug #434040 (Conflicting declarations for dev_t)
Date: Wed, 22 Oct 2008 14:13:40 -0700
Josselin -

> Is there anything that is possible to help fixing this before the
> release?

My reading of header files shows that libc6-dev in etch, lenny,
and sid does not suffer from the original problem.  The files
that include a workaround (ugly, but apparently functional) for
possible namespace pollution are
  /usr/include/sys/kd.h
  /usr/include/sys/sysctl.h
I don't see mention of this problem in the Debian glibc changelog,
and I don't know how to pull out older copies to see when this
workaround was added.  An earlier attempt is part of sarge
(libc6-dev version 2.3.2.ds1-22sarge6).

The simplest approach to this bug is to close it.

Joey mentions apm.h.  It turns out this is the _only_ other file
(at least on my sid system) in /usr/include that nests to a
linux kernel header file.  It really should have a workaround
like that in glibc.

So this bug could be cloned, the copy assigned to apmd, and marked
"important".  I append a patch that is arguably cleaner than the
approach used by glibc, and is somewhat tested (I checked that it
didn't break the build of battery-stats, osdsh, sleepd, or wmbattery,
and it fixes Joey's test case).

My patch depends on a feature (__KERNEL_STRICT_NAMES) of linux/types.h
that is at least as old as sarge (linux-kernel-headers version
2.5.999-test7-bk-17).  This macro is defined in glibc features.h,
so it looks like all the preprocessor gyrations in sys/sysctl.h are
not needed, because that file includes <features.h>.

   - Larry

--- apm.h.orig	2003-01-16 13:50:36.000000000 -0800
+++ apm.h	2008-10-13 13:43:47.000000000 -0700
@@ -20,6 +20,13 @@
  * $Id: apm.h,v 1.7 1999/07/05 22:31:11 apenwarr Exp $
  * 
  */
+#ifndef _APM_H
+#define _APM_H 1
+
+#ifndef __KERNEL_STRICT_NAMES
+#define __KERNEL_STRICT_NAMES
+#endif
+
 #include <linux/apm_bios.h>
 #include <sys/types.h>
 
@@ -93,3 +100,5 @@
 #else
 #define apm_reject(fd)   (-EINVAL)
 #endif
+
+#endif




Bug reassigned from package `linux-libc-dev' to `apm'. Request was from Luk Claes <luk.claes@ugent.be> to control@bugs.debian.org. (Thu, 30 Oct 2008 08:48:02 GMT) Full text and rfc822 format available.

Tags added: patch Request was from Luk Claes <luk.claes@ugent.be> to control@bugs.debian.org. (Thu, 30 Oct 2008 08:48:04 GMT) Full text and rfc822 format available.

Severity set to `important' from `serious' Request was from Luk Claes <luk.claes@ugent.be> to control@bugs.debian.org. (Thu, 30 Oct 2008 08:48:05 GMT) Full text and rfc822 format available.

Changed Bug title to `apmd: changing order of includes should not screw thing' from `libdebian-installer: type declaration conflict'. Request was from Luk Claes <luk.claes@ugent.be> to control@bugs.debian.org. (Thu, 30 Oct 2008 08:48:07 GMT) Full text and rfc822 format available.

Reply sent to Anibal Monsalve Salazar <anibal@debian.org>:
You have taken responsibility. (Thu, 30 Oct 2008 11:24:02 GMT) Full text and rfc822 format available.

Notification sent to Frans Pop <elendil@planet.nl>:
Bug acknowledged by developer. (Thu, 30 Oct 2008 11:24:04 GMT) Full text and rfc822 format available.

Message #44 received at 434040-close@bugs.debian.org (full text, mbox):

From: Anibal Monsalve Salazar <anibal@debian.org>
To: 434040-close@bugs.debian.org
Subject: Bug#434040: fixed in apmd 3.2.2-12
Date: Thu, 30 Oct 2008 11:17:04 +0000
Source: apmd
Source-Version: 3.2.2-12

We believe that the bug you reported is fixed in the latest version of
apmd, which is due to be installed in the Debian FTP archive:

apmd_3.2.2-12.diff.gz
  to pool/main/a/apmd/apmd_3.2.2-12.diff.gz
apmd_3.2.2-12.dsc
  to pool/main/a/apmd/apmd_3.2.2-12.dsc
apmd_3.2.2-12_amd64.deb
  to pool/main/a/apmd/apmd_3.2.2-12_amd64.deb
libapm-dev_3.2.2-12_amd64.deb
  to pool/main/a/apmd/libapm-dev_3.2.2-12_amd64.deb
libapm1_3.2.2-12_amd64.deb
  to pool/main/a/apmd/libapm1_3.2.2-12_amd64.deb
xapm_3.2.2-12_amd64.deb
  to pool/main/a/apmd/xapm_3.2.2-12_amd64.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 434040@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Anibal Monsalve Salazar <anibal@debian.org> (supplier of updated apmd package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Thu, 30 Oct 2008 21:20:28 +1100
Source: apmd
Binary: apmd xapm libapm1 libapm-dev
Architecture: source amd64
Version: 3.2.2-12
Distribution: unstable
Urgency: low
Maintainer: Anibal Monsalve Salazar <anibal@debian.org>
Changed-By: Anibal Monsalve Salazar <anibal@debian.org>
Description: 
 apmd       - Utilities for Advanced Power Management (APM)
 libapm-dev - Library for interacting with APM driver in kernel
 libapm1    - Library for interacting with APM driver in kernel
 xapm       - X program to monitor APM battery status
Closes: 434040
Changes: 
 apmd (3.2.2-12) unstable; urgency=low
 .
   * Define _APM_H in apm.h; closes: #434040
     patch by Larry Doolittle
Checksums-Sha1: 
 c608518c71fe6399e90b5cff8671f6994a7ed8cf 1036 apmd_3.2.2-12.dsc
 1ed0bc0141a91090bc487fe395dc8c1d083e1fb8 18507 apmd_3.2.2-12.diff.gz
 1c78f96b302ce4f06fc7f337ad97c108fd78a354 52630 apmd_3.2.2-12_amd64.deb
 0daeef36387de4c3d9d043617dd5ed57a3df5f4d 28468 xapm_3.2.2-12_amd64.deb
 11ccc5c77b9f3b3c06e050ea4db64449507a1c29 26364 libapm1_3.2.2-12_amd64.deb
 06831d2bef6b4e8f653c5aef80eb62b86be62df5 26812 libapm-dev_3.2.2-12_amd64.deb
Checksums-Sha256: 
 7f5730cda17bc4e3f705ac20d203aac2d905c42e47635a514d233ce8761a7ee2 1036 apmd_3.2.2-12.dsc
 3a85df39fc7692798267fac7bdc858209b375c0f623b7bc4c9726c2c976c7eb1 18507 apmd_3.2.2-12.diff.gz
 6801271c564853d03923293a0da81df0e17e3f31a61654627c344699a0d77972 52630 apmd_3.2.2-12_amd64.deb
 b6c2ab71eaed432248a498114e18048e615bc049d71a83dc0d4bf646ce8644af 28468 xapm_3.2.2-12_amd64.deb
 7faaf75eef92bf199ca7e1397cea011d0fb6b85fcea4c20e6e13e0e1f7a409d9 26364 libapm1_3.2.2-12_amd64.deb
 f09790fcf1ad381ce14b838c3d99996d0bd38e4afc34facff4e4203ed2aecaab 26812 libapm-dev_3.2.2-12_amd64.deb
Files: 
 ac8361e1b2a909d4d6045e1d7f13b87b 1036 admin optional apmd_3.2.2-12.dsc
 89e9a95a8fcc786b39fdc633aae97de9 18507 admin optional apmd_3.2.2-12.diff.gz
 d40c27c31cc711bf7fedae96bc762f54 52630 admin optional apmd_3.2.2-12_amd64.deb
 cc19b8d43e32595abdfa0511e4bae050 28468 x11 optional xapm_3.2.2-12_amd64.deb
 a12bf972dbbfeeb589121db142b02f2c 26364 libs optional libapm1_3.2.2-12_amd64.deb
 2a58b72ee7347ef57a9a21838533ea13 26812 libdevel optional libapm-dev_3.2.2-12_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkkJlmYACgkQgY5NIXPNpFWefQCg0FWjwXc0TW15f7rX3t2G1RWt
vn8AnRe8zjvB5JSA2nb8DwtreZ43mv5h
=d7Nj
-----END PGP SIGNATURE-----





Reply sent to Anibal Monsalve Salazar <anibal@debian.org>:
You have taken responsibility. (Thu, 30 Oct 2008 11:24:05 GMT) Full text and rfc822 format available.

Notification sent to Kurt Roeckx <kurt@roeckx.be>:
Bug acknowledged by developer. (Thu, 30 Oct 2008 11:24:07 GMT) Full text and rfc822 format available.

Bug reassigned from package `apm' to `apmd'. Request was from Aníbal Monsalve Salazar <anibal@debian.org> to control@bugs.debian.org. (Thu, 30 Oct 2008 11:33:04 GMT) Full text and rfc822 format available.

Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Fri, 28 Nov 2008 07:26:26 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: Thu Apr 17 15:42:34 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.