From owner-freebsd-ports-bugs@FreeBSD.ORG Sat Mar 9 22:00:01 2013 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 4043853A for ; Sat, 9 Mar 2013 22:00:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 27CA8C15 for ; Sat, 9 Mar 2013 22:00:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r29M00TT049744 for ; Sat, 9 Mar 2013 22:00:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r29M00CZ049743; Sat, 9 Mar 2013 22:00:00 GMT (envelope-from gnats) Resent-Date: Sat, 9 Mar 2013 22:00:00 GMT Resent-Message-Id: <201303092200.r29M00CZ049743@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, Olivier Cochard-Labbe Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id D7992528 for ; Sat, 9 Mar 2013 21:58:36 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id B39CCC02 for ; Sat, 9 Mar 2013 21:58:36 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.5/8.14.5) with ESMTP id r29LwZLV063631 for ; Sat, 9 Mar 2013 21:58:35 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.5/8.14.5/Submit) id r29LwZEZ063630; Sat, 9 Mar 2013 21:58:35 GMT (envelope-from nobody) Message-Id: <201303092158.r29LwZEZ063630@red.freebsd.org> Date: Sat, 9 Mar 2013 21:58:35 GMT From: Olivier Cochard-Labbe To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: ports/176794: audio/pulseaudio Fix build on ARM X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Mar 2013 22:00:01 -0000 >Number: 176794 >Category: ports >Synopsis: audio/pulseaudio Fix build on ARM >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: Sat Mar 09 22:00:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Olivier Cochard-Labbe >Release: -current >Organization: >Environment: FreeBSD rspi2.bsdrp.net 10.0-CURRENT FreeBSD 10.0-CURRENT #0 r247613M: Sat Mar 2 16:03:10 JST 2013 aoyama@fbs.local:/usr/obj-rpi-clang/arm.armv6/usr/src/sys/RPI-B-test18 arm >Description: There is a bug in cpu-arm.c file: A variable is declared in a "#if defined (__arm__) && (__linux__)", but it's used after in a "#if defined (__arm__)", then compilation fails on FreeBSD with: .. /tmp/sample-util-nlIlVf.s:1058: rdhi, rdlo and rm must all be different /tmp/sample-util-nlIlVf.s:1129: rdhi, rdlo and rm must all be different /tmp/sample-util-nlIlVf.s:3232: rdhi, rdlo and rm must all be different /tmp/sample-util-nlIlVf.s:3623: rdhi, rdlo and rm must all be different CC libpulsecore_0.9.23_la-cpu-arm.lo clang: warning: unknown warning option '-Wunsafe-loop-optimizations'; did you mean '-Wout-of-line-declar ation'? [-Wunknown-warning-option] clang: warning: unknown warning option '-Wlogical-op'; did you mean '-Wlong-long'? [-Wunknown-warning-op tion] warning: unknown warning option '-Wunsafe-loop-optimizations'; did you mean '-Wout-of-line-declaration'? [-Wunknown-warning-option] warning: unknown warning option '-Wlogical-op'; did you mean '-Wlong-long'? [-Wunknown-warning-option] pulsecore/cpu-arm.c:138:9: error: use of undeclared identifier 'flags' if (flags & PA_CPU_ARM_V6) ^ pulsecore/cpu-arm.c:139:34: error: use of undeclared identifier 'flags' pa_volume_func_init_arm (flags); ^ 2 warnings and 2 errors generated. gmake[4]: *** [libpulsecore_0.9.23_la-cpu-arm.lo] Error 1 . >How-To-Repeat: Compile audio/pulseaudio on a ARM architecture >Fix: Apply the patch: This patch moves the variable declaration in the "#if (__arm__)" in place of the "#if (__arm__) && (__linux__)". Patch attached with submission follows: --- src/pulsecore/cpu-arm.c.orig 2013-03-09 20:08:28.661653434 +0000 +++ src/pulsecore/cpu-arm.c 2013-03-09 20:18:36.495510615 +0000 @@ -82,10 +82,10 @@ void pa_cpu_init_arm (void) { #if defined (__arm__) + pa_cpu_arm_flag_t flags = 0; #if defined (__linux__) char *cpuinfo, *line; int arch; - pa_cpu_arm_flag_t flags = 0; /* We need to read the CPU flags from /proc/cpuinfo because there is no user * space support to get the CPU features. This only works on linux AFAIK. */ >Release-Note: >Audit-Trail: >Unformatted: