• Bug#266268: Depend on libsem-dev for !linux-gnu

    From Robert Millan@1:229/2 to All on Tue Aug 17 12:10:10 2004
    XPost: linux.debian.maint.glibc
    From: [email protected]

    This is a multi-part MIME message sent by reportbug.

    Package: libc0.3-dev
    Version: 2.3.2.ds1-16
    Severity: important
    Tags: patch sid

    Hi,

    libsem-dev, a library that implements pthread-based semaphores on !linux-gnu ports, is now in the archive.

    The functionality covered by libsem is equivalent to the semaphore api that linuxthreads/nptl provide in Glibc for linux-gnu. Therefore, on !linux-gnu systems libc-dev should depend on libsem-dev so that libc-dev fits as a drop-in replacement for libc6-dev. This will make libsem-dev a de-facto build essential. Since packages out there already assume semaphores are part of the build-essential suite, that should be ok.

    (Note: linux-gnu is the exception here, not the rule. New Glibc-based ports don't necessarily include semaphores in them since none of the internal libc interfaces rely on these, and in fact all new Glibc ports to the date are semaphore-less.)

    -- System Information:
    Debian Release: 3.1
    APT prefers unstable
    APT policy: (500, 'unstable')
    Architecture: kfreebsd-i386 (i386)
    Kernel: GNU/kFreeBSD 5.2.1-5
    Locale: LANG=C, LC_CTYPE=C (ignored: LC_ALL set to C)

    --- glibc-2.3.2.ds1/debian/sysdeps/depflags.pl~ 2004-08-17 09:39:02.000000000 +0200
    +++ glibc-2.3.2.ds1/debian/sysdeps/depflags.pl 2004-08-17 11:39:24.000000000 +0200
    @@ -35,6 +35,8 @@
    push @{$libc_dev_c{'Replaces'}}, ('man-db (<= 2.3.10-41)', 'gettext (<= 0.10.26-1)',
    'ppp (<= 2.2.0f-24)', 'libgdbmg1-dev (<= 1.7.3-24)');
    push @{$libc_dev_c{'Depends'}}, 'linux-kernel-headers';
    +} else {
    + push @{$libc_dev_c{'Depends'}}, 'libsem-dev';
    }

    # ${glibc}-doc is suggested by $libc_c and $libc_dev_c.

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)
  • From GOTO Masanori@1:229/2 to Robert Millan on Wed Aug 18 03:00:13 2004
    XPost: linux.debian.maint.glibc
    From: [email protected]

    At Tue, 17 Aug 2004 11:47:06 +0200,
    Robert Millan wrote:
    [2 libsem.diff <text/plain; us-ascii (7bit)>]
    --- glibc-2.3.2.ds1/debian/sysdeps/depflags.pl~ 2004-08-17 09:39:02.000000000 +0200
    +++ glibc-2.3.2.ds1/debian/sysdeps/depflags.pl 2004-08-17 11:39:24.000000000 +0200
    @@ -35,6 +35,8 @@
    push @{$libc_dev_c{'Replaces'}}, ('man-db (<= 2.3.10-41)', 'gettext (<= 0.10.26-1)',
    'ppp (<= 2.2.0f-24)', 'libgdbmg1-dev (<= 1.7.3-24)');
    push @{$libc_dev_c{'Depends'}}, 'linux-kernel-headers';
    +} else {
    + push @{$libc_dev_c{'Depends'}}, 'libsem-dev';
    }

    # ${glibc}-doc is suggested by $libc_c and $libc_dev_c.

    Apparently this patch is broken. This enclosure is for $DEB_HOST_GNU_SYSTEM=linux. "(not linux) != (hurd || bsd)".
    Please describe which $DEB_HOST_GNU_SYSTEM do you want to add it.

    Regards,
    -- gotom


    --
    To UNSUBSCRIBE, email to [email protected]
    with a subject of "unsubscribe". Trouble? Contact [email protected]

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)
  • From GOTO Masanori@1:229/2 to Robert Millan on Wed Aug 18 03:40:08 2004
    XPost: linux.debian.maint.glibc
    From: [email protected]

    At Wed, 18 Aug 2004 02:40:13 +0200,
    Robert Millan wrote:
    On Wed, Aug 18, 2004 at 09:31:59AM +0900, GOTO Masanori wrote:
    At Tue, 17 Aug 2004 11:47:06 +0200,
    push @{$libc_dev_c{'Depends'}}, 'linux-kernel-headers';
    +} else {
    + push @{$libc_dev_c{'Depends'}}, 'libsem-dev';

    Apparently this patch is broken. This enclosure is for $DEB_HOST_GNU_SYSTEM=linux. "(not linux) != (hurd || bsd)".
    Please describe which $DEB_HOST_GNU_SYSTEM do you want to add it.

    This is what I intended. See the note in my previous mail:

    "(Note: linux-gnu is the exception here, not the rule. New Glibc-based ports
    don't necessarily include semaphores in them since none of the internal libc
    interfaces rely on these, and in fact all new Glibc ports to the date are
    semaphore-less.)"

    If you disagree, adding it explicitly like you suggest would be fine either (I don't feel like discussing whether future ports of Glibc will include semaphores or not =).

    In first, POSIX 1003.1b semaphore is coupled with pthread, but is not
    same as "pthread semaphore". It provides name space accessible
    semaphore with the bonus that is userland fast locking mechanism.

    I disagree because semaphore and threading implementation depends on
    the system architecture. I know there're some generic implementation
    for both semaphore and pthread, so libsem-dev is not "the only one"
    choise. Thus, I think we should explicitly define which architecture
    use libsem-dev.

    So the DEB_HOST_GNU_SYSTEM values that should enable this are "gnu", "kfreebsd-gnu" and "knetbsd-gnu". More could be added later.

    Robert, please provide patch?

    BTW, I think it's valuable to add generic implementation of posix
    semaphore into glibc.

    Regards,
    -- gotom


    --
    To UNSUBSCRIBE, email to [email protected]
    with a subject of "unsubscribe". Trouble? Contact [email protected]

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)
  • From Robert Millan@1:229/2 to GOTO Masanori on Wed Aug 18 04:40:08 2004
    XPost: linux.debian.maint.glibc
    From: [email protected]

    On Wed, Aug 18, 2004 at 10:18:09AM +0900, GOTO Masanori wrote:

    In first, POSIX 1003.1b semaphore is coupled with pthread, but is not
    same as "pthread semaphore". It provides name space accessible
    semaphore with the bonus that is userland fast locking mechanism.

    I disagree because semaphore and threading implementation depends on
    the system architecture. I know there're some generic implementation
    for both semaphore and pthread, so libsem-dev is not "the only one"
    choise. Thus, I think we should explicitly define which architecture
    use libsem-dev.

    Ok.

    So the DEB_HOST_GNU_SYSTEM values that should enable this are "gnu", "kfreebsd-gnu" and "knetbsd-gnu". More could be added later.

    Robert, please provide patch?

    Attached. Note that the entries for k*bsd-gnu didn't exist yet, so I added them in my patch, with the dependencies we use in these ports.

    BTW, I think it's valuable to add generic implementation of posix
    semaphore into glibc.

    I think integrating libsem in Glibc would make sense. However, this would imply that on the platforms where the Glibc package does not provide libpthread.so (on GNU/Hurd it's in the hurd package, and on GNU/k*BSD it's provided by gnu pth), it'd still have to be linked separately into libsem.so.

    I'll speak with libsem upstream about this.

    --
    Robert Millan

    (Debra and Ian) (Gnu's Not (UNiplexed Information and Computing System))/\ (kernel of *(Berkeley Software Distribution))

    --- glibc-2.3.2.ds1/debian.old/sysdeps/depflags.pl 2004-08-18 04:10:15.000000000 +0200
    +++ glibc-2.3.2.ds1/debian/sysdeps/depflags.pl 2004-08-18 04:13:21.000000000 +0200
    @@ -19,7 +19,7 @@

    # OS specific stuff
    if ($DEB_HOST_GNU_SYSTEM eq "gnu") {
    - push @{$libc_dev_c{'Depends'}}, ('gnumach-dev', 'hurd-dev');
    + push @{$libc_dev_c{'Depends'}}, ('gnumach-dev', 'hurd-dev', 'libsem-dev');
    push @{$libc_dev_c{'Replaces'}}, 'glibc2-dev';
    push @{$libc_dev_c{'Conflicts'}}, 'glibc2-dev';
    push @{$libc_c{'Replaces'}}, 'glibc2';
    @@ -36,6 +36,12 @@
    'ppp (<= 2.2.0f-24)', 'libgdbmg1-dev (<= 1.7.3-24)');
    push @{$libc_dev_c{'Depends'}}, 'linux-kernel-headers';
    }
    +if ($DEB_HOST_GNU_SYSTEM eq "kfreebsd-gnu") {
    + push @{$libc_dev_c{'Depends'}}, ('kfreebsd-headers', 'libpthread-dev', 'libsem-dev');
    +}
    +if ($DEB_HOST_GNU_SYSTEM eq "knetbsd-gnu") {
    + push @{$libc_dev_c{'Depends'}}, ('knetbsd-headers', 'libpthread-dev', 'libsem-dev');
    +}

    # ${glibc}-doc is suggested by $libc_