Re: POSIX semaphores in CentOS 5.1?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Feb 6, 2008 5:42 PM, MHR <mhullrich@xxxxxxxxx> wrote:
> According to the man pages for sem_wait, etc., POSIX semaphores are
> available in Linux 2.6 (with the right NTPL threading in glibc).
>
> However, I have a program that compiles just fine but won't link because it
> can't find the library for the semaphore operations.
>
> What am I missing?
>
> I ran a find and grep through all the libc's on the system and they turned
> up nothing:
>
> $ find /lib /usr/lib -name "*libc\.*" -print -exec nm {} 2>/dev/null \; |
> grep sem_
>
> (no results)
>
> Time is critical (yeah, I know...).

>From man sem_overview:
"Linking
       Programs  using  the POSIX semaphores API must be compiled with cc -lrt
       to link against the real-time library, librt."

Are you linking with -lrt?

Jonathan
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux