From owner-freebsd-stable Sat Dec 21 9: 9:52 2002 Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5B55F37B401 for ; Sat, 21 Dec 2002 09:09:50 -0800 (PST) Received: from deliver.hccnet.nl (deliver.hccnet.nl [62.251.0.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id F253443EDC for ; Sat, 21 Dec 2002 09:09:48 -0800 (PST) (envelope-from ronald@not4mail.cs.vu.nl) Received: from henk.klop.yi.org by deliver.hccnet.nl via fia212-11.dsl.hccnet.nl [62.251.11.212] with ESMTP id SAA17733 (8.8.8/1.13); Sat, 21 Dec 2002 18:09:41 +0100 (MET) Received: from not4mail.cs.vu.nl (localhost [127.0.0.1]) by henk.klop.yi.org (8.12.6/8.12.6) with ESMTP id gBLH9YIj000306; Sat, 21 Dec 2002 18:09:35 +0100 (CET) (envelope-from ronald@not4mail.cs.vu.nl) Message-ID: <3E04A04E.8090205@not4mail.cs.vu.nl> Date: Sat, 21 Dec 2002 18:09:34 +0100 From: Ronald Klop User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.2b) Gecko/20021024 X-Accept-Language: nl, nl-be, en-us MIME-Version: 1.0 To: Emiel Kollof Cc: freebsd-stable@FreeBSD.ORG Subject: Re: More information (was Re: pthread woes) References: <20021220013445.GA75547@hackerheaven.org> <20021220020545.GC75547@hackerheaven.org> In-Reply-To: <20021220013445.GA75547@hackerheaven.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Emiel Kollof wrote: > * Emiel Kollof (coolvibe@hackerheaven.org) wrote: > > >Hi folks, > > > >I have a problem with compiling stuff that uses POSIX threads. I used > >the following snippet of code to test: > > > I tried another snippet of code: > > #include > #include > int main() { > return ((gtk_major_version) || (gtk_minor_version) || > (gtk_micro_version)); ; > return 0; > } > > This fails like this: > > % gcc -o gtktest gtktest.c `gtk12-config --libs` `gtk12-config --cflags` > /usr/X11R6/lib/libX11.so: undefined reference to `pthread_cond_signal' > /usr/X11R6/lib/libXThrStub.so.6: undefined reference to `_Xthr_zero_stub_' > /usr/X11R6/lib/libX11.so: undefined reference to `pthread_cond_broadcast' > /usr/X11R6/lib/libXThrStub.so.6: undefined reference to `_Xthr_self_stub_' > /usr/X11R6/lib/libX11.so: undefined reference to `pthread_cond_init' > /usr/X11R6/lib/libX11.so: undefined reference to `pthread_mutex_unlock' > /usr/X11R6/lib/libX11.so: undefined reference to `pthread_self' > /usr/X11R6/lib/libX11.so: undefined reference to `pthread_mutex_destroy' > /usr/X11R6/lib/libX11.so: undefined reference to `pthread_mutex_lock' > /usr/X11R6/lib/libX11.so: undefined reference to `pthread_cond_wait' > /usr/X11R6/lib/libX11.so: undefined reference to `pthread_cond_destroy' > /usr/X11R6/lib/libX11.so: undefined reference to `pthread_mutex_init' > > Now I suspect X11 libraries doing something weird. I am recompiling my > X11R6 libs from source to see if this solves things. > > Cheers I have exactly this error if I build my world with CPUTYPE=p2 and CFLAGS=-O3 in make.conf. For some reason the pthread libraries aren't build correctly than. Probably, the optimisations make some functions inline so they disappear in the lib or something else. I don't really know. Building world with -O2 makes everything work. Greetings, Ronald. -- Ronald Klop, Amsterdam, The Netherlands --> Remove the 'not4mail.' from the e-mail address before replying. <-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message