FreeBSD libthr on Redhat




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@xxxxxxxxxxxxxxxxxxxxx= wrote:

Dear All,
I am not able to post any message to the
[2]freebsd-hackers@xxxxxxxxxxx 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@@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@xxxxxxxxxxxxxxxxxxxxx";
2. file://localhost/tmp/3D"mailt_______________________________________________
freebsd-current@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: FreeBSD & Linux distro
    ... as a FreeBSD advocacy the tone of the article should be neutral and all ... do not like Linux and more over I have never used it in my life but I ... Statement of the type BSD appears more stable than Linux is ... Just a note -- linux is often not included in the lists of longest ...
    (freebsd-questions)
  • Re: Linking libraries for compat_linux
    ... I hate to trouble development lists with an operational issue but this ... The Linux and FreeBSD versions of gamin both fail on inotify_init. ... Fam list appears to be defunct and I've not yet tried the direct mail ...
    (freebsd-questions)
  • Re: re changing from vista
    ... as heavyweight "sponsors" did. ... not mentioning linux that got just billion$ total sposoring from IBM. ... FreeBSD developers may get, but not much more than now. ... No - only make more mess, and will drive experienced unix users AWAY from FreeBSD just after reading that lists. ...
    (freebsd-questions)
  • RE: FreeBSD vs Linux
    ... The guidelines for using this list recommend ... >guideline in internet mailing lists is for newcomers to "lurk". ... Except that both FreeBSD and Linux are constantly changing. ...
    (freebsd-questions)
  • Re: FreeBSD 4.x Opteron Question
    ... the FreeBSD developers told everyone that 5.3 was da ... initially over linux not because there's a bunch of good guys on the ... My tests measure kernel performance; ... > a networking device is a key performance indicator. ...
    (freebsd-questions)