shadps4-emu / shadPS4

PS4 emulator for Windows,Linux,MacOS
https://shadps4.net/
GNU General Public License v2.0
10.61k stars 646 forks source link

SDL (?) error on Linux when compiling #999

Closed Ein420 closed 1 month ago

Ein420 commented 1 month ago

Arch linux user here, I tried following linux compile instructions and ended up with this

Specs & info: Arch linux RX 6600 Ryzen 5 4600G 16GB Ram

$ cmake --build . --parallel$(nproc)

[  2%] Generating include/video_core/host_shaders/detile_m8x1_comp.h
[  2%] Building CXX object externals/tracy/CMakeFiles/TracyClient.dir/public/TracyClient.cpp.o
[  2%] Building CXX object externals/CMakeFiles/Dear_ImGui.dir/dear_imgui/imgui_demo.cpp.o
[  2%] Generating include/video_core/host_shaders/detile_m32x1_comp.h
[  3%] Generating include/video_core/host_shaders/detile_m32x2_comp.h
[  3%] Building C object externals/zydis/zycore/CMakeFiles/Zycore.dir/src/API/Memory.c.o
[  3%] Building CXX object externals/sirit/src/CMakeFiles/sirit.dir/sirit.cpp.o
[  3%] Generating include/video_core/host_shaders/detile_m8x2_comp.h
[  3%] Building CXX object externals/CMakeFiles/Dear_ImGui.dir/dear_imgui/imgui_draw.cpp.o
[  3%] Building CXX object externals/CMakeFiles/Dear_ImGui.dir/dear_imgui/imgui_widgets.cpp.o
[  3%] Building CXX object externals/CMakeFiles/Dear_ImGui.dir/dear_imgui/imgui.cpp.o
[  4%] Building CXX object externals/CMakeFiles/Dear_ImGui.dir/dear_imgui/imgui_tables.cpp.o
In file included from /home/ein/Downloads/shadPS4/externals/dear_imgui/imgui.h:64,
                 from /home/ein/Downloads/shadPS4/externals/dear_imgui/imgui_demo.cpp:107:
/home/ein/Downloads/shadPS4/src/imgui/imgui_config.h:31:100: warning: backslash-newline at end of file
   31 | #define IM_VEC4_CLASS_EXTRA                                                                        \
In file included from /home/ein/Downloads/shadPS4/externals/dear_imgui/imgui.h:64,
                 from /home/ein/Downloads/shadPS4/externals/dear_imgui/imgui_draw.cpp:34:
/home/ein/Downloads/shadPS4/src/imgui/imgui_config.h:31:100: warning: backslash-newline at end of file
   31 | #define IM_VEC4_CLASS_EXTRA                                                                        \
In file included from /home/ein/Downloads/shadPS4/externals/dear_imgui/imgui.h:64,
                 from /home/ein/Downloads/shadPS4/externals/dear_imgui/imgui_tables.cpp:198:
/home/ein/Downloads/shadPS4/src/imgui/imgui_config.h:31:100: warning: backslash-newline at end of file
   31 | #define IM_VEC4_CLASS_EXTRA                                                                        \
[  4%] Generating include/video_core/host_shaders/detile_m32x4_comp.h
[  5%] Building C object externals/zydis/zycore/CMakeFiles/Zycore.dir/src/API/Process.c.o
[  6%] Building CXX object externals/sirit/src/CMakeFiles/sirit.dir/instructions/type.cpp.o
[  6%] Building C object externals/zydis/zycore/CMakeFiles/Zycore.dir/src/API/Synchronization.c.o
In file included from /home/ein/Downloads/shadPS4/externals/dear_imgui/imgui.h:64,
                 from /home/ein/Downloads/shadPS4/externals/dear_imgui/imgui.cpp:1049:
/home/ein/Downloads/shadPS4/src/imgui/imgui_config.h:31:100: warning: backslash-newline at end of file
   31 | #define IM_VEC4_CLASS_EXTRA                                                                        \
In file included from /home/ein/Downloads/shadPS4/externals/dear_imgui/imgui.h:64,
                 from /home/ein/Downloads/shadPS4/externals/dear_imgui/imgui_widgets.cpp:43:
/home/ein/Downloads/shadPS4/src/imgui/imgui_config.h:31:100: warning: backslash-newline at end of file
   31 | #define IM_VEC4_CLASS_EXTRA                                                                        \
[  6%] Building C object externals/zydis/zycore/CMakeFiles/Zycore.dir/src/API/Terminal.c.o
[  6%] Built target host_shaders
[  6%] Building CXX object externals/sirit/src/CMakeFiles/sirit.dir/instructions/constant.cpp.o
[  7%] Building C object externals/zydis/zycore/CMakeFiles/Zycore.dir/src/API/Thread.c.o
[  7%] Building CXX object externals/sirit/src/CMakeFiles/sirit.dir/instructions/function.cpp.o
[  8%] Building CXX object externals/sirit/src/CMakeFiles/sirit.dir/instructions/flow.cpp.o
[  8%] Building C object externals/zydis/zycore/CMakeFiles/Zycore.dir/src/Allocator.c.o
[  8%] Building C object externals/zydis/zycore/CMakeFiles/Zycore.dir/src/ArgParse.c.o
[  9%] Building C object externals/zydis/zycore/CMakeFiles/Zycore.dir/src/Bitset.c.o
[  9%] Building C object externals/zydis/zycore/CMakeFiles/Zycore.dir/src/Format.c.o
[  9%] Building C object externals/zydis/zycore/CMakeFiles/Zycore.dir/src/List.c.o
[ 10%] Building C object externals/zydis/zycore/CMakeFiles/Zycore.dir/src/String.c.o
[ 10%] Building C object externals/zydis/zycore/CMakeFiles/Zycore.dir/src/Vector.c.o
[ 10%] Building CXX object externals/sirit/src/CMakeFiles/sirit.dir/instructions/debug.cpp.o
[ 10%] Building C object externals/zydis/zycore/CMakeFiles/Zycore.dir/src/Zycore.c.o
[ 10%] Building CXX object externals/sirit/src/CMakeFiles/sirit.dir/instructions/derivatives.cpp.o
[ 11%] Building CXX object externals/sirit/src/CMakeFiles/sirit.dir/instructions/memory.cpp.o
[ 12%] Linking C static library libZycore.a
[ 12%] Building CXX object externals/sirit/src/CMakeFiles/sirit.dir/instructions/annotation.cpp.o
[ 12%] Built target Zycore
[ 12%] Building CXX object externals/sirit/src/CMakeFiles/sirit.dir/instructions/misc.cpp.o
[ 13%] Building CXX object externals/sirit/src/CMakeFiles/sirit.dir/instructions/logical.cpp.o
[ 13%] Building C object externals/zydis/CMakeFiles/Zydis.dir/src/MetaInfo.c.o
[ 14%] Building C object externals/zydis/CMakeFiles/Zydis.dir/src/Mnemonic.c.o
[ 14%] Building CXX object externals/sirit/src/CMakeFiles/sirit.dir/instructions/conversion.cpp.o
[ 14%] Building C object externals/zydis/CMakeFiles/Zydis.dir/src/Register.c.o
[ 14%] Building C object externals/zydis/CMakeFiles/Zydis.dir/src/SharedData.c.o
[ 15%] Building C object externals/zydis/CMakeFiles/Zydis.dir/src/String.c.o
[ 15%] Building C object externals/zydis/CMakeFiles/Zydis.dir/src/Utils.c.o
[ 15%] Building C object externals/zydis/CMakeFiles/Zydis.dir/src/Zydis.c.o
[ 16%] Building C object externals/zydis/CMakeFiles/Zydis.dir/src/Decoder.c.o
[ 16%] Building CXX object externals/sirit/src/CMakeFiles/sirit.dir/instructions/bit.cpp.o
[ 16%] Building C object externals/zydis/CMakeFiles/Zydis.dir/src/DecoderData.c.o
[ 17%] Building CXX object externals/sirit/src/CMakeFiles/sirit.dir/instructions/arithmetic.cpp.o
[ 17%] Building CXX object externals/sirit/src/CMakeFiles/sirit.dir/instructions/extension.cpp.o
[ 17%] Building CXX object externals/sirit/src/CMakeFiles/sirit.dir/instructions/image.cpp.o
[ 18%] Building CXX object externals/sirit/src/CMakeFiles/sirit.dir/instructions/group.cpp.o
[ 18%] Building CXX object externals/sirit/src/CMakeFiles/sirit.dir/instructions/barrier.cpp.o
[ 18%] Building C object externals/zydis/CMakeFiles/Zydis.dir/src/Encoder.c.o
[ 18%] Building CXX object externals/sirit/src/CMakeFiles/sirit.dir/instructions/atomic.cpp.o
[ 19%] Building C object externals/zydis/CMakeFiles/Zydis.dir/src/EncoderData.c.o
[ 19%] Building C object externals/zydis/CMakeFiles/Zydis.dir/src/Disassembler.c.o
[ 19%] Building C object externals/zydis/CMakeFiles/Zydis.dir/src/Formatter.c.o
[ 20%] Building C object externals/zydis/CMakeFiles/Zydis.dir/src/FormatterBuffer.c.o
[ 20%] Building C object externals/zydis/CMakeFiles/Zydis.dir/src/FormatterATT.c.o
[ 20%] Building C object externals/zydis/CMakeFiles/Zydis.dir/src/FormatterBase.c.o
[ 21%] Building C object externals/zydis/CMakeFiles/Zydis.dir/src/FormatterIntel.c.o
[ 21%] Building C object externals/zydis/CMakeFiles/Zydis.dir/src/Segment.c.o
[ 22%] Linking CXX static library libsirit.a
[ 22%] Built target sirit
[ 22%] Linking C static library libZydis.a
[ 22%] Built target Zydis
[ 22%] Linking CXX static library libTracyClient.a
[ 22%] Built target TracyClient
[ 22%] Linking CXX static library libDear_ImGui.a
[ 22%] Built target Dear_ImGui
[ 22%] Built target shadps4_autogen_timestamp_deps
[ 22%] Automatic MOC and UIC for target shadps4
[ 22%] Built target shadps4_autogen
[ 23%] Generating translations/zh_TW.qm
[ 23%] Generating translations/ar.qm
[ 24%] Generating translations/da_DK.qm
[ 24%] Generating translations/es_ES.qm
[ 24%] Generating translations/el.qm
[ 25%] Generating translations/en.qm
[ 25%] Generating qrc_shadps4.cpp
[ 25%] Generating translations/de.qm
[ 25%] Generating translations/fa_IR.qm
[ 26%] Generating translations/fi.qm
Updating '/home/ein/Downloads/shadPS4/build/translations/es_ES.qm'...
Updating '/home/ein/Downloads/shadPS4/build/translations/ar.qm'...
Updating '/home/ein/Downloads/shadPS4/build/translations/de.qm'...
    Generated 187 translation(s) (187 finished and 0 unfinished)
Updating '/home/ein/Downloads/shadPS4/build/translations/zh_TW.qm'...
Updating '/home/ein/Downloads/shadPS4/build/translations/el.qm'...
    Generated 187 translation(s) (187 finished and 0 unfinished)
    Generated 187 translation(s) (187 finished and 0 unfinished)
Updating '/home/ein/Downloads/shadPS4/build/translations/da_DK.qm'...
    Generated 187 translation(s) (187 finished and 0 unfinished)
    Generated 187 translation(s) (187 finished and 0 unfinished)
    Generated 187 translation(s) (187 finished and 0 unfinished)
Updating '/home/ein/Downloads/shadPS4/build/translations/en.qm'...
    Generated 187 translation(s) (187 finished and 0 unfinished)
Updating '/home/ein/Downloads/shadPS4/build/translations/fi.qm'...
    Generated 187 translation(s) (187 finished and 0 unfinished)
Updating '/home/ein/Downloads/shadPS4/build/translations/fa_IR.qm'...
    Generated 187 translation(s) (187 finished and 0 unfinished)
[ 26%] Generating translations/fr.qm
[ 26%] Generating translations/it.qm
[ 26%] Generating translations/hu_HU.qm
[ 27%] Generating translations/ko_KR.qm
[ 27%] Generating translations/ja_JP.qm
[ 27%] Generating translations/lt_LT.qm
[ 28%] Generating translations/nl.qm
[ 29%] Generating translations/id.qm
[ 29%] Generating translations/nb.qm
Updating '/home/ein/Downloads/shadPS4/build/translations/fr.qm'...
[ 29%] Generating translations/pl_PL.qm
Updating '/home/ein/Downloads/shadPS4/build/translations/it.qm'...
    Generated 187 translation(s) (187 finished and 0 unfinished)
Updating '/home/ein/Downloads/shadPS4/build/translations/ja_JP.qm'...
Updating '/home/ein/Downloads/shadPS4/build/translations/ko_KR.qm'...
    Generated 187 translation(s) (187 finished and 0 unfinished)
    Generated 187 translation(s) (187 finished and 0 unfinished)
    Generated 187 translation(s) (187 finished and 0 unfinished)
Updating '/home/ein/Downloads/shadPS4/build/translations/id.qm'...
    Generated 187 translation(s) (187 finished and 0 unfinished)
Updating '/home/ein/Downloads/shadPS4/build/translations/hu_HU.qm'...
    Generated 187 translation(s) (187 finished and 0 unfinished)
Updating '/home/ein/Downloads/shadPS4/build/translations/nl.qm'...
    Generated 187 translation(s) (187 finished and 0 unfinished)
Updating '/home/ein/Downloads/shadPS4/build/translations/nb.qm'...
    Generated 187 translation(s) (187 finished and 0 unfinished)
Updating '/home/ein/Downloads/shadPS4/build/translations/lt_LT.qm'...
    Generated 187 translation(s) (187 finished and 0 unfinished)
[ 30%] Generating translations/pt_BR.qm
[ 30%] Generating translations/ro_RO.qm
Updating '/home/ein/Downloads/shadPS4/build/translations/pl_PL.qm'...
    Generated 187 translation(s) (187 finished and 0 unfinished)
[ 30%] Generating translations/ru_RU.qm
[ 30%] Generating translations/vi_VN.qm
[ 30%] Generating translations/zh_CN.qm
[ 31%] Generating translations/tr_TR.qm
[ 31%] Generating translations/sq.qm
Updating '/home/ein/Downloads/shadPS4/build/translations/pt_BR.qm'...
Updating '/home/ein/Downloads/shadPS4/build/translations/ro_RO.qm'...
    Generated 187 translation(s) (187 finished and 0 unfinished)
    Generated 187 translation(s) (187 finished and 0 unfinished)
Updating '/home/ein/Downloads/shadPS4/build/translations/zh_CN.qm'...
Updating '/home/ein/Downloads/shadPS4/build/translations/ru_RU.qm'...
    Generated 187 translation(s) (187 finished and 0 unfinished)
Updating '/home/ein/Downloads/shadPS4/build/translations/vi_VN.qm'...
    Generated 187 translation(s) (187 finished and 0 unfinished)
    Generated 187 translation(s) (187 finished and 0 unfinished)
Warning: dropping duplicate messages in '/home/ein/Downloads/shadPS4/build/translations/tr_TR.qm':

* Context: SettingsDialog
* Source: Save
* Line in .ts file: 962
* Duplicate at line: 985

* Context: SettingsDialog
* Source: General
* Line in .ts file: 370
* Duplicate at line: 947

* Context: SettingsDialog
* Source: Settings
* Line in .ts file: 365
* Duplicate at line: 942

Updating '/home/ein/Downloads/shadPS4/build/translations/tr_TR.qm'...
    Generated 197 translation(s) (197 finished and 0 unfinished)
Updating '/home/ein/Downloads/shadPS4/build/translations/sq.qm'...
    Generated 187 translation(s) (187 finished and 0 unfinished)
[ 32%] Generating qrc_translations.cpp
[ 33%] Building CXX object CMakeFiles/shadps4.dir/src/imgui/renderer/imgui_impl_vulkan.cpp.o
[ 33%] Building CXX object CMakeFiles/shadps4.dir/shadps4_autogen/mocs_compilation.cpp.o
[ 33%] Building CXX object CMakeFiles/shadps4.dir/src/imgui/renderer/imgui_core.cpp.o
[ 33%] Building CXX object CMakeFiles/shadps4.dir/src/imgui/renderer/imgui_impl_sdl3.cpp.o
[ 34%] Building CXX object CMakeFiles/shadps4.dir/src/imgui/layer/video_info.cpp.o
[ 34%] Building CXX object CMakeFiles/shadps4.dir/src/input/controller.cpp.o
[ 35%] Building CXX object CMakeFiles/shadps4.dir/src/qt_gui/about_dialog.cpp.o
[ 35%] Building CXX object CMakeFiles/shadps4.dir/src/imgui/renderer/texture_manager.cpp.o
[ 35%] Building CXX object CMakeFiles/shadps4.dir/src/audio_core/sdl_audio.cpp.o
[ 35%] Building CXX object CMakeFiles/shadps4.dir/src/qt_gui/cheats_patches.cpp.o
[ 35%] Building CXX object CMakeFiles/shadps4.dir/src/qt_gui/main_window.cpp.o
[ 36%] Building CXX object CMakeFiles/shadps4.dir/src/qt_gui/game_info.cpp.o
In file included from /home/ein/Downloads/shadPS4/externals/dear_imgui/imgui.h:64,
                 from /home/ein/Downloads/shadPS4/src/imgui/renderer/imgui_impl_sdl3.cpp:6:
/home/ein/Downloads/shadPS4/src/imgui/imgui_config.h:31:100: warning: backslash-newline at end of file
   31 | #define IM_VEC4_CLASS_EXTRA                                                                        \
In file included from /home/ein/Downloads/shadPS4/externals/dear_imgui/imgui.h:64,
                 from /home/ein/Downloads/shadPS4/src/imgui/layer/video_info.cpp:4:
/home/ein/Downloads/shadPS4/src/imgui/imgui_config.h:31:100: warning: backslash-newline at end of file
   31 | #define IM_VEC4_CLASS_EXTRA                                                                        \
In file included from /home/ein/Downloads/shadPS4/externals/dear_imgui/imgui.h:64,
                 from /home/ein/Downloads/shadPS4/src/imgui/renderer/imgui_core.cpp:5:
/home/ein/Downloads/shadPS4/src/imgui/imgui_config.h:31:100: warning: backslash-newline at end of file
   31 | #define IM_VEC4_CLASS_EXTRA                                                                        \
In file included from /home/ein/Downloads/shadPS4/externals/dear_imgui/imgui.h:64,
                 from /home/ein/Downloads/shadPS4/src/imgui/renderer/imgui_impl_vulkan.cpp:9:
/home/ein/Downloads/shadPS4/src/imgui/imgui_config.h:31:100: warning: backslash-newline at end of file
   31 | #define IM_VEC4_CLASS_EXTRA                                                                        \
[ 36%] Building CXX object CMakeFiles/shadps4.dir/src/qt_gui/game_list_frame.cpp.o
In file included from /usr/include/SDL3/SDL.h:83,
                 from /home/ein/Downloads/shadPS4/src/imgui/renderer/imgui_impl_sdl3.cpp:10:
/home/ein/Downloads/shadPS4/src/imgui/renderer/imgui_impl_sdl3.cpp: In function ‘void ImGui::Sdl::UpdateMouseData()’:
/home/ein/Downloads/shadPS4/src/imgui/renderer/imgui_impl_sdl3.cpp:584:54: error: ‘SDL_TRUE_renamed_true’ was not declared in this scope
  584 |     SDL_CaptureMouse((bd->mouse_buttons_down != 0) ? SDL_TRUE : SDL_FALSE);
      |                                                      ^~~~~~~~
/home/ein/Downloads/shadPS4/src/imgui/renderer/imgui_impl_sdl3.cpp:584:65: error: ‘SDL_FALSE_renamed_false’ was not declared in this scope
  584 |     SDL_CaptureMouse((bd->mouse_buttons_down != 0) ? SDL_TRUE : SDL_FALSE);
      |                                                                 ^~~~~~~~~
make[2]: *** [CMakeFiles/shadps4.dir/build.make:303: CMakeFiles/shadps4.dir/src/imgui/renderer/imgui_impl_sdl3.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /home/ein/Downloads/shadPS4/externals/dear_imgui/imgui.h:64,
                 from /home/ein/Downloads/shadPS4/src/imgui/imgui_texture.h:7,
                 from /home/ein/Downloads/shadPS4/src/imgui/renderer/texture_manager.h:10,
                 from /home/ein/Downloads/shadPS4/src/imgui/renderer/texture_manager.cpp:13:
/home/ein/Downloads/shadPS4/src/imgui/imgui_config.h:31:100: warning: backslash-newline at end of file
   31 | #define IM_VEC4_CLASS_EXTRA                                                                        \
/home/ein/Downloads/shadPS4/src/qt_gui/cheats_patches.cpp: In lambda function:
/home/ein/Downloads/shadPS4/src/qt_gui/cheats_patches.cpp:682:46: warning: implicit capture of ‘this’ via ‘[=]’ is deprecated in C++20 [-Wdeprecated]
  682 |     connect(reply, &QNetworkReply::finished, [=]() {
      |                                              ^
/home/ein/Downloads/shadPS4/src/qt_gui/cheats_patches.cpp:682:46: note: add explicit ‘this’ or ‘*this’ capture
/home/ein/Downloads/shadPS4/src/qt_gui/cheats_patches.cpp: In lambda function:
/home/ein/Downloads/shadPS4/src/qt_gui/cheats_patches.cpp:715:66: warning: implicit capture of ‘this’ via ‘[=]’ is deprecated in C++20 [-Wdeprecated]
  715 |                     connect(fileReply, &QNetworkReply::finished, [=]() {
      |                                                                  ^
/home/ein/Downloads/shadPS4/src/qt_gui/cheats_patches.cpp:715:66: note: add explicit ‘this’ or ‘*this’ capture
make[1]: *** [CMakeFiles/Makefile2:228: CMakeFiles/shadps4.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
abouvier commented 1 month ago

You have a too recent sdl3 package installed on your system ; shadps4 and imgui are not yet compatible with it.

Ein420 commented 1 month ago

You have a too recent sdl3 package installed on your system ; shadps4 and imgui are not yet compatible with it.

Thank you for your response So then, which would be the specific version I should downgrade to?

abouvier commented 1 month ago

You can run cmake with -DCMAKE_DISABLE_FIND_PACKAGE_SDL3=ON to force the use of the submodule.

Ein420 commented 1 month ago

@Ein420 You can just remove it from your system and use the embedded in the project

You can run cmake with -DCMAKE_DISABLE_FIND_PACKAGE_SDL3=ON to force the use of the submodule.

Thanks a lot I'll give it an attempt and see if it works

Ein420 commented 1 month ago

Building worked 100%, thanks again for the help

... though this build, including all the newer builds, are still resulting in just a black screen with bloodborne regardless of what I do, that's unrelated to this issue though

closing now

Vladimir-A commented 1 month ago

just a black screen with bloodborne

Same, here log file https://gist.github.com/Vladimir-A/6d7090138f26b837bbc066134e6db015