mumble-voip / mumble

Mumble is an open-source, low-latency, high quality voice chat software.
https://www.mumble.info
Other
6.37k stars 1.12k forks source link

Compiling latest 1.4 version OPUS errors #5262

Closed krutzy62 closed 3 years ago

krutzy62 commented 3 years ago

When I compile on a Pi4, using cmake 3.21.2 I am getting errors. After downloading mumble and then going into the mumble directory I then do

git submodule init
git submodule update

Create a build directory then proceed with the cmake (cmake .. -Dspeechd=OFF -Dplugins=OFF) I get the warnings:

  CMake Warning at src/mumble/CMakeLists.txt:458 (message):
    libsndfile is missing Opus-support -> No Opus-format recording

Followed by all of this:

-- The following features have been disabled:

 * OPUS_BUILD_TESTING, build tests.
 * OPUS_CUSTOM_MODES, enable non-Opus modes, e.g. 44.1 kHz & 2^n frames.
 * OPUS_BUILD_PROGRAMS, build programs.
 * OPUS_DISABLE_INTRINSICS, disable all intrinsics optimizations.
 * OPUS_FIXED_POINT, compile as fixed-point (for machines without a fast enough FPU).
 * OPUS_FLOAT_APPROX, enable floating point approximations (Ensure your platform supports IEEE 754 before enabling).
 * OPUS_ASSERTIONS, additional software error checking.
 * OPUS_FUZZING, causes the encoder to make random decisions (do not use in production).
 * OPUS_CHECK_ASM, enable bit-exactness checks between optimized and c implementations.
 * OPUS_FIXED_POINT_DEBUG, debug fixed-point implementation.
 * OPUS_USE_ALLOCA, use alloca for stack arrays (on non-C99 compilers).
 * OPUS_NONTHREADSAFE_PSEUDOSTACK, use a non threadsafe pseudostack when neither variable length arrays or alloca is supported.
 * OPUS_FAST_MATH, enable fast math (unsupported and discouraged use, as code is not well tested with this build option).

-- OPUS_MAY_HAVE_NEON enabling runtime detection
-- Disabling warnings for targets: opus
INSTALL TARGETS - target opus has PUBLIC_HEADER files but no PUBLIC_HEADER DESTINATION.
-- Disabling warnings for targets: celt
-- Disabling warnings for targets: speex
-- Disabling warnings for targets: rnnoise
-- Qt5 component found: DBus | Version: 5.11.3
-- Qt5 component found: LinguistTools | Version: 5.11.3
-- Configuring done
-- Generating done
-- Build files have been written to: /home/pi/mumble/build

Of course the make step fails with a bunch of these:

In file included from /home/pi/mumble/3rdparty/opus/celt/arm/celt_neon_intr.c:37:
/home/pi/mumble/3rdparty/opus/celt/arm/celt_neon_intr.c: In function ‘xcorr_kernel_neon_float’:
/usr/lib/gcc/arm-linux-gnueabihf/8/include/arm_neon.h:6740:1: error: inlining failed in call to always_inline ‘vdupq_n_f32’: target specific option mismatch
 vdupq_n_f32 (float32_t __a)
 ^~~~~~~~~~~
/home/pi/mumble/3rdparty/opus/celt/arm/celt_neon_intr.c:118:11: note: called from here
    SUMM = vdupq_n_f32(0);
           ^~~~~~~~~~~~~~

Obviously something is missing. Any help?

Kevin

davidebeatrici commented 3 years ago

Yep!

The package for Buster is indeed built without support for Opus: https://packages.debian.org/buster/libsndfile1 As a result, you will not be able to record in that format (as indicated by CMake).

However, you can still link Mumble to the Opus library provided by Debian:

  1. Install libopus-dev.
  2. Pass -Dbundled-opus=OFF to CMake.
krutzy62 commented 3 years ago

Very good. Ok I will let you know. How it goes!

krutzy62 commented 3 years ago

Nope. I already had libopus-dev installed.

I got the same link errors again using:

cmake .. -Dspeechd=OFF -Dplugins=OFF -DOPUS_DISABLE_INTRINSICS=ON -Dbundled-opus=OFF

Of course I received the warning: CMake Warning: Manually-specified variables were not used by the project: OPUS_DISABLE_INTRINSICS

Which makes sense. So the link errors are now tied to flac.c, ogg.c, ogg_vorbis.c, and still ogg_opus.c.

I don't know what is going on.

davidebeatrici commented 3 years ago

Have you also tried to prune the build directory?

krutzy62 commented 3 years ago

Prune the build directory? Sorry beyond my scope to go into the build directory and cutting things. I wouldn't know what I am doing. Sigh...

davidebeatrici commented 3 years ago

CMake will take care of regenerating all files. Just make sure you didn't put any important files there yourself.

Krzmbrzl commented 3 years ago

prune in this context means that you are to selten your entire build directory, create a fresh one and use that.

krutzy62 commented 3 years ago

Robert,

Thanks for the clarification.

For the record every I someone suggests something I always delete and recreate the build directory just to make sure it is clean. Sometimes I will even clean the source and redo starting with the download. That way I can git rid of any remanences.

If you can think of anything else let me know or if there is anything I can provide. They only thing I can think of is that there is a current working version of Mumble installed of 1.3 and there is an earlier version of mumble 1.4 compiled but not the install step. I use the binary in the build directory. I see no reason that either would impede the build and link of this version, I am just providing anything I can think of. The running mumble server is 1.3, I am just wanting the mumble client.

Krzmbrzl commented 3 years ago

@krutzy62 when was the last time you successfully built Mumble 1.4.0? We'll have to perform a bisect to find the root cause.

@davidebeatrici will restore the Opus submodule in order to make that possible

krutzy62 commented 3 years ago

I want to say June / July was the last time I installed the 1.4 successfully.

Krzmbrzl commented 3 years ago

Then I suppose the commit to try out next would be adf38593153a5ade60e89b4f92195006383ab201

This is from end of March

krutzy62 commented 3 years ago

Well as said I have the older version source already so I will just use it for now. I was just trying to help debug the build for others who are trying to build on raspberry pi4.

krutzy62 commented 3 years ago

I think I know what the problem is. Now I need to figured out how to undo it. I think very early on I mentioned that I tried to upgrade to libsndfile-1.0.31 by making it myself. So it is picking some stuff up from /usr/local/lib/ vs. /usr/lib which is screwing everything up now.

That is on me. No I have to figure out how to undo what I did. Ugg.

krutzy62 commented 3 years ago

That was it - don't shoot me.. I just deleted libopus* and libsndfile.a from /usr/local/lib and all is good.

However you still need to do the cmake as follows: cmake .. -Dspeechd=OFF -Dplugins=OFF -DOPUS_DISABLE_INTRINSICS=ON

Made. Thanks to everyone for their help. I am glad I figured out where the issue was. It was actually making a totally different sound card program and got the errors and seeing where it was picking up the error libraries from.

Krzmbrzl commented 3 years ago

Ah okay. Glad it is working after all!

don't shoot me

:gun:

However you still need to do the cmake as follows: cmake .. -Dspeechd=OFF -Dplugins=OFF -DOPUS_DISABLE_INTRINSICS=ON

I assume that only the OPUS_DISABLE_INTRINSICS option is strictly required to get it to build?

I will add a note for this to our build documentation