Bug 176794 - audio/pulseaudio Fix build on ARM
Summary: audio/pulseaudio Fix build on ARM
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-gnome (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-09 22:00 UTC by olivier
Modified: 2013-03-09 23:10 UTC (History)
0 users

See Also:


Attachments
file.diff (509 bytes, patch)
2013-03-09 22:00 UTC, olivier
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description olivier 2013-03-09 22:00:00 UTC
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
.

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:
How-To-Repeat: Compile audio/pulseaudio on a ARM architecture
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-03-09 22:00:09 UTC
Responsible Changed
From-To: freebsd-ports-bugs->gnome

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Koop Mast freebsd_committer freebsd_triage 2013-03-09 23:04:17 UTC
State Changed
From-To: open->closed

Committed thanks!
Comment 3 dfilter service freebsd_committer freebsd_triage 2013-03-09 23:06:26 UTC
Author: kwm
Date: Sat Mar  9 23:06:17 2013
New Revision: 313775
URL: http://svnweb.freebsd.org/changeset/ports/313775

Log:
  Make pulseaudio compile on the arm platform.
  
  PR:		ports/176794
  Submitted by:	Olivier Cochard-Labbe <olivier@cochard.me>

Added:
  head/audio/pulseaudio/files/patch-src_pulsecore_cpu-arm.c   (contents, props changed)

Added: head/audio/pulseaudio/files/patch-src_pulsecore_cpu-arm.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/audio/pulseaudio/files/patch-src_pulsecore_cpu-arm.c	Sat Mar  9 23:06:17 2013	(r313775)
@@ -0,0 +1,14 @@
+--- src/pulsecore/cpu-arm.c.orig	2011-06-23 20:18:54.443125000 +0000
++++ src/pulsecore/cpu-arm.c	2013-03-09 23:00:50.000000000 +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. */
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"