From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 31 09:39:04 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 51AF410656E3 for ; Tue, 31 Mar 2009 09:39:04 +0000 (UTC) (envelope-from wsw1wsw2@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.225]) by mx1.freebsd.org (Postfix) with ESMTP id 240798FC22 for ; Tue, 31 Mar 2009 09:39:03 +0000 (UTC) (envelope-from wsw1wsw2@gmail.com) Received: by rv-out-0506.google.com with SMTP id l9so3217371rvb.43 for ; Tue, 31 Mar 2009 02:39:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=+jC8bKy2KrFUEUjn4N1Dm1qp0Ec4/CnTCXRDBj7Dy9A=; b=KOAc9E6izxb5u++fRiy7FBE39wJfrBEpZ+z5UpMDqKvClEPdocdVa/H7PVjYDLJgVT a+sW0JAS35zash0xPfpN8sORfNkG7UPhlRYNkYf6KIIEbXjWZ9g27t0vJLDC51Wn8YiN 8MoT6yw9mRgeIPVs7j/NsCTr4MAx+hJU2sRIU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=m8G08X6sxCSSJFlBmUSazPgphACLhWPv0lU+12rntDKNv5R+rT7IcmtMYCvEr2NHiG XolHzU+bHxDphvBLu8jrgsMZv8GDCc8Tpp1bJ9NJYAfgfgkIO+2RXm3gNEeq6Db5fQ1F yUuUcxaLIrEgjPmuwUe0DzrSgeLxxSLAfz79c= MIME-Version: 1.0 Received: by 10.143.9.11 with SMTP id m11mr2552582wfi.44.1238492342808; Tue, 31 Mar 2009 02:39:02 -0700 (PDT) In-Reply-To: References: Date: Tue, 31 Mar 2009 17:39:02 +0800 Message-ID: <2e566b9e0903310239x15b53d1av2f45453cb35a8898@mail.gmail.com> From: "Shaowei Wang (wsw)" To: Srinivas Ganji Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org Subject: Re: 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:39:05 -0000 On Tue, Mar 31, 2009 at 4:40 PM, Srinivas Ganji wrote: > 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? > As I known, it's not possible unless you port the libthr to Linux system. Linux use clone() system call to implement thread library and FreeBSD use a different way(KSE). > > > > Thanks in advance. > > > > With Regards, > > Srinivas G > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" >