FreeBSD libthr on Redhat

From: Sergey Babkin <babkin_at_verizon.net>
Date: Tue, 31 Mar 2009 06:55:01 -0500 (CDT)
   No, you can not use the libthr from FreeBSD on Linux. You would not be
   = able to even compile
   it if you try, since it requires the kernel support= that is not
   available on Linux.
   For portability to different OSes, pthr= eads is your only choice. And
   there really
   should not be that much perfo= rmance difference anyway.
   BTW, for better luck with posting to the m= ailing lists, please write
   something sensible
   into the Subject field.Emp= ty or weird subject probably triggers the
   spam filter.
   -SB
   Ma= r 31, 2009 01:11:27 AM, [1]srinivasg_at_esntechnologies.co.in= wrote:

     Dear All,
     I am not able to post any message to the
     [2]freebsd-hackers_at_freebsd.org ID.
     When I post a message, I did= not get any error. However, I am able
     to
     receive the messages from all = of you. So, I am sending this
     message to
     you individually. Please, my re= quest is to forward this to the
     list.
     I have written an application = where I have used the libpthread
     library
     for creating the pthreads. Howe= ver, to get the maximum
     optimization, I
     want to use the libthr.a library= instead of libpthread library.
     However,
     when I tried to use on my Redha= t box, I end up with following
     errors.
     ../lib/linux/libthr.a(thr_sem= .o): In function `_sem_init':
     thr_sem.c:(.text+0x100): undefined referen= ce to `ksem_init'
     thr_sem.c:(.text+0x115): undefined reference to `ksem_= destroy'
     ../lib/linux/libthr.a(thr_sem.o): In function
     `_sem_destroy':thr_sem.c:(.text+0x216): undefined reference to
     `ksem_destroy'
     ../lib/= linux/libthr.a(thr_sem.o): In function `_sem_timedwait':
     thr_sem.c:(.tex= t+0x2ad): undefined reference to `ksem_timedwait'
     ../lib/linux/libthr.a(= thr_sem.o): In function `_sem_wait':
     ....
     ....
     ....
     collect= 2: ld returned 1 exit status
     make: *** [target] Error 1
     I underst= and that the "ksem_init" is not available on the Redhat
     box.
     Then, I hav= e tried to use the libc.so.7 from FreeBSD. I have
     included
     the libc.so.7= in my application to getridof the above undefined
     references. Even thou= gh, I end up with the following errors.
     /usr/bin/ld: errno_at__at_FBSD_1.0= : TLS definition in /lib/libc.so.6
     section
     .tbss mismatches non-TLS defi= nition in ../lib/linux/libc.so
     section .bss
     /lib/libc.so.6: could not re= ad symbols: Bad value
     Here, the lib/libc.so.6 is a Redhat libc libra= ry where as
     ../lib/linux/libc.so is a FreeBSD library (libc.so.7).
     <= br>Is it possible to use the FreeBSD libthr.a library file on a
     Redhat
     L= inux box?
     Please let me know the whether it is possible to use the = libthr.a
     library on Redhat box or not.
     Thanks in advance.
     = With Regards,
     Srinivas G
     

References

   1. 3D"mailto:srinivasg_at_esntechnologies.co.in"
   2. file://localhost/tmp/3D"mailt
Received on Tue Mar 31 2009 - 09:55:12 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:45 UTC