Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 831508

Summary: media-libs/aften-0.0.8-r2 fails with undefined reference to `apply_simd_restrictions'
Product: Gentoo Linux Reporter: korte
Component: Current packagesAssignee: Gentoo Sound Team <sound>
Status: UNCONFIRMED ---    
Severity: normal Keywords: PATCH
Priority: Normal    
Version: unspecified   
Hardware: ARM64   
OS: Linux   
URL: https://trac.macports.org/ticket/62196
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build.log, emerge fails
patch for cpu_caps.h

Description korte 2022-01-19 21:36:30 UTC
When emerging aften I get the error [2]

I found:
* <https://trac.macports.org/ticket/62196>
* <https://github.com/Homebrew/linuxbrew-core/blob/master/Formula/aften.rb>

The first link states: "aften @0.0.8: error: implicit declaration of function 'apply_simd_restrictions' is invalid in C99"  
The second link has a patch [1] at the end. With that patch aften gets compiled. I have no testcase yet.  

[1]

diff --git a/libaften/cpu_caps.h b/libaften/cpu_caps.h
index b7c6159..4db11f7 100644
--- a/libaften/cpu_caps.h
+++ b/libaften/cpu_caps.h
@@ -26,6 +26,7 @@
 #include "ppc_cpu_caps.h"
 #else
 static inline void cpu_caps_detect(void){}
+static inline void apply_simd_restrictions(AftenSimdInstructions *simd_instructions){}
 #endif

 #endif /* CPU_CAPS_H */

[2]

[39/39] : && /usr/lib/ccache/bin/aarch64-unknown-linux-gnu-gcc -Wstrict-overflow -Wno-switch -Wextra -Wfloat-equal -Wdisabled-optimization -pedantic -Wall -Wpointer-arith -Wredundant-decls -Wformat -Wunused  -fvisibility=hidden -Wdeclaration-after-statement -Wbad-function-cast -std=gnu99  -O2 -pipe -march=native -Wl,-
O1 -Wl,--as-needed    -rdynamic CMakeFiles/aften_exe.dir/aften/aften.o CMakeFiles/aften_exe.dir/aften/opts.o -o aften -L/var/tmp/portage/media-libs/aften-0.0.8-r2/work/aften-0.0.8_build -Wl,-rpath,/var/tmp/portage/media-libs/aften-0.0.8-r2/work/aften-0.0.8_build:  libaften_pcm.a  libaften.so.0.0.8  -lm  -lpthread && :
FAILED: aften
: && /usr/lib/ccache/bin/aarch64-unknown-linux-gnu-gcc -Wstrict-overflow -Wno-switch -Wextra -Wfloat-equal -Wdisabled-optimization -pedantic -Wall -Wpointer-arith -Wredundant-decls -Wformat -Wunused  -fvisibility=hidden -Wdeclaration-after-statement -Wbad-function-cast -std=gnu99  -O2 -pipe -march=native -Wl,-O1 -Wl,-
-as-needed    -rdynamic CMakeFiles/aften_exe.dir/aften/aften.o CMakeFiles/aften_exe.dir/aften/opts.o -o aften -L/var/tmp/portage/media-libs/aften-0.0.8-r2/work/aften-0.0.8_build -Wl,-rpath,/var/tmp/portage/media-libs/aften-0.0.8-r2/work/aften-0.0.8_build:  libaften_pcm.a  libaften.so.0.0.8  -lm  -lpthread && :
/usr/lib/gcc/aarch64-unknown-linux-gnu/11.2.0/../../../../aarch64-unknown-linux-gnu/bin/ld: libaften.so.0.0.8: undefined reference to `apply_simd_restrictions'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
 * ERROR: media-libs/aften-0.0.8-r2::gentoo failed (compile phase):
 *   ninja -v -j2 -l0 failed


Reproducible: Always
Comment 1 korte 2022-01-19 21:37:20 UTC
Created attachment 762718 [details]
build.log, emerge fails
Comment 2 korte 2022-01-19 21:39:12 UTC
Created attachment 762719 [details, diff]
patch for cpu_caps.h

source: https://github.com/Homebrew/linuxbrew-core/blob/master/Formula/aften.rb
Comment 3 korte 2022-01-20 06:24:40 UTC
I converted a soundfile from simutrans with aften and mplayer was able to play it.