From owner-freebsd-ports Mon Jan 13 14: 1: 6 2003 Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 007A637B401 for ; Mon, 13 Jan 2003 14:01:05 -0800 (PST) Received: from wrsx88.rz.uni-wuerzburg.de (wrsx88.rz.uni-wuerzburg.de [132.187.4.88]) by mx1.FreeBSD.org (Postfix) with ESMTP id AFDAC43E4A for ; Mon, 13 Jan 2003 14:00:58 -0800 (PST) (envelope-from q@uni.de) Received: from wrzx30.rz.uni-wuerzburg.de (wrzx30.rz.uni-wuerzburg.de [132.187.1.30]) by wrsx88.rz.uni-wuerzburg.de (Postfix) with ESMTP id 0DB562D046 for ; Mon, 13 Jan 2003 23:00:54 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by virusscan.rz.uni-wuerzburg.de (Postfix) with ESMTP id F376F1ADD4 for ; Mon, 13 Jan 2003 23:00:53 +0100 (CET) Received: from wrzx30.rz.uni-wuerzburg.de ([127.0.0.1]) by localhost (wrzx30 [127.0.0.1:10024]) (amavisd-new) with SMTP id 09243-06 for ; Mon, 13 Jan 2003 23:00:53 +0100 (CET) Received: from wrzx07.rz.uni-wuerzburg.de (wrzx07.rz.uni-wuerzburg.de [132.187.1.7]) by wrzx30.rz.uni-wuerzburg.de (Postfix) with ESMTP id D6DE11A955 for ; Mon, 13 Jan 2003 23:00:53 +0100 (CET) Received: from spamchecker (localhost [127.0.0.1]) by spamcheck.rz.uni-wuerzburg.de (Postfix) with ESMTP id 1EA9A4650 for ; Mon, 13 Jan 2003 23:00:53 +0100 (CET) Received: from frodo.galgenberg.net (galgenberg.net [132.187.222.250]) by wrzx07.rz.uni-wuerzburg.de (Postfix) with SMTP id DB29A4666 for ; Mon, 13 Jan 2003 23:00:52 +0100 (CET) Received: (qmail 43304 invoked from network); 13 Jan 2003 22:00:52 -0000 Received: from gb-007.galgenberg.net (HELO roadrunner) (@132.187.222.7) by galgenberg.net with SMTP; 13 Jan 2003 22:00:52 -0000 Date: Mon, 13 Jan 2003 23:00:44 +0100 From: Ulrich Spoerlein To: ports@FreeBSD.org Subject: pthread vs. libc_r under current with SDL Message-Id: <20030113230044.6db005b0.q@uni.de> X-Mailer: Sylpheed version 0.8.8claws (GTK+ 1.2.10; i386-portbld-freebsd4.7) Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="pgp-sha1"; boundary="=.HfjXuyWj8'Y.OZ" X-Spam-Status: No, hits=-0.9 required=8.0 tests=NICE_HELO,PGP_SIGNATURE_2,SPAM_PHRASE_00_01,SUPERLONG_LINE version=2.43-string_20021002 X-Spam-Level: X-Virus-Scanned: by amavisd-new Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org --=.HfjXuyWj8'Y.OZ Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Hi there, I have some trouble building QuakeForge "correctly" under -current. The configure script gets the libraries needed for linking with SDL through 'sdl11-config --libs', which returns '-L/usr/local/lib -Wl,-rpath,/usr/local/lib -lSDL-1.1 -pthread' under -stable. Under -current 'sdl11-config --libs' returns '-L/usr/local/lib -Wl,-rpath,/usr/local/lib -lSDL-1.1 -lc_r' instead. When the build reaches the SDL-linking stage, it fails because of missing pthread_ references: /bin/sh ../../libtool --mode=link cc -O2 -pipe -mcpu=pentiumpro -march=pentiumpro -mcpu=pentiumpro -g -march=i386 -O3 -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations -fstrict-aliasing -pipe -Wall -fno-common -o qw-client-sdl -export-dynamic sdl_link.o libsdl.a libsdl.a libclient.a libcommon.a ../../libs/gamecode/builtins/libQFcsqc.la ../../libs/video/renderer/libQFrenderer_sw.la ../../libs/models/libQFmodels_sw.la ../../libs/video/targets/libQFsdl.la libnet.a libasm.a ../../libs/console/libQFconsole.la ../../libs/video/targets/libQFjs.la ../../libs/gamecode/builtins/libQFgamecode_builtins.la ../../libs/gamecode/engine/libQFgamecode.la ../../libs/audio/libQFcd.la ../../libs/audio/libQFsound.la ../../libs/util/libQFutil.la -L/usr/local/lib -Wl,-rpath,/usr/local/lib -lSDL-1.1 -lc_r -lm cc -O2 -pipe -mcpu=pentiumpro -march=pentiumpro -mcpu=pentiumpro -g -march=i386 -O3 -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations -fstrict-aliasing -pipe -Wall -fno-common -o .libs/qw-client-sdl sdl_link.o -Wl,-rpath -Wl,/usr/local/lib -Wl,--export-dynamic libsdl.a libclient.a libcommon.a ../../libs/gamecode/builtins/.libs/libQFcsqc.so ../../libs/video/renderer/.libs/libQFrenderer_sw.a ../../libs/models/.libs/libQFmodels_sw.so ../../libs/video/targets/.libs/libQFsdl.a libnet.a libasm.a ../../libs/console/.libs/libQFconsole.so ../../libs/video/targets/.libs/libQFjs.so ../../libs/gamecode/builtins/.libs/libQFgamecode_builtins.so ../../libs/gamecode/engine/.libs/libQFgamecode.so ../../libs/audio/.libs/libQFcd.so ../../libs/audio/.libs/libQFsound.so ../../libs/util/.libs/libQFutil.so -lz -L/usr/local/lib -lSDL-1.1 -lm -Wl,--rpath -Wl,/usr/local/lib /usr/local/lib/libSDL-1.1.so: undefined reference to `pthread_create' /usr/local/lib/libSDL-1.1.so: undefined reference to `pthread_attr_init' /usr/local/lib/libSDL-1.1.so: undefined reference to `pthread_exit' /usr/local/lib/libSDL-1.1.so: undefined reference to `pthread_cancel' /usr/local/lib/libSDL-1.1.so: undefined reference to `pthread_setcanceltype' /usr/local/lib/libSDL-1.1.so: undefined reference to `pthread_attr_setdetachstate' /usr/local/lib/libSDL-1.1.so: undefined reference to `pthread_join' /usr/local/lib/libSDL-1.1.so: undefined reference to `pthread_cond_timedwait' gmake[2]: *** [qw-client-sdl] Error 1 Using SDL_LIBS=`$SDL_CONFIG $sdlconf_args --libs |sed 's/-lc_r/-pthread/'` in configure fixes this, but i wonder what the _correct_ solution would be? As long as libpthread is missing in FreeBSD, one has to use -pthread to gcc, right? What about -lc_r? --=.HfjXuyWj8'Y.OZ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQE+IzcRmArGtfDbn0QRAhwZAKC5vci/Y5rbgeTn/eMdD2qrPeFtmwCdEmHc wfiEft9OXHNuaadfBOuKk1w= =Tp9U -----END PGP SIGNATURE----- --=.HfjXuyWj8'Y.OZ-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message