hrydgard / ppsspp

A PSP emulator for Android, Windows, Mac and Linux, written in C++. Want to contribute? Join us on Discord at https://discord.gg/5NJB6dD or just send pull requests / issues. For discussion use the forums at forums.ppsspp.org.
https://www.ppsspp.org
Other
11.03k stars 2.15k forks source link

Qt build broken: 'StopSDLAudioDevice' was not declared in this scope #17405

Closed sagitter closed 1 year ago

sagitter commented 1 year ago

Platform

Linux / BSD

Compiler and build tool versions

GCC-13.1.1 and CMake-3.26.3

Operating system version

Fedora 38+

Build commands used

+ /usr/bin/cmake -S . -B redhat-linux-build -DCMAKE_C_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_CXX_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_Fortran_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_INSTALL_DO_STRIP:BOOL=OFF -DCMAKE_INSTALL_PREFIX:PATH=/usr -DINCLUDE_INSTALL_DIR:PATH=/usr/include -DLIB_INSTALL_DIR:PATH=/usr/lib64 -DSYSCONF_INSTALL_DIR:PATH=/etc -DSHARE_INSTALL_PREFIX:PATH=/usr/share -DLIB_SUFFIX=64 -DBUILD_SHARED_LIBS:BOOL=ON -B build2 -DCMAKE_BUILD_TYPE:STRING=Release -DOpenGL_GL_PREFERENCE:STRING=GLVND -DUSING_EGL:BOOL=ON -DUSING_GLES2:BOOL=ON -DUSING_X11_VULKAN:BOOL=ON -DUSE_WAYLAND_WSI:BOOL=ON -DUSING_QT_UI:BOOL=ON -DLIBRETRO:BOOL=ON -DCMAKE_INSTALL_LIBDIR:PATH=lib64/ppsspp -DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python3 -Wno-dev -DARMIPS_REGEXP:BOOL=OFF -DCMAKE_VERBOSE_MAKEFILE:BOOL=TRUE -DUSE_FFMPEG:BOOL=ON -DUSE_SYSTEM_FFMPEG:BOOL=OFF -DFFmpeg_LIBRARY_avcodec:FILEPATH=/builddir/build/BUILD/ppsspp/ffmpeg/linux/x86_64/lib/libavcodec.so -DFFmpeg_LIBRARY_avformat:FILEPATH=/builddir/build/BUILD/ppsspp/ffmpeg/linux/x86_64/lib/libavformat.so -DFFmpeg_LIBRARY_avutil:FILEPATH=/builddir/build/BUILD/ppsspp/ffmpeg/linux/x86_64/lib/libavutil.so -DFFmpeg_LIBRARY_swresample:FILEPATH=/builddir/build/BUILD/ppsspp/ffmpeg/linux/x86_64/lib/libswresample.so -DFFmpeg_LIBRARY_swscale:FILEPATH=/builddir/build/BUILD/ppsspp/ffmpeg/linux/x86_64/lib/libswscale.so -DUSE_SYSTEM_LIBZIP:BOOL=ON -DUSE_SYSTEM_SNAPPY:BOOL=ON -DX86_64:BOOL=ON -DBUILD_TESTING:BOOL=OFF -DENABLE_GLSLANG_BINARIES:BOOL=OFF -DENABLE_HLSL:BOOL=OFF -DOPENGL_xmesa_INCLUDE_DIR:PATH= -DHEADLESS=OFF -DZLIB_INCLUDE_DIR:PATH=/usr/include -DPNG_PNG_INCLUDE_DIR:PATH=/usr/include

What happens

I received the following error by compiling PPSSPP-1.15* with Qt-5.15.9

[ 95%] Building CXX object CMakeFiles/PPSSPPQt.dir/Qt/QtMain.cpp.o
/usr/bin/g++ -DASSETS_DIR=\"/usr/share/ppsspp/assets/\" -DGLEW_NO_GLU -DGLSLANG_IS_SHARED_LIBRARY=1 -DMINIUPNPC_SET_SOCKET_TIMEOUT -DMINIUPNP_STATICLIB -DPNG_ARM_NEON_OPT=0 -DQT_CORE_LIB -DQT_GUI_LIB -DQT_MULTIMEDIA_LIB -DQT_NETWORK_LIB -DQT_NO_DEBUG -DQT_OPENGL_ES -DQT_OPENGL_ES_2 -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DSHARED_LIBZIP -DSHARED_ZLIB -DSTACK_LINE_READER_BUFFER_SIZE=1024 -DUSING_EGL -DUSING_GLES2 -DUSING_QT_UI -DVK_USE_PLATFORM_WAYLAND_KHR -DVK_USE_PLATFORM_XLIB_KHR -DWITH_UPNP -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE=1 -D_POSIX_C_SOURCE=200112L -D_XOPEN_SOURCE=700 -D_XOPEN_SOURCE_EXTENDED -D__BSD_VISIBLE=1 -D__LIBRETRO__ -D__STDC_CONSTANT_MACROS -I/builddir/build/BUILD/ppsspp/build2/PPSSPPQt_autogen/include -I/builddir/build/BUILD/ppsspp/ext/glslang -I/builddir/build/BUILD/ppsspp/ext/glew -I/builddir/build/BUILD/ppsspp -I/builddir/build/BUILD/ppsspp/ext/openxr -I/builddir/build/BUILD/ppsspp/Common -I/builddir/build/BUILD/ppsspp/Qt -I/builddir/build/BUILD/ppsspp/build2 -I/builddir/build/BUILD/ppsspp/ext/zstd/lib -I/builddir/build/BUILD/ppsspp/ext/cmake/cpu_features/../../cpu_features/include -I/builddir/build/BUILD/ppsspp/ext/glslang/glslang/.. -I/builddir/build/BUILD/ppsspp/build2/include -I/builddir/build/BUILD/ppsspp/ext/glslang/SPIRV/.. -I/builddir/build/BUILD/ppsspp/ext/SPIRV-Cross-build/../SPIRV-Cross -I/builddir/build/BUILD/ppsspp/ext/armips -I/builddir/build/BUILD/ppsspp/ext/armips/ext/tinyformat -I/builddir/build/BUILD/ppsspp/ext/armips/ext/filesystem/include -isystem /builddir/build/BUILD/ppsspp/ffmpeg/linux/x86_64/include -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtOpenGL -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtCore -isystem /usr/lib64/qt5/mkspecs/linux-g++ -isystem /usr/include/qt5/QtMultimedia -isystem /usr/include/qt5/QtNetwork -O2  -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64   -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer  -fPIC -lEGL -lGLESv2 -DNDEBUG -O2 -D_NDEBUG -std=gnu++17 -fPIE   -Wformat -Wno-multichar -msse2 -Wno-psabi -fPIC -fPIC -fno-strict-aliasing -MD -MT CMakeFiles/PPSSPPQt.dir/Qt/QtMain.cpp.o -MF CMakeFiles/PPSSPPQt.dir/Qt/QtMain.cpp.o.d -o CMakeFiles/PPSSPPQt.dir/Qt/QtMain.cpp.o -c /builddir/build/BUILD/ppsspp/Qt/QtMain.cpp
/builddir/build/BUILD/ppsspp/Qt/QtMain.cpp: In function 'void System_Notify(SystemNotification)':
/builddir/build/BUILD/ppsspp/Qt/QtMain.cpp:281:17: error: 'StopSDLAudioDevice' was not declared in this scope
  281 |                 StopSDLAudioDevice();
      |                 ^~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/ppsspp/Qt/QtMain.cpp:282:17: error: 'InitSDLAudioDevice' was not declared in this scope
  282 |                 InitSDLAudioDevice();
      |                 ^~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/ppsspp/Qt/QtMain.cpp: In member function 'virtual bool MainUI::event(QEvent*)':
/builddir/build/BUILD/ppsspp/Qt/QtMain.cpp:628:77: warning: 'int QWheelEvent::delta() const' is deprecated: Use angleDelta() [-Wdeprecated-declarations]
  628 |                 NativeKey(KeyInput(DEVICE_ID_MOUSE, ((QWheelEvent*)e)->delta()<0 ? NKCODE_EXT_MOUSEWHEEL_DOWN : NKCODE_EXT_MOUSEWHEEL_UP, KEY_DOWN));
      |                                                     ~~~~~~~~~~~~~~~~~~~~~~~~^~
In file included from /usr/include/qt5/QtGui/QTouchEvent:1,
                 from /builddir/build/BUILD/ppsspp/Qt/QtMain.h:4,
                 from /builddir/build/BUILD/ppsspp/Qt/QtMain.cpp:42:
/usr/include/qt5/QtGui/qevent.h:219:16: note: declared here
  219 |     inline int delta() const  { return qt4D; }
      |                ^~~~~
/builddir/build/BUILD/ppsspp/Qt/QtMain.cpp: In function 'int main(int, char**)':
/builddir/build/BUILD/ppsspp/Qt/QtMain.cpp:819:40: warning: 'Qt::AA_X11InitThreads' is deprecated [-Wdeprecated-declarations]
  819 |         QApplication::setAttribute(Qt::AA_X11InitThreads, true);
      |                                        ^~~~~~~~~~~~~~~~~
In file included from /usr/include/qt5/QtCore/qbytearray.h:45,
                 from /usr/include/qt5/QtCore/qstring.h:50,
                 from /usr/include/qt5/QtCore/qcoreapplication.h:44,
                 from /usr/include/qt5/QtWidgets/qapplication.h:44,
                 from /usr/include/qt5/QtWidgets/QApplication:1,
                 from /builddir/build/BUILD/ppsspp/Qt/QtMain.cpp:9:
/usr/include/qt5/QtCore/qnamespace.h:536:9: note: declared here
  536 |         AA_X11InitThreads Q_DECL_ENUMERATOR_DEPRECATED = 10,
      |         ^~~~~~~~~~~~~~~~~
In file included from /builddir/build/BUILD/ppsspp/Qt/QtMain.cpp:50:
/builddir/build/BUILD/ppsspp/Core/HW/Camera.h: At global scope:
/builddir/build/BUILD/ppsspp/Core/HW/Camera.h:48:39: warning: 'qt_viewfinder' defined but not used [-Wunused-variable]
   48 |         static QAbstractVideoSurface *qt_viewfinder;
      |                                       ^~~~~~~~~~~~~
/builddir/build/BUILD/ppsspp/Core/HW/Camera.h:47:25: warning: 'qt_camera' defined but not used [-Wunused-variable]
   47 |         static QCamera *qt_camera;
      |                         ^~~~~~~~~
/builddir/build/BUILD/ppsspp/Core/HW/Camera.h:46:27: warning: 'qtc_ideal_height' defined but not used [-Wunused-variable]
   46 |         static int        qtc_ideal_height;
      |                           ^~~~~~~~~~~~~~~~
/builddir/build/BUILD/ppsspp/Core/HW/Camera.h:45:27: warning: 'qtc_ideal_width' defined but not used [-Wunused-variable]
   45 |         static int        qtc_ideal_width;
      |                           ^~~~~~~~~~~~~~~
make[2]: *** [CMakeFiles/PPSSPPQt.dir/build.make:93: CMakeFiles/PPSSPPQt.dir/Qt/QtMain.cpp.o] Error 1

Full build log: https://koji.rpmfusion.org/kojifiles/work/tasks/6468/596468/build.log

PPSSPP version affected

1.15.2

Last working version

1.14.4

Checklist

hrydgard commented 1 year ago

Generally I would suggest not even bothering with the Qt version, it's unmaintained. Use the SDL version.

Of course, we should probably still try to fix or workaround this.

hrydgard commented 1 year ago

But yeah, the Qt build indeed seems broken right now, just tried to build it on Mac and got the same thing. I will fix it up soon.

unknownbrackets commented 1 year ago

I think it will build now, but I'd recommend installing SDL2-devel in any case.

-[Unknown]