gonetz / GLideN64

A new generation, open-source graphics plugin for N64 emulators.
Other
770 stars 177 forks source link

Conflicting -std flags can cause build failure #2604

Closed Tatsh closed 2 years ago

Tatsh commented 2 years ago

This is the case with the build here: https://github.com/gonetz/GLideN64/runs/4272927989?check_suite_focus=true even though it's on Windows.

The same principle applies with GCC 11. The flags come as -std=gnu++17 -std=c++11. I imagine this behaviour has changed since GCC 9 and the last flag is taken as the one to use. What is strange is if I prepend -std=c++14, the build works. In any case, only one flag should be present.

/usr/bin/x86_64-pc-linux-gnu-g++ -DMUPENPLUSAPI -DOS_LINUX -DTXFILTER_LIB -D__VEC4_OPT \
-Dmupen64plus_video_GLideN64_EXPORTS \
-I/var/tmp/portage/games-emulation/mupen64plus-video-gliden64-4.0_p20211120/work/GLideN64-1956f78234f634553ccb8e9e8323cbd67da549d9/src/. \
-I/var/tmp/portage/games-emulation/mupen64plus-video-gliden64-4.0_p20211120/work/GLideN64-1956f78234f634553ccb8e9e8323cbd67da549d9/src/inc \
-I/var/tmp/portage/games-emulation/mupen64plus-video-gliden64-4.0_p20211120/work/GLideN64-1956f78234f634553ccb8e9e8323cbd67da549d9/src/osal \
-I/var/tmp/portage/games-emulation/mupen64plus-video-gliden64-4.0_p20211120/work/GLideN64-1956f78234f634553ccb8e9e8323cbd67da549d9/src/GLideNHQ \
-I/usr/include/freetype2  -O2 -ggdb -march=native -mtune=native -pipe -ftree-vectorize -funswitch-loops \
-std=gnu++17 -std=c++11 \
-flto -fno-fat-lto-objects -fPIC -MD -MT CMakeFiles/mupen64plus-video-GLideN64.dir/Graphics/OpenGLContext/opengl_ContextImpl.cpp.o -MF CMakeFiles/mupen64plus-video-GLideN64.dir/Graphics/OpenGLContext/opengl_ContextImpl.cpp.o.d -o CMakeFiles/mupen64plus-video-GLideN64.dir/Graphics/OpenGLContext/opengl_ContextImpl.cpp.o -c /var/tmp/portage/games-emulation/mupen64plus-video-gliden64-4.0_p20211120/work/GLideN64-1956f78234f634553ccb8e9e8323cbd67da549d9/src/Graphics/OpenGLContext/opengl_ContextImpl.cpp
work/GLideN64-1956f78234f634553ccb8e9e8323cbd67da549d9/src/Graphics/OpenGLContext/opengl_ContextImpl.cpp: In member function ‘virtual void opengl::ContextImpl::resetCombinerProgramBuilder()’:
work/GLideN64-1956f78234f634553ccb8e9e8323cbd67da549d9/src/Graphics/OpenGLContext/opengl_ContextImpl.cpp:414:49: error: ‘make_unique’ is not a member of ‘std’
work/GLideN64-1956f78234f634553ccb8e9e8323cbd67da549d9/src/Graphics/OpenGLContext/opengl_ContextImpl.cpp:414:49: note: ‘std::make_unique’ is only available from C++14 onwards
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/11.2.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /var/tmp/portage/sys-devel/gcc-11.2.0/work/gcc-11.2.0/configure --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/11.2.0 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/11.2.0 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/11.2.0/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/11.2.0/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/include/g++-v11 --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/11.2.0/python --enable-languages=c,c++,fortran --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --enable-nls --without-included-gettext --disable-libunwind-exceptions --enable-checking=release --with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo 11.2.0 p1' --disable-esp --enable-libstdcxx-time --with-build-config=bootstrap-lto --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-multilib --with-multilib-list=m32,m64 --disable-fixed-point --enable-targets=all --enable-libgomp --disable-libssp --disable-libada --disable-systemtap --disable-valgrind-annotations --disable-vtable-verify --disable-libvtv --with-zstd --enable-lto --without-isl --enable-default-pie --enable-default-ssp
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.2.0 (Gentoo 11.2.0 p1)