Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build failure with gcc14 : PPCDebugInterface.cpp:196:8: error: ‘reverse’ is not a member of ‘std’ #328

Open
jeandestouches opened this issue May 27, 2024 · 2 comments

Comments

@jeandestouches
Copy link

Hello,
Build failure with gcc14 on my gentoo system. (No issues with gcc12)

Log:

FAILED: Source/Core/Core/CMakeFiles/core.dir/Debugger/PPCDebugInterface.cpp.o
/usr/bin/x86_64-pc-linux-gnu-g++ -DDATA_DIR="/usr/share/dolphin-emu/" -DFMT_SHARED -DHAVE_EGL=1 -DHAVE_HIDAPI=1 -DHAVE_LIBEVDEV=1 -DHAVE_LIBUDEV=1 -DHAVE_X11=1 -DHAVE_XRANDR=1 -DUSE_MEMORYWATCHER=1 -DUSE_PIPES=1 -D_ARCH_64=1 -D_DEFAULT_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_M_X86=1 -D_M_X86_64=1 -D__LIBRETRO__ -D__LIBUSB__ -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -I/var/tmp/portage/games-emulation/libretro-dolphin-9999-r2/work/libretro-dolphin-9999/Externals/curl/include -I/var/tmp/portage/games-emulation/libretro-dolphin-9999-r2/work/libretro-dolphin-9999/Source/Core -I/var/tmp/portage/games-emulation/libretro-dolphin-9999-r2/work/libretro-dolphin-9999/External/minizip -I/var/tmp/portage/games-emulation/libretro-dolphin-9999-r2/work/libretro-dolphin-9999/Externals/soundtouch -I/usr/include/libusb-1.0 -I/var/tmp/portage/games-emulation/libretro-dolphin-9999-r2/work/libretro-dolphin-9999/Externals/picojson -I/var/tmp/portage/games-emulation/libretro-dolphin-9999-r2/work/libretro-dolphin-9999_build/Source/Core -I/var/tmp/portage/games-emulation/libretro-dolphin-9999-r2/work/libretro-dolphin-9999/Externals/minizip/. -I/var/tmp/portage/games-emulation/libretro-dolphin-9999-r2/work/libretro-dolphin-9999/Externals/Bochs_disasm -isystem /usr/include/hidapi -march=bdver2 -O2 -pipe -std=c++17 -msse2 -fdiagnostics-color -Wall -Wtype-limits -Wsign-compare -Wignored-qualifiers -Wuninitialized -Wlogical-op -Wshadow -Winit-self -Wmissing-declarations -fno-strict-aliasing -fno-exceptions -fvisibility-inlines-hidden -fvisibility=hidden -fomit-frame-pointer -fpic -MD -MT Source/Core/Core/CMakeFiles/core.dir/Debugger/PPCDebugInterface.cpp.o -MF Source/Core/Core/CMakeFiles/core.dir/Debugger/PPCDebugInterface.cpp.o.d -o Source/Core/Core/CMakeFiles/core.dir/Debugger/PPCDebugInterface.cpp.o -c /var/tmp/portage/games-emulation/libretro-dolphin-9999-r2/work/libretro-dolphin-9999/Source/Core/Core/Debugger/PPCDebugInterface.cpp
/var/tmp/portage/games-emulation/libretro-dolphin-9999-r2/work/libretro-dolphin-9999/Source/Core/Core/Debugger/PPCDebugInterface.cpp: In member function ‘virtual Common::Debug::Threads PPCDebugInterface::GetThreads() const’:
/var/tmp/portage/games-emulation/libretro-dolphin-9999-r2/work/libretro-dolphin-9999/Source/Core/Core/Debugger/PPCDebugInterface.cpp:196:8: error: ‘reverse’ is not a member of ‘std’
196 | std::reverse(threads.begin(), threads.end());
| ^~~~~~~
[335/776] /usr/bin/x86_64-pc-linux-gnu-g++ -DDATA_DIR="/usr/share/dolphin-emu/" -DFMT_SHARED -DHAVE_EGL=1 -DHAVE_HIDAPI=1 -DHAVE_LIBEVDEV=1 -DHAVE_LIBUDEV=1 -DHAVE_X11=1 -DHAVE_XRANDR=1 -DUSE_MEMORYWATCHER=1 -DUSE_PIPES=1 -D_ARCH_64=1 -D_DEFAULT_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_M_X86=1 -D_M_X86_64=1 -D__LIBRETRO__ -D__LIBUSB__ -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -I/var/tmp/portage/games-emulation/libretro-dolphin-9999-r2/work/libretro-dolphin-9999/Externals/curl/include -I/var/tmp/portage/games-emulation/libretro-dolphin-9999-r2/work/libretro-dolphin-9999/Source/Core -I/var/tmp/portage/games-emulation/libretro-dolphin-9999-r2/work/libretro-dolphin-9999/External/minizip -I/var/tmp/portage/games-emulation/libretro-dolphin-9999-r2/work/libretro-dolphin-9999/Externals/soundtouch -I/usr/include/libusb-1.0 -I/var/tmp/portage/games-emulation/libretro-dolphin-9999-r2/work/libretro-dolphin-9999/Externals/picojson -I/var/tmp/portage/games-emulation/libretro-dolphin-9999-r2/work/libretro-dolphin-9999_build/Source/Core -I/var/tmp/portage/games-emulation/libretro-dolphin-9999-r2/work/libretro-dolphin-9999/Externals/minizip/. -I/var/tmp/portage/games-emulation/libretro-dolphin-9999-r2/work/libretro-dolphin-9999/Externals/Bochs_disasm -isystem /usr/include/hidapi -march=bdver2 -O2 -pipe -std=c++17 -msse2 -fdiagnostics-color -Wall -Wtype-limits -Wsign-compare -Wignored-qualifiers -Wuninitialized -Wlogical-op -Wshadow -Winit-self -Wmissing-declarations -fno-strict-aliasing -fno-exceptions -fvisibility-inlines-hidden -fvisibility=hidden -fomit-frame-pointer -fpic -MD -MT Source/Core/Core/CMakeFiles/core.dir/DSP/DSPCaptureLogger.cpp.o -MF Source/Core/Core/CMakeFiles/core.dir/DSP/DSPCaptureLogger.cpp.o.d -o Source/Core/Core/CMakeFiles/core.dir/DSP/DSPCaptureLogger.cpp.o -c /var/tmp/portage/games-emulation/libretro-dolphin-9999-r2/work/libretro-dolphin-9999/Source/Core/Core/DSP/DSPCaptureLogger.cpp
[336/776] /usr/bin/x86_64-pc-linux-gnu-g++ -DDATA_DIR="/usr/share/dolphin-emu/" -DFMT_SHARED -DHAVE_EGL=1 -DHAVE_HIDAPI=1 -DHAVE_LIBEVDEV=1 -DHAVE_LIBUDEV=1 -DHAVE_X11=1 -DHAVE_XRANDR=1 -DUSE_MEMORYWATCHER=1 -DUSE_PIPES=1 -D_ARCH_64=1 -D_DEFAULT_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_M_X86=1 -D_M_X86_64=1 -D__LIBRETRO__ -D__LIBUSB__ -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -I/var/tmp/portage/games-emulation/libretro-dolphin-9999-r2/work/libretro-dolphin-9999/Externals/curl/include -I/var/tmp/portage/games-emulation/libretro-dolphin-9999-r2/work/libretro-dolphin-9999/Source/Core -I/var/tmp/portage/games-emulation/libretro-dolphin-9999-r2/work/libretro-dolphin-9999/External/minizip -I/var/tmp/portage/games-emulation/libretro-dolphin-9999-r2/work/libretro-dolphin-9999/Externals/soundtouch -I/usr/include/libusb-1.0 -I/var/tmp/portage/games-emulation/libretro-dolphin-9999-r2/work/libretro-dolphin-9999/Externals/picojson -I/var/tmp/portage/games-emulation/libretro-dolphin-9999-r2/work/libretro-dolphin-9999_build/Source/Core -I/var/tmp/portage/games-emulation/libretro-dolphin-9999-r2/work/libretro-dolphin-9999/Externals/minizip/. -I/var/tmp/portage/games-emulation/libretro-dolphin-9999-r2/work/libretro-dolphin-9999/Externals/Bochs_disasm -isystem /usr/include/hidapi -march=bdver2 -O2 -pipe -std=c++17 -msse2 -fdiagnostics-color -Wall -Wtype-limits -Wsign-compare -Wignored-qualifiers -Wuninitialized -Wlogical-op -Wshadow -Winit-self -Wmissing-declarations -fno-strict-aliasing -fno-exceptions -fvisibility-inlines-hidden -fvisibility=hidden -fomit-frame-pointer -fpic -MD -MT Source/Core/Core/CMakeFiles/core.dir/Debugger/RSO.cpp.o -MF Source/Core/Core/CMakeFiles/core.dir/Debugger/RSO.cpp.o.d -o Source/Core/Core/CMakeFiles/core.dir/Debugger/RSO.cpp.o -c /var/tmp/portage/games-emulation/libretro-dolphin-9999-r2/work/libretro-dolphin-9999/Source/Core/Core/Debugger/RSO.cpp
[337/776] /usr/bin/x86_64-pc-linux-gnu-g++ -DDATA_DIR="/usr/share/dolphin-emu/" -DFMT_SHARED -DHAVE_EGL=1 -DHAVE_HIDAPI=1 -DHAVE_LIBEVDEV=1 -DHAVE_LIBUDEV=1 -DHAVE_X11=1 -DHAVE_XRANDR=1 -DUSE_MEMORYWATCHER=1 -DUSE_PIPES=1 -D_ARCH_64=1 -D_DEFAULT_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_M_X86=1 -D_M_X86_64=1 -D__LIBRETRO__ -D__LIBUSB__ -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -I/var/tmp/portage/games-emulation/libretro-dolphin-9999-r2/work/libretro-dolphin-9999/Externals/curl/include -I/var/tmp/portage/games-emulation/libretro-dolphin-9999-r2/work/libretro-dolphin-9999/Source/Core -I/var/tmp/portage/games-emulation/libretro-dolphin-9999-r2/work/libretro-dolphin-9999/External/minizip -I/var/tmp/portage/games-emulation/libretro-dolphin-9999-r2/work/libretro-dolphin-9999/Externals/soundtouch -I/usr/include/libusb-1.0 -I/var/tmp/portage/games-emulation/libretro-dolphin-9999-r2/work/libretro-dolphin-9999/Externals/picojson -I/var/tmp/portage/games-emulation/libretro-dolphin-9999-r2/work/libretro-dolphin-9999_build/Source/Core -I/var/tmp/portage/games-emulation/libretro-dolphin-9999-r2/work/libretro-dolphin-9999/Externals/minizip/. -I/var/tmp/portage/games-emulation/libretro-dolphin-9999-r2/work/libretro-dolphin-9999/Externals/Bochs_disasm -isystem /usr/include/hidapi -march=bdver2 -O2 -pipe -std=c++17 -msse2 -fdiagnostics-color -Wall -Wtype-limits -Wsign-compare -Wignored-qualifiers -Wuninitialized -Wlogical-op -Wshadow -Winit-self -Wmissing-declarations -fno-strict-aliasing -fno-exceptions -fvisibility-inlines-hidden -fvisibility=hidden -fomit-frame-pointer -fpic -MD -MT Source/Core/Core/CMakeFiles/core.dir/DSP/DSPCodeUtil.cpp.o -MF Source/Core/Core/CMakeFiles/core.dir/DSP/DSPCodeUtil.cpp.o.d -o Source/Core/Core/CMakeFiles/core.dir/DSP/DSPCodeUtil.cpp.o -c /var/tmp/portage/games-emulation/libretro-dolphin-9999-r2/work/libretro-dolphin-9999/Source/Core/Core/DSP/DSPCodeUtil.cpp
[338/776] /usr/bin/x86_64-pc-linux-gnu-g++ -DDATA_DIR="/usr/share/dolphin-emu/" -DFMT_SHARED -DHAVE_EGL=1 -DHAVE_HIDAPI=1 -DHAVE_LIBEVDEV=1 -DHAVE_LIBUDEV=1 -DHAVE_X11=1 -DHAVE_XRANDR=1 -DUSE_MEMORYWATCHER=1 -DUSE_PIPES=1 -D_ARCH_64=1 -D_DEFAULT_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_M_X86=1 -D_M_X86_64=1 -D__LIBRETRO__ -D__LIBUSB__ -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -I/var/tmp/portage/games-emulation/libretro-dolphin-9999-r2/work/libretro-dolphin-9999/Externals/curl/include -I/var/tmp/portage/games-emulation/libretro-dolphin-9999-r2/work/libretro-dolphin-9999/Source/Core -I/var/tmp/portage/games-emulation/libretro-dolphin-9999-r2/work/libretro-dolphin-9999/External/minizip -I/var/tmp/portage/games-emulation/libretro-dolphin-9999-r2/work/libretro-dolphin-9999/Externals/soundtouch -I/usr/include/libusb-1.0 -I/var/tmp/portage/games-emulation/libretro-dolphin-9999-r2/work/libretro-dolphin-9999/Externals/picojson -I/var/tmp/portage/games-emulation/libretro-dolphin-9999-r2/work/libretro-dolphin-9999_build/Source/Core -I/var/tmp/portage/games-emulation/libretro-dolphin-9999-r2/work/libretro-dolphin-9999/Externals/minizip/. -I/var/tmp/portage/games-emulation/libretro-dolphin-9999-r2/work/libretro-dolphin-9999/Externals/Bochs_disasm -isystem /usr/include/hidapi -march=bdver2 -O2 -pipe -std=c++17 -msse2 -fdiagnostics-color -Wall -Wtype-limits -Wsign-compare -Wignored-qualifiers -Wuninitialized -Wlogical-op -Wshadow -Winit-self -Wmissing-declarations -fno-strict-aliasing -fno-exceptions -fvisibility-inlines-hidden -fvisibility=hidden -fomit-frame-pointer -fpic -MD -MT Source/Core/Core/CMakeFiles/core.dir/DSP/DSPAssembler.cpp.o -MF Source/Core/Core/CMakeFiles/core.dir/DSP/DSPAssembler.cpp.o.d -o Source/Core/Core/CMakeFiles/core.dir/DSP/DSPAssembler.cpp.o -c /var/tmp/portage/games-emulation/libretro-dolphin-9999-r2/work/libretro-dolphin-9999/Source/Core/Core/DSP/DSPAssembler.cpp
ninja: build stopped: subcommand failed.

@Shoegzer
Copy link

Encountered here too, using gcc-14 on linux Mint 22. No issues with gcc-13.

@hunterk any thoughts on this? You usually have a good handle on the cause of these kinds of issues.

@hizzlekizzle
Copy link

from Porting to GCC-14 doc:

C++ language issues
Header dependency changes

Some C++ Standard Library headers have been changed to no longer include other headers that were being used internally by the library. As such, C++ programs that used standard library components without including the right headers will no longer compile.

The following headers are used less widely in libstdc++ and may need to be included explicitly when compiling with GCC 14:

<algorithm> (for std::copy_n, std::find_if, std::lower_bound, std::remove, std::reverse, std::sort etc.)
<cstdint> (for std::int8_t, std::int32_t etc.)

So, looks like it needs to be explicitly included now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants