From owner-freebsd-current Thu Dec 31 11:48:39 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id LAA10816 for freebsd-current-outgoing; Thu, 31 Dec 1998 11:48:39 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from luke.srtc.com (luke.srtc.com [208.132.236.3]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id LAA10802 for ; Thu, 31 Dec 1998 11:48:35 -0800 (PST) (envelope-from jdeppen@ruby.srtc.com) Received: from SRTC (ruby [208.132.236.2]) by luke.srtc.com (8.6.12/8.6.9) with ESMTP id OAA05494; Thu, 31 Dec 1998 14:44:21 -0500 Received: from uraninite.srtc.com by SRTC (950413.SGI.8.6.12/SRTC-Client) id OAA07146; Thu, 31 Dec 1998 14:47:08 -0500 Received: from uraninite by uraninite.srtc.com (SMI-8.6/SMI-SVR4) id OAA16045; Thu, 31 Dec 1998 14:47:44 -0500 Message-Id: <199812311947.OAA16045@uraninite.srtc.com> Date: Thu, 31 Dec 1998 14:47:44 -0500 (EST) From: John Deppen Reply-To: John Deppen Subject: pthreads or linuxthreads To: billf@chc-chimes.com, dick@tar.com Cc: current@FreeBSD.ORG MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii Content-MD5: 6UxvpenT8m9KIl5GsZJOkQ== X-Mailer: dtmail 1.2.1 CDE Version 1.2.1 SunOS 5.6 sun4u sparc Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > 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