mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-04-25 15:56:00 +03:00
[GH-ISSUE #1900] MSYS2 build errors #653
Labels
No labels
Bloodborne
bug
contributor wanted
documentation
enhancement
frontend
good first issue
help wanted
linux
pull-request
question
release
verification progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/shadPS4#653
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jimbigjim1 on GitHub (Dec 26, 2024).
Original GitHub issue: https://github.com/shadps4-emu/shadPS4/issues/1900
Following building-windows.md option 2 (MSYS2) and skipping optional Qt steps failed with errors
FAILED: CMakeFiles/shadps4.dir/src/common/ntapi.cpp.objC:\msys64\mingw64\bin\clang++.exe include -O2 -march=native -O3 -DNDEBUG -std=gnu++23 -DHAVE_PTHREAD_MUTEX_TIMEDLOCK -Wno-error=unused-command-line-argument -MD -MT CMakeFiles/shadps4.dir/src/common/ntapi.cpp.obj -MF CMakeFiles\shadps4.dir\src\common\ntapi.cpp.obj.d -o CMakeFiles/shadps4.dir/src/common/ntapi.cpp.obj -c C:/msys64/home/you/shadPS4/src/common/ntapi.cppIn file included from C:/msys64/home/you/shadPS4/src/common/ntapi.cpp:6: C:/msys64/home/you/shadPS4/src/common/ntapi.h:509:24: error: unexpected type name 'TEB': expected expression 509 | static_assert(offsetof(TEB, DeallocationStack) == | ^C:/msys64/home/you/shadPS4/src/common/ntapi.h:509:29: error: use of undeclared identifier 'DeallocationStack' 509 | static_assert(offsetof(TEB, DeallocationStack) == | ^2 errors generated.[23/172] Building CXX object CMakeFiles/shadps4.dir/src/core/libraries/system/systemservice.cpp.objninja: build stopped: subcommand failed.To reproduce issue:
pacman -Syupacman -S --needed git mingw-w64-x86_64-binutils mingw-w64-x86_64-clang mingw-w64-x86_64-cmake mingw-w64-x86_64-rapidjson mingw-w64-x86_64-ninja mingw-w64-x86_64-ffmpeggit clone --depth 1 --recursive https://github.com/shadps4-emu/shadPS4cd shadPS4cmake -S . -B build -DCMAKE_C_COMPILER="clang.exe" -DCMAKE_CXX_COMPILER="clang++.exe" -DCMAKE_CXX_FLAGS="-O2 -march=native"cmake --build buildI also duplicated the shadPS4 folder from the MSYS folder to open it with VS2022 and it looks like it worked (says CMake generation finished) but when I closed and reopened VS it failed with error
CMake Error in C:\Users\you\source\repos\shadps4\CMakeLists.txt: MSVC_RUNTIME_LIBRARY value 'MultiThreadedDebugDLL' not known for this ASM compiler.how to fix???
@mailwl commented on GitHub (Dec 26, 2024):
try to fork this project to your account, and then
git clone --recursive <your git fork url>.cloning right from this repo leads to errors:
@jimbigjim1 commented on GitHub (Dec 27, 2024):
Using Qt does not solve the issue and generates more errors
1 warning generated. [612/842] Building CXX object CMakeFiles/shadps4.dir/src/common/ntapi.cpp.obj FAILED: CMakeFiles/shadps4.dir/src/common/ntapi.cpp.obj C:\msys64\mingw64\bin\clang++.exe -DBOOST_ASIO_STANDALONE -DENABLE_DISCORD_RPC -DENABLE_QT_GUI -DHAVE_PTHREAD_MUTEX_TIMEDLOCK -Wno-error=unused-command-line-argument -MD -MT CMakeFiles/shadps4.dir/src/common/ntapi.cpp.obj -MF CMakeFiles\shadps4.dir\src\common\ntapi.cpp.obj.d -o CMakeFiles/shadps4.dir/src/common/ntapi.cpp.obj -c C:/msys64/home/you/shadPS4/src/common/ntapi.cpp In file included from C:/msys64/home/you/shadPS4/src/common/ntapi.cpp:6: C:/msys64/home/you/shadPS4/src/common/ntapi.h:509:24: error: unexpected type name 'TEB': expected expression 509 | static_assert(offsetof(TEB, DeallocationStack) == | ^ C:/msys64/home/you/shadPS4/src/common/ntapi.h:509:29: error: use of undeclared identifier 'DeallocationStack' 509 | static_assert(offsetof(TEB, DeallocationStack) == | ^ 2 errors generated. [629/842] Building CXX object CMakeFiles/shadps4.dir/src/qt_gui/settings_dialog.cpp.obj C:/msys64/home/you/shadPS4/src/qt_gui/settings_dialog.cpp:129:49: warning: 'stateChanged' is deprecated: Use checkStateChanged() instead [-Wdeprecated-declarations] 129 | connect(ui->updateCheckBox, &QCheckBox::stateChanged, this, | ^ C:/msys64/mingw64/include/qt6/QtWidgets/qcheckbox.h:40:19: note: 'stateChanged' has been explicitly marked deprecated here 40 | QT_MOC_COMPAT QT_DEPRECATED_VERSION_X_6_9("Use checkStateChanged() instead") | ^ C:/msys64/mingw64/include/qt6/QtCore/qtdeprecationmarkers.h:179:44: note: expanded from macro 'QT_DEPRECATED_VERSION_X_6_9' 179 | # define QT_DEPRECATED_VERSION_X_6_9(text) QT_DEPRECATED_X(text) | ^ C:/msys64/mingw64/include/qt6/QtCore/qtdeprecationmarkers.h:29:33: note: expanded from macro 'QT_DEPRECATED_X' 29 | # define QT_DEPRECATED_X(text) Q_DECL_DEPRECATED_X(text) | ^ C:/msys64/mingw64/include/qt6/QtCore/qcompilerdetection.h:1000:36: note: expanded from macro 'Q_DECL_DEPRECATED_X' 1000 | # define Q_DECL_DEPRECATED_X(x) [[deprecated(x)]] | ^ 1 warning generated. ninja: build stopped: subcommand failed.I also tried VS2022 with Qt but its the same errors like in the bottom of the post (CMake errors)
Most errors here are not from shadps4 (CMake not working, ninja not working, VS MSVC toolset not working, VS Qt extension not working ect) so I wont open new issues. But let me know if I should
I get it, this is a test (if you can't figure this out, what can you contribute to the project?) but please make sure the instructions in the building md work next time.
@mailwl commented on GitHub (Dec 27, 2024):
comment two lines
github.com/shadps4-emu/shadPS4@e40ede5db2/src/common/ntapi.h (L509-L510)after it, compilation will back to normal
@Hermiten commented on GitHub (Dec 28, 2024):
Duplicate of https://github.com/shadps4-emu/shadPS4/issues/1744
@PitNox commented on GitHub (Feb 19, 2025):
Hi, not sure if this is the correct place but having same issue:
When I run
$ cmake --build build
I get this error:
[11/191] Building CXX object CMakeFiles/shadps4.dir/src/core/libraries/save_data/save_backup.cpp.ob
FAILED: CMakeFiles/shadps4.dir/src/core/libraries/save_data/save_backup.cpp.obj
C:\msys64\mingw64\bin\clang++.exe -DBOOST_ASIO_STANDALONE -DENABLE_DISCORD_RPC -DGLSLANG_IS_SHARED_LIBRARY=1 -DIMGUI_USER_CONFIG="imgui/imgui_config.h" -DNOMINMAX -DNTDDI_VERSION=0x0A000006 -DTRACY_NO_CALLSTACK -DTRACY_NO_CODE_TRANSFER -DTRACY_NO_CONTEXT_SWITCH -DTRACY_NO_CRASH_HANDLER -DTRACY_NO_FRAME_IMAGE -DTRACY_NO_SAMPLING -DTRACY_NO_SYSTEM_TRACING -DTRACY_ONLY_LOCALHOST -DTRACY_ON_DEMAND -DWIN32_LEAN_AND_MEAN -DWINVER=0x0A00 -DZYCORE_STATIC_BUILD -DZYDIS_STATIC_BUILD -D_WIN32_WINNT=0x0A00 -IC:/msys64/home/nocet/shadPS4/src -IC:/msys64/home/nocet/shadPS4 -IC:/msys64/home/nocet/shadPS4/build/src/video_core/host_shaders/include -IC:/msys64/home/nocet/shadPS4/build/src/imgui/renderer/generated_fonts -isystem C:/msys64/home/nocet/shadPS4/externals/magic_enum/include -isystem C:/msys64/home/nocet/shadPS4/externals/fmt/include -isystem C:/msys64/home/nocet/shadPS4/externals/toml11/include -isystem C:/msys64/home/nocet/shadPS4/externals/robin-map/include -isystem C:/msys64/home/nocet/shadPS4/externals/xbyak -isystem C:/msys64/home/nocet/shadPS4/externals/tracy/public -isystem C:/msys64/home/nocet/shadPS4/externals/./renderdoc -isystem C:/msys64/home/nocet/shadPS4/externals/dear_imgui -isystem C:/msys64/home/nocet/shadPS4/externals/gcn/include -isystem C:/msys64/home/nocet/shadPS4/externals/half/include -isystem C:/msys64/home/nocet/shadPS4/externals/ext-boost/libs/align/include -isystem C:/msys64/home/nocet/shadPS4/externals/ext-boost/libs/range/include -isystem C:/msys64/home/nocet/shadPS4/externals/ext-boost/libs/optional/include -isystem C:/msys64/home/nocet/shadPS4/externals/ext-boost/libs/utility/include -isystem C:/msys64/home/nocet/shadPS4/externals/ext-boost/libs/tuple/include -isystem C:/msys64/home/nocet/shadPS4/externals/ext-boost/libs/iterator/include -isystem C:/msys64/home/nocet/shadPS4/externals/ext-boost -isystem C:/msys64/home/nocet/shadPS4/externals/vma/include -isystem C:/msys64/home/nocet/shadPS4/externals/LibAtrac9/C/src -isystem C:/msys64/home/nocet/shadPS4/externals/sirit/src/../include -isystem C:/msys64/home/nocet/shadPS4/externals/sirit/externals/SPIRV-Headers/include -isystem C:/msys64/home/nocet/shadPS4/externals/vulkan-headers/include -isystem C:/msys64/home/nocet/shadPS4/externals/xxhash -isystem C:/msys64/home/nocet/shadPS4/externals/zydis/include -isystem C:/msys64/home/nocet/shadPS4/build/externals/zydis -isystem C:/msys64/home/nocet/shadPS4/externals/zydis/dependencies/zycore/include -isystem C:/msys64/home/nocet/shadPS4/build/externals/zydis/zycore -isystem C:/msys64/home/nocet/shadPS4/build/externals/sdl3/include-revision -isystem C:/msys64/home/nocet/shadPS4/externals/sdl3/include -isystem C:/msys64/home/nocet/shadPS4/externals/pugixml/src -isystem C:/msys64/home/nocet/shadPS4/externals/stb -isystem C:/msys64/home/nocet/shadPS4/build/externals/cryptopp -isystem C:/msys64/home/nocet/shadPS4/externals/winpthreads/include -isystem C:/msys64/home/nocet/shadPS4/externals/discord-rpc/include -O2 -march=native -O3 -DNDEBUG -std=gnu++23 -DHAVE_PTHREAD_MUTEX_TIMEDLOCK -Wno-error=unused-command-line-argument -MD -MT CMakeFiles/shadps4.dir/src/core/libraries/save_data/save_backup.cpp.obj -MF CMakeFiles\shadps4.dir\src\core\libraries\save_data\save_backup.cpp.obj.d -o CMakeFiles/shadps4.dir/src/core/libraries/save_data/save_backup.cpp.obj -c C:/msys64/home/nocet/shadPS4/src/core/libraries/save_data/save_backup.cpp
C:/msys64/home/nocet/shadPS4/src/core/libraries/save_data/save_backup.cpp:148:14: error: no member named 'at_quick_exit' in namespace 'std'
148 | std::at_quick_exit([] {
| ~~~~~^
1 error generated.
[32/191] Building CXX object CMakeFiles/shadps4.dir/src/core/libraries/system/systemservice.cpp.obj
ninja: build stopped: subcommand failed.
If its indeed the same issue and its fixed can you please direct me to the solution? Thx!