fam
[Top] [All Lists]

Re: fam with DNotify and glibc 2.3.1 requires -lrt -lpthread

To: Alexander Larsson <alexl@xxxxxxxxxx>
Subject: Re: fam with DNotify and glibc 2.3.1 requires -lrt -lpthread
From: Wil Evers <Wil_Evers@xxxxxxxxxx>
Date: Tue, 14 Jan 2003 09:59:33 +0100
Cc: michael.wardle@xxxxxxxxxx, fam@xxxxxxxxxxx
References: <Pine.LNX.4.44.0301140233080.3541-100000@xxxxxxxxxxxxxxxxxxxxxxxx>
Sender: fam-bounce@xxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20030111
Alexander Larsson wrote:


On Wed, 8 Jan 2003, Wil Evers wrote:

This is because the DNotify patch uses SIGRTMIN, which is #defined in glibc-2.3.1's <bits/signum.h> as __libc_current_sigrtmin(); __libc_current_sigrtmin() returns -1 unless linked against librt and libpthread.

The fix is to add '-lrt -lpthread' to the fam_LDADD line in the (DNotify-patched) fam-2.6.9/fam/Makefile.am, and re-run automake.

Perhaps a note on one the fam web pages would be appropriate.


I talked to the Red Hat glibc maintainer (Jakub Jelinek), and he said that recent glibc SIGRTMIN is not returning -1.

That would depend on what one would call recent; glibc-2.3.1 is the latest official release. This is what happens on my system:

  wie@linus:~/tmp$ cat tst.c
  #include <stdio.h>
  #include <signal.h>

  int main () {
          printf ("SIGRTMIN: %d\n", SIGRTMIN) ;
          return 0 ;
  }
  wie@linus:~/tmp$ gcc tst.c
  wie@linus:~/tmp$ ./a.out
  SIGRTMIN: -1
  wie@linus:~/tmp$ gcc tst.c -lrt
  wie@linus:~/tmp$ ./a.out
  SIGRTMIN: -1
  wie@linus:~/tmp$ gcc tst.c -lrt -lpthread
  wie@linus:~/tmp$ ./a.out
  SIGRTMIN: 35
  wie@linus:~/tmp$ /lib/libc.so.6
  GNU C Library stable release version 2.3.1, by Roland McGrath et al.
  Copyright (C) 1992-2001, 2002 Free Software Foundation, Inc.
  This is free software; see the source for copying conditions.
  There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
  PARTICULAR PURPOSE.
  Compiled by GNU CC version 3.2.1.
  Compiled on a Linux 2.4.20 system on 2003-01-10.
  Available extensions:
          GNU libio by Per Bothner
          crypt add-on version 2.1 by Michael Glad and others
          linuxthreads-0.10 by Xavier Leroy
          BIND-8.2.3-T5B
          libthread_db work sponsored by Alpha Processor Inc
          NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk
  Report bugs using the `glibcbug' script to <bugs@xxxxxxx>.

Perhaps things have changed again since glibc-2.3.1 was released. What I do know is that glibc-2.2.5 does not have this issue.

Regards,

- Wil
Wil Evers, DOOSYS R&D, Utrecht, Holland


<Prev in Thread] Current Thread [Next in Thread>