xiph / opus

Modern audio compression for the internet.
https://opus-codec.org/
Other
2.3k stars 612 forks source link

Error building 1.4 on armv7l: Unknown variable "have_arm_intrinsics_or_asm". #273

Open satmandu opened 1 year ago

satmandu commented 1 year ago

Using gcc 12.2.1 on armv7l/Chromebrew.

Using these configuration options:

meson setup -Dprefix=/usr/local -Dlibdir=/usr/local/lib -Dmandir=/usr/local/share/man -Dbuildtype=release -Db_lto=true -Dstrip=true -Db_pie=true -Dcpp_args='-O2 -pipe -ffat-lto-objects -fPIC -mfloat-abi=hard -mthumb -mfpu=neon -march=armv7-a+fp -fuse-ld=mold ' -Dc_args='-O2 -pipe -ffat-lto-objects -fPIC -mfloat-abi=hard -mthumb -mfpu=neon -march=armv7-a+fp -fuse-ld=mold ' \
      -Dcustom-modes=true \
      -Ddocs=disabled \
      -Dtests=disabled \
      builddir

This is what I get:

The Meson build system
Version: 1.1.0
Source dir: /usr/local/tmp/crew/opus.20230420152709.dir/opus-1.4
Build dir: /usr/local/tmp/crew/opus.20230420152709.dir/opus-1.4/builddir
Build type: native build
Project name: opus
Project version: 1.4
C compiler for the host machine: ccache cc (gcc 12.2.1 "cc (GCC) 12.2.1 20230130")
C linker for the host machine: cc ld.gold 2.40
Host machine cpu family: arm
Host machine cpu: armv8l
Compiler for C supports arguments -fvisibility=hidden: YES 
Compiler for C supports arguments -Wcast-align: YES 
Compiler for C supports arguments -Wnested-externs: YES 
Compiler for C supports arguments -Wshadow: YES 
Compiler for C supports arguments -Wstrict-prototypes: YES 
Compiler for C supports arguments -fstack-protector-strong: YES 
Library m found: YES
Checking for function "lrintf" with dependency -lm: YES 
Checking for function "lrint" with dependency -lm: YES 
Checking for function "__malloc_hook" : YES 
Check usable header "stdint.h" : YES 
Checking if "restrict keyword" compiles: YES 
Checking if "C99 variable-size arrays" compiles: YES 
Checking if "compiler supports ARMv7/AArch64 NEON intrinsics" : links: YES 
Checking if "compiler supports AArch64 NEON intrinsics" : links: NO 
Checking if "compiler supports AArch64 NEON intrinsics with -mfpu=neon" : links: NO 
Message: Compiler does not support AArch64 NEON intrinsics

silk/meson.build:28:45: ERROR: Unknown variable "have_arm_intrinsics_or_asm".

meson-log.txt

satmandu commented 1 year ago

Looks like this is fixed by https://github.com/xiph/opus/pull/267

AlessandroBono commented 1 year ago

This looks like it might be fixed in master with https://github.com/xiph/opus/commit/20c032d27c59d65b19b8ffbb2608e5282fe817eb. Could you please check?

satmandu commented 1 year ago

Building with meson from git appears to fail:

 /usr/local/tmp/crew/opus.20230612152307.dir/meson/get-version.py --package-version
fatal: No tags can describe '20c032d27c59d65b19b8ffbb2608e5282fe817eb'.
Try --always, or create some tags.
ERROR: Could not extract package version via `git describe` in /usr/local/tmp/crew/opus.20230612152307.dir
AlessandroBono commented 1 year ago

That sounds like another error. On my side the error Unknown variable "have_arm_intrinsics_or_asm" is fixed with https://github.com/xiph/opus/commit/20c032d27c59d65b19b8ffbb2608e5282fe817eb.