From owner-freebsd-threads@FreeBSD.ORG Tue Mar 31 09:30:29 2009 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AD32E106564A for ; Tue, 31 Mar 2009 09:30:29 +0000 (UTC) (envelope-from srinivasganji@gmail.com) Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.31]) by mx1.freebsd.org (Postfix) with ESMTP id 697198FC08 for ; Tue, 31 Mar 2009 09:30:29 +0000 (UTC) (envelope-from srinivasganji@gmail.com) Received: by yw-out-2324.google.com with SMTP id 5so1620062ywh.13 for ; Tue, 31 Mar 2009 02:30:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=mzElXj3z8GKvWT3RPEjqIocPnDFd5b2SWYy2d8sKeTE=; b=sJKR5AgY5Ihnkqv57cH6cv5tsWbkZY9WMM/4vvFgK62VU8gKl1mFAQviyf212xCou3 BEKKeCDkNJDdm+w2xyo0zEGFRDW8v6oKpYeKW3TnYPK6WlNCsaY9+2P90vAl7NhqFdpq ByHCdXGzsGJySKQ4b7TPHpe200yvRM4g5FGw8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=SdqRzSySe9PwwUA39H/gVhM+8Xpv2NPvO7H9oysu/bN0eBKPvT+/y4Yiqizq1cETbG s2BPHngmG1YYJ3GVu39EB+vrITFKLFIvYFZzKQ//N8df8wIZx4G2hnRccCCtXHelCo3e So4dxcS0xUZNg02pp8q9nHOp6oN7IhZ/oKbpI= MIME-Version: 1.0 Received: by 10.150.143.12 with SMTP id q12mr11884173ybd.153.1238489856083; Tue, 31 Mar 2009 01:57:36 -0700 (PDT) Date: Tue, 31 Mar 2009 14:27:36 +0530 Message-ID: From: Srinivas Ganji To: freebsd-threads@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Is it possible to use the libthr.a file on a Redhat Linux? X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Mar 2009 09:30:29 -0000 Dear All, I have tried to use the libthr.a library for compiling an application which is working fine on Redhat system with libpthread library. However, I end up with the following errors. ../lib/linux/libthr.a(thr_sem.o): In function `_sem_init': thr_sem.c:(.text+0x100): undefined reference 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:(.text+0x2ad): undefined reference to `ksem_timedwait' ../lib/linux/libthr.a(thr_sem.o): In function `_sem_wait': .... .... .... collect2: ld returned 1 exit status make: *** [target] Error 1 So, I have also mentioned the libc.so.7(This is also a FreeBSD libc library) library in our application to remove the above undefined references. So, at that time I got the following errors. /usr/bin/ld: errno@@FBSD_1.0: TLS definition in /lib/libc.so.6 section .tbss mismatches non-TLS definition in ../lib/linux/libc.so section .bss /lib/libc.so.6: could not read symbols: Bad value Here, the lib/libc.so.6 is a Redhat libc library where as ../lib/linux/libc.so is a FreeBSD library (libc.so.7). My question is: Is it possible to use the FreeBSD libthr.a library on a Redhat Linux distribution? Thanks in advance. With Regards, Srinivas G