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

libsiedler2 fails to compile with gcc-13 #20

Closed
stefson opened this issue Jan 22, 2023 · 0 comments · Fixed by #21 or Return-To-The-Roots/s25client#1548
Closed

libsiedler2 fails to compile with gcc-13 #20

stefson opened this issue Jan 22, 2023 · 0 comments · Fixed by #21 or Return-To-The-Roots/s25client#1548

Comments

@stefson
Copy link
Contributor

stefson commented Jan 22, 2023

hey there, I tested a gcc-13 snapshot and get these errors:

[93/563] /usr/bin/armv7a-unknown-linux-gnueabihf-g++ -DBOOST_ATOMIC_DYN_LINK -DBOOST_ATOMIC_NO_LIB -DBOOST_FILESYSTEM_DYN_LINK -DBOOST_FILESYSTEM_NO_LIB -DBOOST_IOSTREAMS_DYN_LINK -DBOOST_IOSTREAMS_NO_LIB -DBOOST_NOWIDE_DYN_LINK -DBOOST_NOWIDE_NO_LIB -I/var/tmp/portage/games-strategy/s25rttr-0.9.5/work/s25client_v0.9.5/external/libsiedler2/include/libsiedler2 -I/var/tmp/portage/games-strategy/s25rttr-0.9.5/work/s25client_v0.9.5/external/libutil/libs/common/include -I/var/tmp/portage/games-strategy/s25rttr-0.9.5/work/s25client_v0.9.5/external/libendian/include  -O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard -fvisibility=hidden -fvisibility-inlines-hidden -Wall -pedantic -Wextra -fno-strict-aliasing -pedantic-errors -Wcast-qual -Wdisabled-optimization -Wfloat-conversion -Wformat-nonliteral -Wformat-security -Wformat=2 -Wimport -Winit-self -Wlogical-op -Wmissing-declarations -Wmissing-field-initializers -Wmissing-format-attribute -Wmissing-include-dirs -Wmissing-noreturn -Wpacked -Wparentheses -Wpedantic -Wpointer-arith -Wstrict-aliasing=2 -Wundef -Wunused -Wunused-parameter -Wwrite-strings -Wno-unknown-pragmas -Wctor-dtor-privacy -Wnoexcept -Woverloaded-virtual -Wstrict-null-sentinel -Wno-maybe-uninitialized -Wredundant-decls -Wsuggest-override -Wno-error=suggest-override -Wunreachable-code -MD -MT external/libsiedler2/CMakeFiles/siedler2.dir/src/oem.cpp.o -MF external/libsiedler2/CMakeFiles/siedler2.dir/src/oem.cpp.o.d -o external/libsiedler2/CMakeFiles/siedler2.dir/src/oem.cpp.o -c /var/tmp/portage/games-strategy/s25rttr-0.9.5/work/s25client_v0.9.5/external/libsiedler2/src/oem.cpp
FAILED: external/libsiedler2/CMakeFiles/siedler2.dir/src/oem.cpp.o 
/usr/bin/armv7a-unknown-linux-gnueabihf-g++ -DBOOST_ATOMIC_DYN_LINK -DBOOST_ATOMIC_NO_LIB -DBOOST_FILESYSTEM_DYN_LINK -DBOOST_FILESYSTEM_NO_LIB -DBOOST_IOSTREAMS_DYN_LINK -DBOOST_IOSTREAMS_NO_LIB -DBOOST_NOWIDE_DYN_LINK -DBOOST_NOWIDE_NO_LIB -I/var/tmp/portage/games-strategy/s25rttr-0.9.5/work/s25client_v0.9.5/external/libsiedler2/include/libsiedler2 -I/var/tmp/portage/games-strategy/s25rttr-0.9.5/work/s25client_v0.9.5/external/libutil/libs/common/include -I/var/tmp/portage/games-strategy/s25rttr-0.9.5/work/s25client_v0.9.5/external/libendian/include  -O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard -fvisibility=hidden -fvisibility-inlines-hidden -Wall -pedantic -Wextra -fno-strict-aliasing -pedantic-errors -Wcast-qual -Wdisabled-optimization -Wfloat-conversion -Wformat-nonliteral -Wformat-security -Wformat=2 -Wimport -Winit-self -Wlogical-op -Wmissing-declarations -Wmissing-field-initializers -Wmissing-format-attribute -Wmissing-include-dirs -Wmissing-noreturn -Wpacked -Wparentheses -Wpedantic -Wpointer-arith -Wstrict-aliasing=2 -Wundef -Wunused -Wunused-parameter -Wwrite-strings -Wno-unknown-pragmas -Wctor-dtor-privacy -Wnoexcept -Woverloaded-virtual -Wstrict-null-sentinel -Wno-maybe-uninitialized -Wredundant-decls -Wsuggest-override -Wno-error=suggest-override -Wunreachable-code -MD -MT external/libsiedler2/CMakeFiles/siedler2.dir/src/oem.cpp.o -MF external/libsiedler2/CMakeFiles/siedler2.dir/src/oem.cpp.o.d -o external/libsiedler2/CMakeFiles/siedler2.dir/src/oem.cpp.o -c /var/tmp/portage/games-strategy/s25rttr-0.9.5/work/s25client_v0.9.5/external/libsiedler2/src/oem.cpp
/var/tmp/portage/games-strategy/s25rttr-0.9.5/work/s25client_v0.9.5/external/libsiedler2/src/oem.cpp:11:25: error: ‘uint8_t’ was not declared in this scope
   11 | static const std::array<uint8_t, 128> ansi2oem_tab = {
      |                         ^~~~~~~
/var/tmp/portage/games-strategy/s25rttr-0.9.5/work/s25client_v0.9.5/external/libsiedler2/src/oem.cpp:7:1: note: ‘uint8_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
    6 | #include <array>
  +++ |+#include <cstdint>
    7 | 
/var/tmp/portage/games-strategy/s25rttr-0.9.5/work/s25client_v0.9.5/external/libsiedler2/src/oem.cpp:11:37: error: template argument 1 is invalid
   11 | static const std::array<uint8_t, 128> ansi2oem_tab = {
      |                                     ^
/var/tmp/portage/games-strategy/s25rttr-0.9.5/work/s25client_v0.9.5/external/libsiedler2/src/oem.cpp:11:39: error: scalar object ‘libsiedler2::ansi2oem_tab’ requires one element in initializer
   11 | static const std::array<uint8_t, 128> ansi2oem_tab = {
      |                                       ^~~~~~~~~~~~
/var/tmp/portage/games-strategy/s25rttr-0.9.5/work/s25client_v0.9.5/external/libsiedler2/src/oem.cpp: In function ‘std::string libsiedler2::AnsiToOem(const std::string&)’:
/var/tmp/portage/games-strategy/s25rttr-0.9.5/work/s25client_v0.9.5/external/libsiedler2/src/oem.cpp:37:9: error: ‘uint32_t’ was not declared in this scope
   37 |     for(uint32_t x = 0; x < from.size(); x++)
      |         ^~~~~~~~
/var/tmp/portage/games-strategy/s25rttr-0.9.5/work/s25client_v0.9.5/external/libsiedler2/src/oem.cpp:37:9: note: ‘uint32_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
/var/tmp/portage/games-strategy/s25rttr-0.9.5/work/s25client_v0.9.5/external/libsiedler2/src/oem.cpp:37:25: error: ‘x’ was not declared in this scope
   37 |     for(uint32_t x = 0; x < from.size(); x++)
      |                         ^
/var/tmp/portage/games-strategy/s25rttr-0.9.5/work/s25client_v0.9.5/external/libsiedler2/src/oem.cpp:39:19: error: ‘uint8_t’ was not declared in this scope
   39 |         auto C = (uint8_t)from[x];
      |                   ^~~~~~~
/var/tmp/portage/games-strategy/s25rttr-0.9.5/work/s25client_v0.9.5/external/libsiedler2/src/oem.cpp:39:19: note: ‘uint8_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
/var/tmp/portage/games-strategy/s25rttr-0.9.5/work/s25client_v0.9.5/external/libsiedler2/src/oem.cpp: In function ‘std::string libsiedler2::OemToAnsi(const std::string&)’:
/var/tmp/portage/games-strategy/s25rttr-0.9.5/work/s25client_v0.9.5/external/libsiedler2/src/oem.cpp:65:9: error: ‘uint32_t’ was not declared in this scope
   65 |     for(uint32_t x = 0; x < from.size(); ++x)
      |         ^~~~~~~~
/var/tmp/portage/games-strategy/s25rttr-0.9.5/work/s25client_v0.9.5/external/libsiedler2/src/oem.cpp:65:9: note: ‘uint32_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
/var/tmp/portage/games-strategy/s25rttr-0.9.5/work/s25client_v0.9.5/external/libsiedler2/src/oem.cpp:65:25: error: ‘x’ was not declared in this scope
   65 |     for(uint32_t x = 0; x < from.size(); ++x)
      |                         ^
/var/tmp/portage/games-strategy/s25rttr-0.9.5/work/s25client_v0.9.5/external/libsiedler2/src/oem.cpp:67:13: error: ‘uint8_t’ was not declared in this scope
   67 |         if((uint8_t)from[x] > 128)
      |             ^~~~~~~
/var/tmp/portage/games-strategy/s25rttr-0.9.5/work/s25client_v0.9.5/external/libsiedler2/src/oem.cpp:67:13: note: ‘uint8_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
/var/tmp/portage/games-strategy/s25rttr-0.9.5/work/s25client_v0.9.5/external/libsiedler2/src/oem.cpp:67:21: error: expected ‘)’ before ‘from’
   67 |         if((uint8_t)from[x] > 128)
      |           ~         ^~~~
      |                     )
/var/tmp/portage/games-strategy/s25rttr-0.9.5/work/s25client_v0.9.5/external/libsiedler2/src/oem.cpp:71:29: error: expected ‘)’ before ‘from’
   71 |                 if((uint8_t)from[x] == ansi2oem_tab[i - 0x80])
      |                   ~         ^~~~
      |                             )
[94/563] /usr/bin/armv7a-unknown-linux-gnueabihf-g++ -DBOOST_ATOMIC_DYN_LINK -DBOOST_ATOMIC_NO_LIB -DBOOST_FILESYSTEM_DYN_LINK -DBOOST_FILESYSTEM_NO_LIB -DBOOST_IOSTREAMS_DYN_LINK -DBOOST_IOSTREAMS_NO_LIB -DBOOST_NOWIDE_DYN_LINK -DBOOST_NOWIDE_NO_LIB -I/var/tmp/portage/games-strategy/s25rttr-0.9.5/work/s25client_v0.9.5/external/libsiedler2/include/libsiedler2 -I/var/tmp/portage/games-strategy/s25rttr-0.9.5/work/s25client_v0.9.5/external/libutil/libs/common/include -I/var/tmp/portage/games-strategy/s25rttr-0.9.5/work/s25client_v0.9.5/external/libendian/include  -O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard -fvisibility=hidden -fvisibility-inlines-hidden -Wall -pedantic -Wextra -fno-strict-aliasing -pedantic-errors -Wcast-qual -Wdisabled-optimization -Wfloat-conversion -Wformat-nonliteral -Wformat-security -Wformat=2 -Wimport -Winit-self -Wlogical-op -Wmissing-declarations -Wmissing-field-initializers -Wmissing-format-attribute -Wmissing-include-dirs -Wmissing-noreturn -Wpacked -Wparentheses -Wpedantic -Wpointer-arith -Wstrict-aliasing=2 -Wundef -Wunused -Wunused-parameter -Wwrite-strings -Wno-unknown-pragmas -Wctor-dtor-privacy -Wnoexcept -Woverloaded-virtual -Wstrict-null-sentinel -Wno-maybe-uninitialized -Wredundant-decls -Wsuggest-override -Wno-error=suggest-override -Wunreachable-code -MD -MT external/libsiedler2/CMakeFiles/siedler2.dir/src/libsiedler2.cpp.o -MF external/libsiedler2/CMakeFiles/siedler2.dir/src/libsiedler2.cpp.o.d -o external/libsiedler2/CMakeFiles/siedler2.dir/src/libsiedler2.cpp.o -c /var/tmp/portage/games-strategy/s25rttr-0.9.5/work/s25client_v0.9.5/external/libsiedler2/src/libsiedler2.cpp
ninja: build stopped: subcommand failed.

full build log is here: s25rttr-gcc-13-build.log.gz

I know that you're unable to fix this before you can install gcc-13.0.1 from your gcc-ppa, yet I still decided to report it to you now, so that you're aware of the breakage.

Good news is: no breakage with boost-1.80.0

Flow86 pushed a commit that referenced this issue Jan 26, 2023
GCC 13 (as usual for new compiler releases) shuffles around some
internal includes and so <cstdint> etc is no longer transitively included.

See https://www.gnu.org/software/gcc/gcc-13/porting_to.html.

Closes: #20
Bug: https://bugs.gentoo.org/891713
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

Successfully merging a pull request may close this issue.

1 participant