From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Apr 2 00:30:01 2009 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4AD4E1065672 for ; Thu, 2 Apr 2009 00:30:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 20E418FC0C for ; Thu, 2 Apr 2009 00:30:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n320U1fN008864 for ; Thu, 2 Apr 2009 00:30:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n320U0Do008861; Thu, 2 Apr 2009 00:30:00 GMT (envelope-from gnats) Resent-Date: Thu, 2 Apr 2009 00:30:00 GMT Resent-Message-Id: <200904020030.n320U0Do008861@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Dmitry Marakasov Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 855B6106566C for ; Thu, 2 Apr 2009 00:26:45 +0000 (UTC) (envelope-from amdmi3@amdmi3.ru) Received: from smtp.timeweb.ru (smtp.timeweb.ru [217.170.79.85]) by mx1.freebsd.org (Postfix) with ESMTP id 104D88FC18 for ; Thu, 2 Apr 2009 00:26:44 +0000 (UTC) (envelope-from amdmi3@amdmi3.ru) Received: from [213.148.20.85] (helo=hive.panopticon) by smtp.timeweb.ru with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1LpAlX-0003dP-S7; Thu, 02 Apr 2009 04:26:43 +0400 Received: from hades.panopticon (hades.panopticon [192.168.0.32]) by hive.panopticon (Postfix) with ESMTP id 0BF6C129D2; Thu, 2 Apr 2009 04:26:47 +0400 (MSD) Received: by hades.panopticon (Postfix, from userid 1000) id 986E010883C; Thu, 2 Apr 2009 04:26:37 +0400 (MSD) Message-Id: <20090402002637.986E010883C@hades.panopticon> Date: Thu, 2 Apr 2009 04:26:37 +0400 (MSD) From: Dmitry Marakasov To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: nork@FreeBSD.org Subject: ports/133291: [PATCH] graphics/ilmbase: produces library not linked with threads X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Apr 2009 00:30:01 -0000 >Number: 133291 >Category: ports >Synopsis: [PATCH] graphics/ilmbase: produces library not linked with threads >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Apr 02 00:30:00 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Dmitry Marakasov >Release: FreeBSD 8.0-CURRENT i386 >Organization: >Environment: System: FreeBSD hades.panopticon 8.0-CURRENT FreeBSD 8.0-CURRENT #0: Sat Mar 21 18:50:30 MSK 2009 >Description: At least libIlmThread built by graphics/ilmbase port uses threads, but is not linked with threading library itself. The cause is likely libtool magic because of which the library is built in a strange way: c++ -shared -nostdlib /usr/lib/crti.o /usr/lib/crtbeginS.o .libs/IlmThreadPool.o .libs/IlmThread.o .libs/IlmThreadSemaphore.o .libs/IlmThreadMutex.o .libs/IlmThreadPosix.o .libs/IlmThreadSemaphorePosix.o .libs/IlmThreadSemaphorePosixCompat.o .libs/IlmThreadMutexPosix.o -Wl,--rpath -Wl,/usr/home/amdmi3/projects/freebsd/ports/graphics/ilmbase/prefix/lib -L/usr/home/amdmi3/projects/freebsd/ports/graphics/ilmbase/prefix/lib -lIex -pthread -L/usr/lib -lstdc++ -lm -lc -lgcc_s /usr/lib/crtendS.o /usr/lib/crtn.o -march=prescott -pthread -pthread -pthread -Wl,-soname -Wl,libIlmThread.so.6 -o .libs/libIlmThread.so.6 I assume -nostdlib is what causes -pthread not link with -lthr. % ldd /usr/local/lib/libIlmThread.so /usr/local/lib/libIlmThread.so: libIex.so.6 => /usr/local/lib/libIex.so.6 (0x2819c000) libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x28300000) libm.so.5 => /lib/libm.so.5 (0x281ad000) libc.so.7 => /lib/libc.so.7 (0x2808b000) libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x281c6000) The results of all this is an inability to directly link to IlmThread: % gcc 1.cc -lIlmThread -L/usr/local/lib /usr/local/lib/libIlmThread.so: undefined reference to `pthread_create' and thus the need to explicitely add -pthread to linker flags in all ports that use ilmbase (at least graphics/nvidia-texture-tools and graphics/devil which depend on it), so I believe this should be fixed in ilmbase. No idea on how to make libtool not use that -nostdlib strangeness though. Port maintainer (nork@FreeBSD.org) is cc'd. Generated with FreeBSD Port Tools 0.77 >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted: