WohlSoft / SDL-Mixer-X

SDL Mixer X (Or "MixerX" shortly) - An audio mixer library based on the SDL library, a fork of SDL_mixer
https://wohlsoft.github.io/SDL-Mixer-X/
Other
102 stars 26 forks source link

Cannot compile under Archlinux. #71

Closed sudodebian closed 10 months ago

sudodebian commented 10 months ago

Hello i'm trying to compile SDL-Mixer-X for some other thing i need to compile since i don't have this library installed.

But when i'm trying to configure with cmake `CMake Error in /home/sudo64/Documents/kektech/deps/SDL_mixer_ext/compile_tests/CMakeFiles/CMakeTmp/CMakeLists.txt: Found relative path while evaluating include directories of "cmTC_b128d":

"OPNMIDI_LIBRARY-NOTFOUND"

CMake Error at cmake/CppNeedCheck.cmake:10 (try_compile): Failed to generate test project build system. Call Stack (most recent call first): src/codecs/music_midi_opn.cmake:13 (cpp_needed) CMakeLists.txt:246 (include) ` (It also asked for adn, but i had already the library installed.) For some reason, even without the -DMIXER_ENABLE_GPL=ON argument, it seems to try to configure and link those libraries as well.

Any idea on how to fix this ? Thanks.

Wohlstand commented 10 months ago

Do you have a C++ compiler installed ever? What version of CMake you do use? Soulds like it fails to run the try_compile() function :thinking:

sudodebian commented 10 months ago

Do you have a C++ compiler installed ever? What version of CMake you do use? Soulds like it fails to run the try_compile() function 🤔

I do have a compiler, gcc to be precise.

I'm using CMake version 3.27.7-2

Wohlstand commented 10 months ago

I do have a compiler, gcc to be precise.

Do you have g++ too? Anyway, I guess, if g++ would absent, the configure would just fail because it can't find C++ compiler, even before. Anyway, I got another idea why it would fail, possibly something related to file system. But I can't guess what. Could you upload a full log of CMake?

I'm using CMake version 3.27.7-2

Lemme try here... At me is 3.27.1 and it works just fine, shouldn't be much difference.

sudodebian commented 10 months ago

I do have a compiler, gcc to be precise.

Do you have g++ too? Anyway, I guess, if g++ would absent, the configure would just fail because it can't find C++ compiler, even before. Anyway, I got another idea why it would fail, possibly something related to file system. But I can't guess what. Could you upload a full log of CMake?

I'm using CMake version 3.27.7-2

Lemme try here... At me is 3.27.1 and it works just fine, shouldn't be much difference.

Full log, like what the cmake commands outputs when i'm trying to configure it ? (sorry for my lack of understanding, i'm pretty new to Cmake.)

Wohlstand commented 10 months ago

Full log, like what the cmake commands outputs when i'm trying to configure it ? (sorry for my lack of understanding, i'm pretty new to Cmake.)

Yes, just the full CMake's output since when you ran the command. Just copy output of terminal into text file and put here.

sudodebian commented 10 months ago

A

Full log, like what the cmake commands outputs when i'm trying to configure it ? (sorry for my lack of understanding, i'm pretty new to Cmake.)

Yes, just the full CMake's output since when you ran the command. Just copy output of terminal into text file and put here.

Alright.

`CMake Warning: No source or binary directory provided. Both will be assumed to be the same as the current working directory, but note that this warning will become a fatal error in future CMake releases.

CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 3.5 will be removed from a future version of CMake.

Update the VERSION argument value or use a ... suffix to tell CMake that the project does not need compatibility with older versions.

-- The C compiler identification is GNU 13.2.1 -- The CXX compiler identification is GNU 13.2.1 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found PkgConfig: /usr/bin/pkg-config (found version "1.8.1") -- Performing Test HAVE_NO_UNDEFINED -- Performing Test HAVE_NO_UNDEFINED - Success AudioCodecs will NOT be used. Libraries will be recognized in the system. C++ Library: stdc++ [TRUE], c++abi [FALSE] Vorbis: [TRUE] /usr/include/ogg;/usr/include/vorbis /usr/lib/libvorbisfile.so;/usr/lib/libvorbis.so == using Vorbis (BSD 3-Clause) == Opus: [TRUE] /usr/include/ogg;/usr/include/opus /usr/lib/libopusfile.so;/usr/lib/libopus.so == using Opus (BSD 3-Clause) == FLAC: [TRUE] /usr/include/ogg;/usr/include/FLAC /usr/lib/libFLAC.so == using FLAC (BSD 3-clause) == MAD: [TRUE] /usr/include /usr/lib/libmad.so == using MAD (GPLv2+) == == using MINIMP3 (CC0-1.0) == ModPlug: [TRUE] /usr/include/libmodplug /usr/lib/libmodplug.so -- /usr/lib/libmodplug.so;m works with stdc++ TRUE -- /usr/lib/libmodplug.so;m works without stdc++ TRUE ModPlug_Tell() compile test result: FALSE == using libModPlug (Public Domain) == -- Could NOT find XMP (missing: XMP_LIBRARY XMP_INCLUDE_DIR) XMP: [FALSE] XMP_INCLUDE_DIR-NOTFOUND XMP_LIBRARY-NOTFOUND -- skipping XMP -- GME: [TRUE] /usr/include/gme /usr/lib/libgme.so;/usr/lib/libz.so -- /usr/lib/libgme.so;/usr/lib/libz.so;m fails with stdc++ FALSE -- /usr/lib/libgme.so;/usr/lib/libz.so;m works without stdc++ TRUE gme_set_autoload_playback_limit() compile test result: TRUE == using GME (LGPLv2.1+ or GPLv2+ if MAME YM2612 emulator was used) == == using CMD Music (ZLib) == -- Looking for fork -- Looking for fork - found ADLMIDI: [TRUE] /usr/include /usr/lib/libADLMIDI.so -- /usr/lib/libADLMIDI.so;m works with stdc++ TRUE -- /usr/lib/libADLMIDI.so;m works without stdc++ TRUE == using ADLMIDI (GPLv3+) == OPNMIDI: [FALSE] OPNMIDI_INCLUDE_DIR-NOTFOUND OPNMIDI_LIBRARY-NOTFOUND CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: OPNMIDI_LIBRARY used as include directory in directory /home/sudo64/Téléchargements/SDL-Mixer-X-2.5.0-1/compile_tests/CMakeFiles/CMakeTmp used as include directory in directory /home/sudo64/Téléchargements/SDL-Mixer-X-2.5.0-1/compile_tests/CMakeFiles/CMakeTmp linked by target "cmTC_801d7" in directory /home/sudo64/Téléchargements/SDL-Mixer-X-2.5.0-1/compile_tests/CMakeFiles/CMakeTmp used as include directory in directory /home/sudo64/Téléchargements/SDL-Mixer-X-2.5.0-1/compile_tests/CMakeFiles/CMakeTmp

CMake Error in /home/sudo64/Téléchargements/SDL-Mixer-X-2.5.0-1/compile_tests/CMakeFiles/CMakeTmp/CMakeLists.txt: Found relative path while evaluating include directories of "cmTC_801d7":

"OPNMIDI_LIBRARY-NOTFOUND"

CMake Error at cmake/CppNeedCheck.cmake:10 (try_compile): Failed to generate test project build system. Call Stack (most recent call first): src/codecs/music_midi_opn.cmake:13 (cpp_needed) CMakeLists.txt:246 (include)

-- Configuring incomplete, errors occurred!`

Wohlstand commented 10 months ago

Oh!!!! Seems you went wrong. So, how to CORRECTLY configure CMake projects in general:

mkdir build
cd build
cmake ..

And, never run cmake . at the same directory as project, this will lead a total unworking mess.

sudodebian commented 10 months ago

Oh!!!! Seems you went wrong. So, how to CORRECTLY configure CMake projects in general:

mkdir build
cd build
cmake ..

And, never run cmake . at the same directory as project, this will lead a total unworking mess.

Tried this, gives me the same result.

Wohlstand commented 10 months ago

Weird... Anyway, try to perform the git checkout . and then, re-run the thing. Seems because of your first attempt, some files got been broken.

sudodebian commented 10 months ago

Weird... Anyway, try to perform the git checkout . and then, re-run the thing. Seems because of your first attempt, some files got been broken.

Yup ! you were right. for some reason downloading this and extracting with GNOME's file manager corrupts it a little bit. Git cloning it seems to have fixed the issue entirely. I guess i'll have to install file-roller next time i ever want to extract something from github. Thanks ! It seems to have compiled just fine too !

Wohlstand commented 10 months ago

Glad the thing works! Have a good time!