From owner-freebsd-ports-bugs@FreeBSD.ORG Mon Jan 26 18:40:07 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 55AAD1065677 for ; Mon, 26 Jan 2009 18:40:07 +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 2C63D8FC0C for ; Mon, 26 Jan 2009 18:40:07 +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 n0QIe6RV068025 for ; Mon, 26 Jan 2009 18:40:07 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n0QIe6c0068024; Mon, 26 Jan 2009 18:40:06 GMT (envelope-from gnats) Resent-Date: Mon, 26 Jan 2009 18:40:06 GMT Resent-Message-Id: <200901261840.n0QIe6c0068024@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 01BC91065677 for ; Mon, 26 Jan 2009 18:33:23 +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 7D51C8FC18 for ; Mon, 26 Jan 2009 18:33:22 +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 1LRWGy-0000DG-KV for FreeBSD-gnats-submit@freebsd.org; Mon, 26 Jan 2009 21:33:24 +0300 Received: from hades.panopticon (hades.panopticon [192.168.0.32]) by hive.panopticon (Postfix) with ESMTP id B236313D16 for ; Mon, 26 Jan 2009 21:33:38 +0300 (MSK) Received: by hades.panopticon (Postfix, from userid 1000) id 8FA0E108837; Mon, 26 Jan 2009 21:34:21 +0000 (UTC) Message-Id: <20090126213421.8FA0E108837@hades.panopticon> Date: Mon, 26 Jan 2009 21:34:21 +0000 (UTC) From: Dmitry Marakasov To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/131021: audio/openal builds broken library when built with nasm present X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Dmitry Marakasov List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2009 18:40:07 -0000 >Number: 131021 >Category: ports >Synopsis: audio/openal builds broken library when built with nasm present >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: Mon Jan 26 18:40:06 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 Jan 24 06:27:03 UTC 2009 amdmi3@chrysalis.panopticon:/mnt/usr/obj/mnt/usr/src/sys/HADES i386 >Description: When devel/nasm is installed on the system, openal's configure will detect in and include optimized assembly versions of some functions. However, for some reason this produces unuseable openal library. --- excerpt from openal build log --- ... checking for dlopen in -ldl... no checking for MMX support... yes checking for nasm... /usr/local/bin/nasm checking whether /usr/local/libexec/ccache/cc accepts -fvisibility=hidden... yes ... gmake[4]: Entering directory `/usr/home/amdmi3/projects/freebsd/ports/audio/openal/work/openal-0.0.8/src/arch/i386' test -d .libs || mkdir .libs echo '# Generated by ltmain.sh - GNU libtool 1.5 (1.1220 2003/04/05 19:32:58)' >x86_cpu_caps_detect_prk.lo echo "pic_object='.libs/x86_cpu_caps_detect_prk.o'" >>x86_cpu_caps_detect_prk.lo echo "non_pic_object='x86_cpu_caps_detect_prk.o'" >>x86_cpu_caps_detect_prk.lo /usr/local/bin/nasm -f elf x86_cpu_caps_detect_prk.nasm -o .libs/x86_cpu_caps_detect_prk.o -l x86_cpu_caps_detect_prk.lo.lst x86_cpu_caps_detect_prk.nasm:65: warning: label alone on a line without a colon might be in error test -d .libs || mkdir .libs echo '# Generated by ltmain.sh - GNU libtool 1.5 (1.1220 2003/04/05 19:32:58)' >memcpy_mmx_prk.lo echo "pic_object='.libs/memcpy_mmx_prk.o'" >>memcpy_mmx_prk.lo echo "non_pic_object='memcpy_mmx_prk.o'" >>memcpy_mmx_prk.lo /usr/local/bin/nasm -f elf memcpy_mmx_prk.nasm -o .libs/memcpy_mmx_prk.o -l memcpy_mmx_prk.lo.lst memcpy_mmx_prk.nasm:62: warning: label alone on a line without a colon might be in error memcpy_mmx_prk.nasm:84: warning: label alone on a line without a colon might be in error /bin/sh /usr/local/bin/libtool --mode=link /usr/local/libexec/ccache/cc -O2 -pipe -march=prescott -fno-strict-aliasing -L/usr/local/lib -o libx86_asm_routines.la x86_cpu_caps_detect_prk.lo memcpy_mmx_prk.lo -lpthread ar cru .libs/libx86_asm_routines.a .libs/x86_cpu_caps_detect_prk.o .libs/memcpy_mmx_prk.o ranlib .libs/libx86_asm_routines.a creating libx86_asm_routines.la (cd .libs && rm -f libx86_asm_routines.la && ln -s ../libx86_asm_routines.la libx86_asm_routines.la) gmake[4]: Leaving directory `/usr/home/amdmi3/projects/freebsd/ports/audio/openal/work/openal-0.0.8/src/arch/i386' ... --- Now trying to link with the library: --- % cat test.c int main() { return 0; } % cc test.c -o /dev/null -L/usr/local/lib -lopenal /usr/local/lib/libopenal.so: undefined reference to `_alMMXmemcpy' /usr/local/lib/libopenal.so: undefined reference to `_alDetectx86CPUCaps' /usr/local/lib/libopenal.so: undefined reference to `__alMMXmemcpy' /usr/local/lib/libopenal.so: undefined reference to `__alDetectx86CPUCaps' % --- The problem goes away if I deinstall nasm and recompile openal. >How-To-Repeat: - Install nasm - Rebuild openal - Try to install, say, audio/freealut >Fix: 1) Hack configure to not detect nasm at all. For some reason, the test for nasm is completely missing from pointyhat/tinderbox builds, and I couldn't determine cause of that from configure 2) Fix it so correct library is produced. No ideas here as well, link command line produced by libtool seems quite correct for me: cc -shared ... -Wl,--whole-archive ../src/arch/i386/.libs/libx86_asm_routines.a -Wl,--no-whole-archive ... >Release-Note: >Audit-Trail: >Unformatted: