Download raw body.
Fix audio/csound on powerpc
On Tue, 7 Apr 2026 11:07:53 +0200
Raphael Graf <r@undefined.ch> wrote:
> According to the latest bulk build report, building csound fails on powerpc:
>
> In file included from /usr/obj/ports/csound-7.0.0beta13/csound-7.0.0-beta.13/OOps/pffft.c:107:
> /usr/lib/clang/19/include/altivec.h:13:2: error: "AltiVec support not enabled"
> 13 | #error "AltiVec support not enabled"
> | ^
> /usr/lib/clang/19/include/altivec.h:50:19: error: unknown type name 'vector'
> 50 | static __inline__ vector signed char __ATTRS_o_ai vec_perm(
>
>
> The diff below should "fix" this by disabling altivec on powerpc.
> (I have not tested it on powerpc)
>
> ok?
Your diff unbreaks csound on my PowerBook G4 from 2004.
ok gkoehler@
By default, #include <altivec.h> works on powerpc64 and gives this
#error on powerpc. One can use "cc -maltivec" to enable altivec on
powerpc, but the result would crash on a Mac G3. It is better to
disable altivec.
Some packages (like xenocara/lib/pixman) can check for altivec at
runtime, compile one file with -maltivec, and call that file only if
the check is true. I see no such check in csound.
--gkoehler
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/audio/csound/Makefile,v
> retrieving revision 1.4
> diff -u -p -u -p -r1.4 Makefile
> --- Makefile 2 Apr 2026 05:31:44 -0000 1.4
> +++ Makefile 7 Apr 2026 09:04:52 -0000
> @@ -44,6 +44,10 @@ LIB_DEPENDS = audio/liblo \
> devel/gettext,-runtime \
> net/curl
>
> +.if ${MACHINE_ARCH} == "powerpc"
> +CFLAGS += -DPFFFT_SIMD_DISABLE
> +.endif
> +
> TEST_ENV = OPCODE7DIR64=${WRKBUILD}
> PORTHOME = ${WRKDIR}
>
>
Fix audio/csound on powerpc