Bug Tracker – Full Text Bug Listing

Bug 1311

Summary: wxGTK version 3.0.4 headers require ISO C++ 2011 standard, but Odamex sets 2003 standard by default
Product: Odamex Reporter: William Breathitt Gray <vilhelm.gray>
Component: LauncherAssignee: Odamex Bug Reporter <odamex-bug-reporter>
Status: NEW ---    
Severity: normal CC: mwoodj, vain
Priority: P5    
Version: 0.8.x   
Hardware: x86 (Windows, Linux, etc)   
OS: Linux   

Description William Breathitt Gray 2020-05-11 16:20:55 UTC
The following errors occur when trying to build Odamex version 0.8.3 release with wxGTK version 3.0.4:

In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/include/g++-v9/type_traits:35,
                 from /usr/include/wx-3.0-gtk3/wx/strvararg.h:25,
                 from /usr/include/wx-3.0-gtk3/wx/string.h:46,
                 from /usr/include/wx-3.0-gtk3/wx/memory.h:15,
                 from /usr/include/wx-3.0-gtk3/wx/object.h:19,
                 from /usr/include/wx-3.0-gtk3/wx/event.h:16,
                 from /usr/include/wx-3.0-gtk3/wx/window.h:18,
                 from /tmp/odamex/odalaunch/src/ctrl_infobar.h:27,
                 from /tmp/odamex/odalaunch/src/ctrl_infobar.cpp:24:
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/include/g++-v9/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
   32 | #error This file requires compiler and library support \
      |  ^~~~~
In file included from /usr/include/wx-3.0-gtk3/wx/string.h:46,
                 from /usr/include/wx-3.0-gtk3/wx/memory.h:15,
                 from /usr/include/wx-3.0-gtk3/wx/object.h:19,
                 from /usr/include/wx-3.0-gtk3/wx/event.h:16,
                 from /usr/include/wx-3.0-gtk3/wx/window.h:18,
                 from /tmp/odamex/odalaunch/src/ctrl_infobar.h:27,
                 from /tmp/odamex/odalaunch/src/ctrl_infobar.cpp:24:
/usr/include/wx-3.0-gtk3/wx/strvararg.h:350:18: error: ‘is_enum’ in namespace ‘std’ does not name a template type; did you mean ‘isalnum’?
  350 |     typedef std::is_enum<T> is_enum;
      |                  ^~~~~~~
      |                  isalnum
/usr/include/wx-3.0-gtk3/wx/strvararg.h:354:54: error: ‘is_enum’ was not declared in this scope; did you mean ‘isalnum’?
  354 |     enum { value = wxFormatStringSpecifierNonPodType<is_enum::value>::value };
      |                                                      ^~~~~~~
      |                                                      isalnum
/usr/include/wx-3.0-gtk3/wx/strvararg.h:354:68: error: template argument 1 is invalid
  354 |     enum { value = wxFormatStringSpecifierNonPodType<is_enum::value>::value };
      |                                                                    ^
make[2]: *** [odalaunch/CMakeFiles/odalaunch.dir/build.make:152: odalaunch/CMakeFiles/odalaunch.dir/src/ctrl_infobar.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:407: odalaunch/CMakeFiles/odalaunch.dir/all] Error 2
make: *** [Makefile:172: all] Error 2
Comment 1 vain 2020-05-13 11:57:23 UTC
I have same issue with 0.8.3 release when building Launcher.
0.8.2 version builds just fine with wxGTK 3.0.4
Comment 2 William Breathitt Gray 2020-05-13 13:14:07 UTC
One solution might be to disable the C++ 2003 standard requirement in CMake for just the odalaunch files and allow them to compile under the C++ 2011 standard. Is the C++ 2003 standard requirement necessary for odalaunch?
Comment 3 vain 2020-05-13 16:41:17 UTC
Seems to be working. Throws lot of different warnings, but compiles successfully and looks like it's running with no issue.
Comment 4 Mike Wood 2020-08-25 17:15:54 UTC
This issue is addressed by this commit https://github.com/odamex/odamex/commit/1f8182a2966019b4a3cc07765099177b0fef3bbe