From owner-freebsd-ports-bugs@FreeBSD.ORG Fri Apr 9 17:00:13 2010 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 4BF221065689 for ; Fri, 9 Apr 2010 17:00:13 +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 28D8B8FC1F for ; Fri, 9 Apr 2010 17:00:11 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o39H0AVC047341 for ; Fri, 9 Apr 2010 17:00:10 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o39H0AqL047339; Fri, 9 Apr 2010 17:00:10 GMT (envelope-from gnats) Resent-Date: Fri, 9 Apr 2010 17:00:10 GMT Resent-Message-Id: <201004091700.o39H0AqL047339@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, bob frazier Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D0163106567C for ; Fri, 9 Apr 2010 16:50:13 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id BF38F8FC14 for ; Fri, 9 Apr 2010 16:50:13 +0000 (UTC) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o39GoDk2070270 for ; Fri, 9 Apr 2010 16:50:13 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id o39GoDoj070269; Fri, 9 Apr 2010 16:50:13 GMT (envelope-from nobody) Message-Id: <201004091650.o39GoDoj070269@www.freebsd.org> Date: Fri, 9 Apr 2010 16:50:13 GMT From: bob frazier To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/145586: multimedia/ffmpeg has poor performance on amd64 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: Fri, 09 Apr 2010 17:00:14 -0000 >Number: 145586 >Category: ports >Synopsis: multimedia/ffmpeg has poor performance on amd64 >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Apr 09 17:00:10 UTC 2010 >Closed-Date: >Last-Modified: >Originator: bob frazier >Release: 8.0-STABLE >Organization: SFT Inc. >Environment: FreeBSD hack.SFT.local 8.0-STABLE FreeBSD 8.0-STABLE #0: Wed Apr 7 11:02:24 PDT 2010 root@hack.SFT.local:/usr/obj/usr/src/sys/GENERIC amd64 >Description: on amd64 platforms the ffmpeg port incorrectly uses MACHINE_CPU and a lack of the text 'sse' or 'mmx' to DISABLE sse and mmx capability. This is completely unnecessary since ffmpeg's configuration script already works without making these additional checks. Further it does not follow the standard (which would be to use ARCH) and uses the BUILD platform to make the determination for the TARGET platform's code. The correct solution would be to either eliminate these checks or patch the Makefile using the patch submitted with this report. Alternately use ARCH to (correctly) determine whether or not these capabilities should be enabled. >How-To-Repeat: On an amd64 platform, clean multimedia/ffmpeg and run 'make configure' and note the text output showing mmx and sse disabled. Then apply the patch (or remove the appropriate sections from Makefile), clean, and run 'make configure' again. Note the correct enabling of mmx and sse for amd64. >Fix: Patch attached with submission follows: --- Makefile.orig 2010-03-24 11:44:18.000000000 -0700 +++ Makefile 2010-04-09 09:05:55.000000000 -0700 @@ -111,16 +111,20 @@ .endif # sse hardware vector support .if (defined(MACHINE_CPU) && ${MACHINE_CPU:Msse} == "sse") WITH_BUILTIN_VECTOR= yes +.elif (defined(MACHINE_CPU) && ${MACHINE_CPU:Mamd64} == "amd64") +WITH_BUILTIN_VECTOR= yes .else CONFIGURE_ARGS+= --disable-sse .endif # mmx support -.if ${MACHINE_CPU:Mmmx} == "" +.if (defined(MACHINE_CPU) && ${MACHINE_CPU:Mamd64} == "amd64") +#WITH_BUILTIN_VECTOR= yes +.elif ${MACHINE_CPU:Mmmx} == "" CONFIGURE_ARGS+= --disable-mmx WITHOUT_BUILTIN_VECTOR= yes .endif # builtin vector, requires mmx >Release-Note: >Audit-Trail: >Unformatted: