From owner-freebsd-questions Mon Aug 26 20:26: 9 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C308C37B400; Mon, 26 Aug 2002 20:26:02 -0700 (PDT) Received: from mx01-a.netapp.com (mx01-a.netapp.com [198.95.226.53]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3B6D143E6A; Mon, 26 Aug 2002 20:26:02 -0700 (PDT) (envelope-from kmacy@netapp.com) Received: from frejya.corp.netapp.com (frejya [10.10.20.91]) by mx01-a.netapp.com (8.12.3/8.12.3/NTAP-1.4) with ESMTP id g7R3Q1l7015032; Mon, 26 Aug 2002 20:26:01 -0700 (PDT) Received: from elwood-fe.eng (elwood-fe.eng.netapp.com [10.56.10.100]) by frejya.corp.netapp.com (8.12.5/8.12.2/NTAP-1.4) with ESMTP id g7R3Q0rc017225; Mon, 26 Aug 2002 20:26:01 -0700 (PDT) Received: from localhost (kmacy@localhost) by elwood-fe.eng (8.11.6+Sun/8.11.6) with ESMTP id g7R3Pq000971; Mon, 26 Aug 2002 20:26:00 -0700 (PDT) Date: Mon, 26 Aug 2002 20:25:52 -0700 (PDT) From: Kip Macy To: GERARDO ENRIQUE PAREDES MANCIA Cc: freebsd-hackers@FreeBSD.ORG, freebsd-questions@FreeBSD.ORG Subject: Re: problems with pthreads In-Reply-To: <6647ea481bf9ec68.1bf9ec686647ea48@unitec.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG You need to remove the -ansi flag to the compilation to remove the warnings, and add a -pthread to the link stage so that libc_r will be used instead of libc. As an aside: this only belongs on -questions. However, considering I got _zero_ response after posting to one then the other when one of my boxes failed to boot after cvsupping -STABLE and doing a make world I can understand the crossposting. I think responding to trolls is more fun for many people. -Kip On Sun, 25 Aug 2002, GERARDO ENRIQUE PAREDES MANCIA wrote: > when trying to portupgrade XFree86-clients from 4.2.??? to the newest version i > get this: > > > LD_LIBRARY_PATH=../../exports/lib cc -O -pipe -march=pentiumpro -ansi -pedantic > -Dasm=__asm -Wall -Wpointer-arith -I../.. -I../../exports/include > -DCSRG_BASED -DFUNCPROTO=15 -DNARROWPROTO -c appres.c > In file included from appres.c:34: > /usr/include/stdlib.h:110: warning: ANSI C does not support `long long' > /usr/include/stdlib.h:114: warning: ANSI C does not support `long long' > rm -f appres > LD_LIBRARY_PATH=../../exports/lib cc -o appres -ansi -pedantic -Dasm=__asm > -Wall -Wpointer-arith -L../../exports/lib appres.o -lXt -lSM -lICE -lXext > -lX11 -L/usr/X11R6/lib -Wl,-rpath,/usr/X11R6/lib > ../../exports/lib/libXt.so: undefined reference to `pthread_cond_signal' > /usr/X11R6/lib/libXThrStub.so.6: undefined reference to `_Xthr_zero_stub_' > ../../exports/lib/libX11.so: undefined reference to `pthread_cond_broadcast' > /usr/X11R6/lib/libXThrStub.so.6: undefined reference to `_Xthr_self_stub_' > ../../exports/lib/libXt.so: undefined reference to `pthread_cond_init' > ../../exports/lib/libXt.so: undefined reference to `pthread_mutex_unlock' > ../../exports/lib/libXt.so: undefined reference to `pthread_self' > ../../exports/lib/libXt.so: undefined reference to `pthread_mutex_destroy' > ../../exports/lib/libXt.so: undefined reference to `pthread_mutex_lock' > ../../exports/lib/libXt.so: undefined reference to `pthread_cond_wait' > ../../exports/lib/libXt.so: undefined reference to `pthread_cond_destroy' > ../../exports/lib/libXt.so: undefined reference to `pthread_mutex_init' > *** Error code 1 > > > i get the same errors when trying to compile wxWindows apps with: > > g++ -o proggy proggy.cpp `wx-config --libs` `wx-config --cxxflags` > > > however i got my wxwindows apps to compile (with some warnings) adding -lc_r > after the above line. > > i just recently build the world, i track RELENG_4 on a weekly basis, is this > problem related to it? if don't, please provide me with any insight how to fix > it. > > Thanks > Gerardo > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message