Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 31 Dec 1998 14:47:44 -0500 (EST)
From:      John Deppen <jdeppen@SRTC.COM>
To:        billf@chc-chimes.com, dick@tar.com
Cc:        current@FreeBSD.ORG
Subject:   pthreads or linuxthreads
Message-ID:  <199812311947.OAA16045@uraninite.srtc.com>

next in thread | raw e-mail | index | archive | help

> > Is there any way around the following problem?
> > 
> > When the pthreads are linked I get an undefined reference to 'poll'. (Called 
> > from within a thread)
> > However, when this is removed I obviously get undefined references to
> > all of the pthread_.. functions.
> > 
> > Thanks in advance for any help,
 
> Are you linking the correct libraries as well?

>From the makefile:

FLAGS+=-DTERMCAP -DKLUDGELINEMODE -DUSE_TERMIO #-DAUTHENTICATION -DENCRYPTION
CFLAGS+=-DENV_HACK
CFLAGS+=-DSKEY
CFLAGS+=-I/usr/src/lib -Wall
#CFLAGS+=-I/usr/src/lib -pthread -Wall ( <- when using thread functions )
CC=gcc

The application compiles/links/executes OK when threads are not used.


>> Isn't Linuxthreads in the CVS tree now?
>
>Yes, if you're running in linux emulation mode, and if you compile
>kernel/world with COMPAT_LINUX_THREADS, and if your app is compiled
>on a linux machine (or, if you can figure out how to do it, cross-compiled
>for linux on a FreeBSD machine).
>
>The question addressed some patches that allow a linuxthreads "port"
>to run.  In other words, you want to compile a FreeBSD app, or a
>port of a linux app, to run in FreeBSD native (no Linux emulation)
>using the ported linux threads that also run in FreeBSD native.
>
>The linux threads "port" is realistically just a 1-1 kernel pthread
>implementation.  The idea is that some people might want a kernel
>thread library, and this is a quick and easy way to get one.

Is there any effort being made to fix the problems with pthreads? Or is there
any other way around the problems other than converting the application
to Linux?





To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199812311947.OAA16045>