From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 31 09:04:41 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7EB8106566C for ; Tue, 31 Mar 2009 09:04:41 +0000 (UTC) (envelope-from srinivasganji@gmail.com) Received: from mail-gx0-f176.google.com (mail-gx0-f176.google.com [209.85.217.176]) by mx1.freebsd.org (Postfix) with ESMTP id 939228FC17 for ; Tue, 31 Mar 2009 09:04:41 +0000 (UTC) (envelope-from srinivasganji@gmail.com) Received: by gxk24 with SMTP id 24so6909636gxk.19 for ; Tue, 31 Mar 2009 02:04:41 -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=pMDdhAp3LE0OvLqRLZFJxpJw9sp9/b55Zcx7nMe3dUI=; b=hMpLvNiZ61sJm2LnsTnqYvnhgScYH28YJPlmop9StvTx0YPQ+xfkzaPdZwKexhcxwt RA1ajazkOSZD515tC5gVZDYQegAK66liVbnnYYEoHJH86VSWAmIjs7ZImhbBByBS515X icT+TLGQJ8TPkgYZoSnwB5zTU9LrnYFKkY1rE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=hnPMWcStKeACPjU5ChoUcpmwFVGb+m4P+hFCgoSq+3U++pUzw0IzdVv4/dL8SDbLlH Pgm5n3ntU2yQeEnHWiU2cH7gLYTAjPNJqVU2aPBlDt7DUvAHzfz94Pa6EeMqaxDTWCrI 90jpjvyf9u2OJYAaHK46/A8QjtDj2Zh2s21U0= MIME-Version: 1.0 Received: by 10.150.199.16 with SMTP id w16mr12196303ybf.163.1238488800933; Tue, 31 Mar 2009 01:40:00 -0700 (PDT) Date: Tue, 31 Mar 2009 14:10:00 +0530 Message-ID: From: Srinivas Ganji To: freebsd-hackers@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-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Mar 2009 09:04:42 -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