Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 Mar 2013 21:58:35 GMT
From:      Olivier Cochard-Labbe <olivier@cochard.me>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/176794: audio/pulseaudio Fix build on ARM
Message-ID:  <201303092158.r29LwZEZ063630@red.freebsd.org>
Resent-Message-ID: <201303092200.r29M00CZ049743@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201303092158.r29LwZEZ063630>