From owner-freebsd-stable Wed Aug 21 17:42: 4 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 AE2BD37B400 for ; Wed, 21 Aug 2002 17:41:58 -0700 (PDT) Received: from creme-brulee.marcuscom.com (rdu57-17-158.nc.rr.com [66.57.17.158]) by mx1.FreeBSD.org (Postfix) with ESMTP id F080143E65 for ; Wed, 21 Aug 2002 17:41:57 -0700 (PDT) (envelope-from marcus@marcuscom.com) Received: from shumai.marcuscom.com (shumai.marcuscom.com [192.168.1.4]) by creme-brulee.marcuscom.com (8.12.5/8.12.5) with ESMTP id g7M0fkix042220; Wed, 21 Aug 2002 20:41:46 -0400 (EDT) (envelope-from marcus@marcuscom.com) Subject: Re: libc_r (-pthread) linking problem From: Joe Marcus Clarke To: Archie Cobbs Cc: freebsd-stable@FreeBSD.ORG In-Reply-To: <200208212300.g7LN02S07898@arch20m.dellroad.org> References: <200208212300.g7LN02S07898@arch20m.dellroad.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-ino8pEuIoG1pLKOuoG6Y" X-Mailer: Ximian Evolution 1.0.8 Date: 21 Aug 2002 20:41:59 -0400 Message-Id: <1029976919.66786.7.camel@shumai.marcuscom.com> Mime-Version: 1.0 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 --=-ino8pEuIoG1pLKOuoG6Y Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Wed, 2002-08-21 at 19:00, Archie Cobbs wrote: > Hi, >=20 > I'm trying to link an application with a library (libpdel) that itself > links against libc_r. However, the application fails to link: >=20 > cc -O -pipe -D_THREAD_SAFE ... -pthread -o ... -L/usr/local/lib -lpde= l -lexpat -lssl -lcrypto -lcrypt > lws_tmpl_misc.o: In function `lws_tf_crypt_hash': > lws_tmpl_misc.o(.text+0x3c3): undefined reference to `__pthread_read' > main.o: In function `main': > main.o(.text+0x21c): undefined reference to `__pthread_sigwait' > /usr/local/lib/libpdel.so: undefined reference to `pthread_yield_np' > /usr/local/lib/libpdel.so: undefined reference to `__pthread_connect' > /usr/local/lib/libpdel.so: undefined reference to `__pthread_accept' > /usr/local/lib/libpdel.so: undefined reference to `__pthread_detach' > /usr/local/lib/libpdel.so: undefined reference to `__pthread_poll' > /usr/local/lib/libpdel.so: undefined reference to `__pthread_write' > *** Error code 1 >=20 > This is on FreeBSD 4.6-stable as of today. This works fine on FreeBSD 4.5= . >=20 > FYI, none of my code ever calls pthread_yield_np(), so I don't know > where that symbol is coming from. >=20 > Any ideas what the problem is? I think you need to recompile libpdel for -stable. This should fix your problem. Those symbols don't even exist in -stable. I built libpdel on -stable with a bunch of other issues (i.e. -Werror caused a failure due to a warning in stdio.h, and ${INCOWN}, ${INCGRP}, and ${INCMODE} don't exist [they are now INCS*]). But, after getting it compiled and installed: /tmp 20:38 shumai marcus %582# cc -o xxx -L/usr/local/lib -lpdel -pthread -lssl -lcrypto -lexpat xxx.c /tmp 20:38 shumai marcus %583# Joe >=20 > Thanks, > -Archie >=20 > _________________________________________________________________________= _ > Archie Cobbs * Packet Design * http://www.packetdesign.co= m >=20 > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-stable" in the body of the message >=20 --=-ino8pEuIoG1pLKOuoG6Y Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (FreeBSD) iD8DBQA9ZDNWb2iPiv4Uz4cRAgx9AJwLkPufB3n8yOKvZmb0d/GFQ1JbDgCdEylm bSQZs4xpsTUEaylMBA+Leu0= =0IZZ -----END PGP SIGNATURE----- --=-ino8pEuIoG1pLKOuoG6Y-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message