Date: Mon, 13 Jan 2003 23:00:44 +0100 From: Ulrich Spoerlein <q@uni.de> To: ports@FreeBSD.org Subject: pthread vs. libc_r under current with SDL Message-ID: <20030113230044.6db005b0.q@uni.de>
next in thread | raw e-mail | index | archive | help
--=.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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030113230044.6db005b0.q>