Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sources.redhat.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@sources.redhat.com>
List-Help: <mailto:cygwin-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@sources.redhat.com
Delivered-To: mailing list cygwin@sources.redhat.com
Message-ID: <000f01c0b8c4$a881e600$822aeda9@ucdavis.edu>
Reply-To: "Wei Ku" <weiku@mailaps.org>
From: "Wei Ku" <weiku@physics.ucdavis.edu>
To: "Robert Collins" <robert.collins@itdomain.com.au>, <cygwin@cygwin.com>
References: <002501c0b8b9$f5438f80$822aeda9@ucdavis.edu> <00e601c0b8c3$dfd0f200$0200a8c0@lifelesswks>
Subject: Re: pthread in Cygwin? (attempt to build ghostscript 6.5)
Date: Thu, 29 Mar 2001 18:53:54 -0800
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
X-OriginalArrivalTime: 30 Mar 2001 02:53:54.0656 (UTC) FILETIME=[A881E600:01C0B8C4]

> > In the last step of building ghostscript 6.5 (after some minor
> modifications
> > in a few places) I encountered the following error message:
> >
> > (while gcc -fno-common -o ./bin/gs ./obj/gs.o ./obj/gp_getnv.o ...)
> >
> > ./obj/gp_psync.o(.text+0x49):gp_psync.c: undefined reference to
> > `pthread_cond_init'
> > ./obj/gp_psync.o(.text+0x7a):gp_psync.c: undefined reference to
> > `pthread_cond_destroy'
> > ./obj/gp_psync.o(.text+0xda):gp_psync.c: undefined reference to
> > `pthread_cond_wait'
> > ./obj/gp_psync.o(.text+0x148):gp_psync.c: undefined reference to
> > `pthread_cond_signal'
> > ./obj/gp_psync.o(.text+0x28e):gp_psync.c: undefined reference to
> > `pthread_attr_setdetachstate'
> >
> > I have /usr/include/pthread.h but can not find libpthread.a anywhere.

> Condition variations aren't implemented in the current 1.1.8-2 release
> of cygwin. Try the latest snapshot.
>
> I've implemented pthread_attr_setdetachstate, but I think it's bundled
> in with a patch that affects newlib so it's not available yet. See
> http://sources.redhat.com/ml/cygwin/2001-03/msg01202.html for a clean
> workaround.

Thanks for the useful information.

> Note: if your "minor" modificationsincluded defining macros or
> prototypes to replace system functions that aren't present, I'm not
> surprised you got these link errors.

No, I carefully try to avoid that sort of modification.  The puzzle is that
these functions are in the header files but the corresponding library file
is missing.

Wei


--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

