From owner-freebsd-current@FreeBSD.ORG Tue Mar 31 11:55:12 2009 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CB2DB106566B for ; Tue, 31 Mar 2009 11:55:12 +0000 (UTC) (envelope-from babkin@verizon.net) Received: from vms173019pub.verizon.net (vms173019pub.verizon.net [206.46.173.19]) by mx1.freebsd.org (Postfix) with ESMTP id AAA4D8FC1A for ; Tue, 31 Mar 2009 11:55:12 +0000 (UTC) (envelope-from babkin@verizon.net) Received: from vms244.mailsrvcs.net ([172.18.12.134]) by vms173019.mailsrvcs.net (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPA id <0KHD00JO4D3PU849@vms173019.mailsrvcs.net> for freebsd-current@FreeBSD.org; Tue, 31 Mar 2009 06:55:01 -0500 (CDT) Received: from 96.234.43.209 ([96.234.43.209]) by vms244.mailsrvcs.net (Verizon Webmail) with HTTP; Tue, 31 Mar 2009 06:55:01 -0500 (CDT) Date: Tue, 31 Mar 2009 06:55:01 -0500 (CDT) From: Sergey Babkin To: srinivasg@esntechnologies.co.in Message-id: <1762266444.173443.1238500501801.JavaMail.root@vms244.mailsrvcs.net> Content-transfer-encoding: quoted-printable X-Originating-IP: [96.234.43.209] X-Mailman-Approved-At: Tue, 31 Mar 2009 13:10:22 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-current@FreeBSD.org Subject: FreeBSD libthr on Redhat X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Mar 2009 11:55:13 -0000 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@esntechnologies.co.in= wrote: Dear All, I am not able to post any message to the [2]freebsd-hackers@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@@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@esntechnologies.co.in" 2. file://localhost/tmp/3D"mailt=