linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Is it possible to use the FreeBSD libthr.a library file on a Redhat Linux box?
@ 2009-03-30 17:29 Srinivas G.
  2009-03-30 18:33 ` Bert Wesarg
  0 siblings, 1 reply; 2+ messages in thread
From: Srinivas G. @ 2009-03-30 17:29 UTC (permalink / raw)
  To: linux-gcc, linux-apps, linux-c-programming

Dear All,

I have written an application where I have used the libpthread library
for creating the pthreads. However, 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 Redhat box, I end up with 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

I understand that the "ksem_init" is not available on the Redhat box.
Then, I have 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 though, 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 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). 

Is it possible to use the FreeBSD libthr.a library file on a Redhat
Linux 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Is it possible to use the FreeBSD libthr.a library file on a  Redhat Linux box?
  2009-03-30 17:29 Is it possible to use the FreeBSD libthr.a library file on a Redhat Linux box? Srinivas G.
@ 2009-03-30 18:33 ` Bert Wesarg
  0 siblings, 0 replies; 2+ messages in thread
From: Bert Wesarg @ 2009-03-30 18:33 UTC (permalink / raw)
  To: Srinivas G.; +Cc: linux-c-programming

On Mon, Mar 30, 2009 at 19:29, Srinivas G.
<srinivasg@esntechnologies.co.in> wrote:
> Dear All,
Hi,

> Is it possible to use the FreeBSD libthr.a library file on a Redhat
> Linux box?
>
> Please let me know the whether it is possible to use the libthr.a
> library on Redhat box or not.
No. But I'm open that someone prove me wrong.

Bert
>
> Thanks in advance.
>
> With Regards,
> Srinivas G

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-03-30 18:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-30 17:29 Is it possible to use the FreeBSD libthr.a library file on a Redhat Linux box? Srinivas G.
2009-03-30 18:33 ` Bert Wesarg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).