From owner-freebsd-ports@FreeBSD.ORG Thu Jul 12 16:34:17 2007 Return-Path: X-Original-To: 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 3C81C16A400 for ; Thu, 12 Jul 2007 16:34:17 +0000 (UTC) (envelope-from grafan@gmail.com) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.177]) by mx1.freebsd.org (Postfix) with ESMTP id 8D5D813C455 for ; Thu, 12 Jul 2007 16:34:16 +0000 (UTC) (envelope-from grafan@gmail.com) Received: by py-out-1112.google.com with SMTP id a73so414808pye for ; Thu, 12 Jul 2007 09:34:15 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:mime-version:content-type:content-transfer-encoding:content-disposition; b=MeMotKgmJ3kmVUF8wvApXjltGguSge0cSLRng3/6fzHBCG+1EfgCmPY9/23jkVSbhGp92okMWbXZsVryVtHMeHKp5EzXdQ05HIE4XlIVMGRbwAolp9BTDLYI+oZEeSj3zN+rM5RPNpRVc6AAtTxHzGMV2UXzoeHLs8CG/ihwuAQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:mime-version:content-type:content-transfer-encoding:content-disposition; b=ui3LK2usTsgr/iluCLu1xHXvXN6B2pHw+4DBYxlaz7sSFlQ3gS+kVFzAkmzmYExLL4F3wYxfUzKdjUx0M2zGGqgmn/ds9sCc6DIH5v2KVUTUJHLRswQ/ZtUuW7mlwN5FsZsvNJcupIKEj/IYV/6ZwT2fkKJaq+4Zzv4fh2h44/g= Received: by 10.64.251.9 with SMTP id y9mr1285253qbh.1184258052546; Thu, 12 Jul 2007 09:34:12 -0700 (PDT) Received: by 10.64.185.10 with HTTP; Thu, 12 Jul 2007 09:34:12 -0700 (PDT) Message-ID: <6eb82e0707120934pade7a6cw70dc324a47bc09be@mail.gmail.com> Date: Fri, 13 Jul 2007 00:34:12 +0800 From: "Rong-en Fan" To: ports@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Cc: miwi@freebsd.org Subject: linking against pthread for a shared library 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, 12 Jul 2007 16:34:17 -0000 miwi@ and I are working on solving an issue with devel/upnp and misc/ushare problem. Essentially, the problem is that devel/upnp builds a shared library called libthreadutil.so which uses threading library. misc/ushare is a consumer of that library. On 7.x system, if you ldd on libthreadutil.so (this is i386) ./work/libupnp-1.6.0/threadutil/.libs/libthreadutil.so: liblwres.so.30 => /usr/lib/liblwres.so.30 (0x2817d000) libc.so.7 => /lib/libc.so.7 (0x2807e000) libthr.so.3 => /lib/libthr.so.3 (0x2818d000) But on 6.x and 5.x, you only get (this is amd64) ./work/libupnp-1.6.0/threadutil/.libs/libthreadutil.so: liblwres.so.10 => /usr/lib/liblwres.so.10 (0x800941000) So, one needs to pass -pthread when using libthreadutil.so. In my understanding, the behavior on 7.x is more correct (or reasonable). Any ideas how to solve this problem? Regards, Rong-En Fan