libsdl-org / SDL_mixer

An audio mixer that supports various file formats for Simple Directmedia Layer.
zlib License
430 stars 147 forks source link

opus_multistream.h: No such file or directory #602

Closed rubyFeedback closed 7 months ago

rubyFeedback commented 7 months ago

This may not be the fault of SDL2_mixer. But I report it here anyway, because SDL2_mixer comes with one such named file:

/home/x/Temp/rbt/SDL2_mixer-2.8.0/VisualC/external/include/opus/opus_multistream.h

I installed opus and opusfile but I have no other .h file called opus_multistream.h, yet SDL2_mixer is the one to insist on this file. So even if it is not SDL2_mixer's fault directly, the issue is VERY confusing that SDL2_mixer compilation fails:

cmake -DCMAKE_INSTALL_PREFIX=/usr ..

-- Configuring SDL2_mixer 2.8.0
-- Using system opusfile
-- Dynamic opus (opusfile): libopusfile.so.0
-- Enabled ogg music: using stb_vorbis
-- Using system libxmp
-- Dynamic libxmp: libxmp.so.4
-- Using system FluidSynth
-- Dynamic fluidsynth: $<TARGET_SONAME_FILE_NAME:FluidSynth::libfluidsynth>
-- Using system WavPack
-- Dynamic WavPack: libwavpack.so.1
-- Configuring done (0.3s)
-- Generating done (0.0s)
-- Build files have been written to: /home/x/Temp/rbt/SDL2_mixer-2.8.0/BUILD_DIRECTORY
make
[  2%] Building C object CMakeFiles/SDL2_mixer.dir/src/codecs/music_opus.c.o
In file included from /home/x/Temp/rbt/SDL2_mixer-2.8.0/src/codecs/music_opus.c:34:
/usr/include/opus/opusfile.h:110:11: fatal error: opus_multistream.h: No such file or directory
  110 | # include <opus_multistream.h>
      |           ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/SDL2_mixer.dir/build.make:272: CMakeFiles/SDL2_mixer.dir/src/codecs/music_opus.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:87: CMakeFiles/SDL2_mixer.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
make install
[  2%] Building C object CMakeFiles/SDL2_mixer.dir/src/codecs/music_opus.c.o
In file included from /home/x/Temp/rbt/SDL2_mixer-2.8.0/src/codecs/music_opus.c:34:
/usr/include/opus/opusfile.h:110:11: fatal error: opus_multistream.h: No such file or directory
  110 | # include <opus_multistream.h>
      |           ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/SDL2_mixer.dir/build.make:272: CMakeFiles/SDL2_mixer.dir/src/codecs/music_opus.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:87: CMakeFiles/SDL2_mixer.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
madebr commented 7 months ago

On my Fedora distro, /usr/include/opus/opus_multistream.h is provided by opus-devel:

$ sudo dnf whatprovides /usr/include/opus/opus_multistream.h
Last metadata expiration check: 0:00:24 ago on Thu 04 Apr 2024 01:38:34 AM CEST.
opus-devel-1.3.1-13.fc39.i686 : Development package for opus
Repo        : fedora
Matched from:
Filename    : /usr/include/opus/opus_multistream.h

With Ubuntu, opus-dev provides it

Try removing and re-installing the packages. As a last resort, use the vendored libraries.