From owner-freebsd-ports@FreeBSD.ORG Thu Dec 21 23:56:26 2006 Return-Path: X-Original-To: freebsd-ports@freebsd.org Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C6C0D16A49E; Thu, 21 Dec 2006 23:56:26 +0000 (UTC) (envelope-from lofi@freebsd.org) Received: from mail-in-10.arcor-online.net (mail-in-10.arcor-online.net [151.189.21.50]) by mx1.freebsd.org (Postfix) with ESMTP id 4D94C13C447; Thu, 21 Dec 2006 23:56:26 +0000 (UTC) (envelope-from lofi@freebsd.org) Received: from mail-in-08-z2.arcor-online.net (mail-in-08-z2.arcor-online.net [151.189.8.20]) by mail-in-10.arcor-online.net (Postfix) with ESMTP id 2A3562CFC41; Thu, 21 Dec 2006 21:03:20 +0100 (CET) Received: from mail-in-03.arcor-online.net (mail-in-03.arcor-online.net [151.189.21.43]) by mail-in-08-z2.arcor-online.net (Postfix) with ESMTP id 1E8EF2130B4; Thu, 21 Dec 2006 21:03:20 +0100 (CET) Received: from lofi.dyndns.org (dslb-084-061-139-077.pools.arcor-ip.net [84.61.139.77]) by mail-in-03.arcor-online.net (Postfix) with ESMTP id D4B31275A39; Thu, 21 Dec 2006 21:03:19 +0100 (CET) Received: from kiste.my.domain (kiste.my.domain [192.168.8.2]) by lofi.dyndns.org (8.13.6/8.13.3) with ESMTP id kBLK3DZU034804 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 21 Dec 2006 21:03:13 +0100 (CET) (envelope-from lofi@freebsd.org) Received: from kiste.my.domain (localhost [127.0.0.1]) by kiste.my.domain (8.13.6/8.13.4) with ESMTP id kBLK3DUF029644; Thu, 21 Dec 2006 21:03:13 +0100 (CET) (envelope-from lofi@freebsd.org) Received: from localhost (localhost [[UNIX: localhost]]) by kiste.my.domain (8.13.6/8.13.4/Submit) id kBLK3C0X029643; Thu, 21 Dec 2006 21:03:12 +0100 (CET) (envelope-from lofi@freebsd.org) X-Authentication-Warning: kiste.my.domain: lofi set sender to lofi@freebsd.org using -f From: Michael Nottebrock To: freebsd-ports@freebsd.org Date: Thu, 21 Dec 2006 21:03:09 +0100 User-Agent: KMail/1.9.5 References: <20061221155622.618f55b0@phobos.mars.bsd> In-Reply-To: <20061221155622.618f55b0@phobos.mars.bsd> X-Face: g:jG2\O{-yqD1x?DG2lU1)(v%xffR"p8Nz(w/*)YEUO\Hn%mGi&-!+rq$&r64,=?utf-8?q?fuP=7E=3Bbw=5C=0A=09=5EQdX?=@v~HEAi?NaE8SU]}.oeYSjN84Fe{M(ahZ.(i+lxyP; pr)2[%mGbkY'RmM>=?utf-8?q?+mg3Y=24ip=0A=091?=@Z>[EUaE7tjJ=1DRs~:!uSd""d~:/Er3rpQA%ze|bp>S MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2131207.d2ZIs9X6sQ"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200612212103.12737.lofi@freebsd.org> X-Virus-Scanned: by amavisd-new Cc: Alejandro Pulver Subject: Re: Problem with -pthread linking X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Dec 2006 23:56:26 -0000 --nextPart2131207.d2ZIs9X6sQ Content-Type: text/plain; charset="iso-8859-6" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Thursday, 21. December 2006 19:56, Alejandro Pulver wrote: > Hello. > > I was updating the games/r1q2 port which consists of a client > executable (r1q2) that loads the render (ref_gl.so) at run-time with > dlopen(), when I noticed it wasn't able to load it. > > The reason is that the render needs SDL, which needs pthread but > neither the render or SDL have a reference to pthread (even though the > render is linked with `sdl-config --libs` which includes '-pthread'). > > If I link the render with '-lpthread' it adds the reference (is > reported by 'ldd') and works. > > Is there a cleaner way to do this? Using -pthread effectively means that references to threading functions alw= ays=20 need to be resolved through executables instead of shared libraries, i.e.=20 you'll probably need to link rlq2 itself with -pthread. Cheers, =2D-=20 ,_, | Michael Nottebrock | lofi@freebsd.org (/^ ^\) | FreeBSD - The Power to Serve | http://www.freebsd.org \u/ | K Desktop Environment on FreeBSD | http://freebsd.kde.org --nextPart2131207.d2ZIs9X6sQ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQBFiuiAXhc68WspdLARAgM0AJwLZwIwHKr38jQCRmHdnl5LzFFXzgCgi1Xs U9uMsSDKw2JRWsf0L4b75T4= =DvuR -----END PGP SIGNATURE----- --nextPart2131207.d2ZIs9X6sQ--