#6800 closed defect (fixed)

[Arch Linux]: AtlasUI build fails with uint8_t and invalid type errors.

Reported by: Caleb Marshall Owned by: phosit
Priority: Must Have Milestone: Alpha 27
Component: Build & Packages Keywords: AtlasUI
Cc: Patch: https://code.wildfiregames.com/D4997

Description

Building on an Arch Linux system, I get the following error:

Command:

[caleb@NerdTop gcc]$ make -j4

Error:

==== Building AtlasUI (release) ====
MapDialog.cpp
MapResizeDialog.cpp
PseudoMiniMapPanel.cpp
AtlasDialog.cpp
In file included from /usr/include/boost/preprocessor/variadic/elem.hpp:102,
                 from /usr/include/boost/preprocessor/tuple/elem.hpp:23,
                 from ../../../source/tools/atlas/GameInterface/MessagesSetup.h:109,
                 from ../../../source/tools/atlas/GameInterface/Messages.h:22,
                 from ../../../source/tools/atlas/AtlasUI/CustomControls/MapDialog/MapDialog.cpp:23:
../../../source/tools/atlas/GameInterface/Messages.h:215:31: error: ‘uint8_t’ was not declared in this scope
  215 |                 ((std::vector<uint8_t>, imageBytes))
      |                               ^~~~~~~
../../../source/tools/atlas/GameInterface/MessagesSetup.h:120:48: note: in expansion of macro ‘B_TYPE’
  120 | #define B_MEMBERS(r, data, n, elem) Shareable< B_TYPE(elem) > B_NAME(elem);
      |                                                ^~~~~~
/usr/include/boost/preprocessor/seq/for_each_i.hpp:85:66: note: in expansion of macro ‘B_MEMBERS’
   85 | # define BOOST_PP_SEQ_FOR_EACH_I_M_I(r, macro, data, seq, i, sz) macro(r, data, i, BOOST_PP_SEQ_HEAD(seq))
      |                                                                  ^~~~~
/usr/include/boost/preprocessor/control/iif.hpp:32:31: note: in expansion of macro ‘QUERY_WITHOUT_INPUTS’
   32 | # define BOOST_PP_IIF_1(t, f) t
      |                               ^
../../../source/tools/atlas/GameInterface/Messages.h:212:1: note: in expansion of macro ‘QUERY’
  212 | QUERY(RasterizeMinimap,
      | ^~~~~
../../../source/tools/atlas/GameInterface/Messages.h:23:1: note: ‘uint8_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
   22 | #include "MessagesSetup.h"
  +++ |+#include <cstdint>
   23 | #endif
../../../source/tools/atlas/GameInterface/Messages.h:215:38: error: template argument 1 is invalid
  215 |                 ((std::vector<uint8_t>, imageBytes))
      |                                      ^
../../../source/tools/atlas/GameInterface/MessagesSetup.h:120:48: note: in expansion of macro ‘B_TYPE’
  120 | #define B_MEMBERS(r, data, n, elem) Shareable< B_TYPE(elem) > B_NAME(elem);
      |                                                ^~~~~~
/usr/include/boost/preprocessor/seq/for_each_i.hpp:85:66: note: in expansion of macro ‘B_MEMBERS’
   85 | # define BOOST_PP_SEQ_FOR_EACH_I_M_I(r, macro, data, seq, i, sz) macro(r, data, i, BOOST_PP_SEQ_HEAD(seq))
      |                                                                  ^~~~~
/usr/include/boost/preprocessor/control/iif.hpp:32:31: note: in expansion of macro ‘QUERY_WITHOUT_INPUTS’
   32 | # define BOOST_PP_IIF_1(t, f) t
      |                               ^
../../../source/tools/atlas/GameInterface/Messages.h:212:1: note: in expansion of macro ‘QUERY’
  212 | QUERY(RasterizeMinimap,
      | ^~~~~
../../../source/tools/atlas/GameInterface/Messages.h:215:38: error: template argument 2 is invalid
  215 |                 ((std::vector<uint8_t>, imageBytes))
      |                                      ^
../../../source/tools/atlas/GameInterface/MessagesSetup.h:120:48: note: in expansion of macro ‘B_TYPE’
  120 | #define B_MEMBERS(r, data, n, elem) Shareable< B_TYPE(elem) > B_NAME(elem);
      |                                                ^~~~~~
/usr/include/boost/preprocessor/seq/for_each_i.hpp:85:66: note: in expansion of macro ‘B_MEMBERS’
   85 | # define BOOST_PP_SEQ_FOR_EACH_I_M_I(r, macro, data, seq, i, sz) macro(r, data, i, BOOST_PP_SEQ_HEAD(seq))
      |                                                                  ^~~~~
/usr/include/boost/preprocessor/control/iif.hpp:32:31: note: in expansion of macro ‘QUERY_WITHOUT_INPUTS’
   32 | # define BOOST_PP_IIF_1(t, f) t
      |                               ^
../../../source/tools/atlas/GameInterface/Messages.h:212:1: note: in expansion of macro ‘QUERY’
  212 | QUERY(RasterizeMinimap,
      | ^~~~~
../../../source/tools/atlas/GameInterface/MessagesSetup.h:120:61: error: template argument 1 is invalid
  120 | #define B_MEMBERS(r, data, n, elem) Shareable< B_TYPE(elem) > B_NAME(elem);
      |                                                             ^
/usr/include/boost/preprocessor/seq/for_each_i.hpp:85:66: note: in expansion of macro ‘B_MEMBERS’
   85 | # define BOOST_PP_SEQ_FOR_EACH_I_M_I(r, macro, data, seq, i, sz) macro(r, data, i, BOOST_PP_SEQ_HEAD(seq))
      |                                                                  ^~~~~
/usr/include/boost/preprocessor/control/iif.hpp:32:31: note: in expansion of macro ‘QUERY_WITHOUT_INPUTS’
   32 | # define BOOST_PP_IIF_1(t, f) t
      |                               ^
../../../source/tools/atlas/GameInterface/Messages.h:212:1: note: in expansion of macro ‘QUERY’
  212 | QUERY(RasterizeMinimap,
      | ^~~~~
make[1]: *** [AtlasUI.make:255: obj/AtlasUI_Release/MapDialog.o] Error 1
make[1]: *** Waiting for unfinished jobs....
In file included from /usr/include/boost/preprocessor/variadic/elem.hpp:102,
                 from /usr/include/boost/preprocessor/tuple/elem.hpp:23,
                 from ../../../source/tools/atlas/GameInterface/MessagesSetup.h:109,
                 from ../../../source/tools/atlas/GameInterface/Messages.h:22,
                 from ../../../source/tools/atlas/AtlasUI/CustomControls/MapResizeDialog/PseudoMiniMapPanel.cpp:23:
../../../source/tools/atlas/GameInterface/Messages.h:215:31: error: ‘uint8_t’ was not declared in this scope
  215 |                 ((std::vector<uint8_t>, imageBytes))
      |                               ^~~~~~~
../../../source/tools/atlas/GameInterface/MessagesSetup.h:120:48: note: in expansion of macro ‘B_TYPE’
  120 | #define B_MEMBERS(r, data, n, elem) Shareable< B_TYPE(elem) > B_NAME(elem);
      |                                                ^~~~~~
/usr/include/boost/preprocessor/seq/for_each_i.hpp:85:66: note: in expansion of macro ‘B_MEMBERS’
   85 | # define BOOST_PP_SEQ_FOR_EACH_I_M_I(r, macro, data, seq, i, sz) macro(r, data, i, BOOST_PP_SEQ_HEAD(seq))
      |                                                                  ^~~~~
/usr/include/boost/preprocessor/control/iif.hpp:32:31: note: in expansion of macro ‘QUERY_WITHOUT_INPUTS’
   32 | # define BOOST_PP_IIF_1(t, f) t
      |                               ^
../../../source/tools/atlas/GameInterface/Messages.h:212:1: note: in expansion of macro ‘QUERY’
  212 | QUERY(RasterizeMinimap,
      | ^~~~~
../../../source/tools/atlas/GameInterface/Messages.h:23:1: note: ‘uint8_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
   22 | #include "MessagesSetup.h"
  +++ |+#include <cstdint>
   23 | #endif
../../../source/tools/atlas/GameInterface/Messages.h:215:38: error: template argument 1 is invalid
  215 |                 ((std::vector<uint8_t>, imageBytes))
      |                                      ^
../../../source/tools/atlas/GameInterface/MessagesSetup.h:120:48: note: in expansion of macro ‘B_TYPE’
  120 | #define B_MEMBERS(r, data, n, elem) Shareable< B_TYPE(elem) > B_NAME(elem);
      |                                                ^~~~~~
/usr/include/boost/preprocessor/seq/for_each_i.hpp:85:66: note: in expansion of macro ‘B_MEMBERS’
   85 | # define BOOST_PP_SEQ_FOR_EACH_I_M_I(r, macro, data, seq, i, sz) macro(r, data, i, BOOST_PP_SEQ_HEAD(seq))
      |                                                                  ^~~~~
/usr/include/boost/preprocessor/control/iif.hpp:32:31: note: in expansion of macro ‘QUERY_WITHOUT_INPUTS’
   32 | # define BOOST_PP_IIF_1(t, f) t
      |                               ^
../../../source/tools/atlas/GameInterface/Messages.h:212:1: note: in expansion of macro ‘QUERY’
  212 | QUERY(RasterizeMinimap,
      | ^~~~~
../../../source/tools/atlas/GameInterface/Messages.h:215:38: error: template argument 2 is invalid
  215 |                 ((std::vector<uint8_t>, imageBytes))
      |                                      ^
../../../source/tools/atlas/GameInterface/MessagesSetup.h:120:48: note: in expansion of macro ‘B_TYPE’
  120 | #define B_MEMBERS(r, data, n, elem) Shareable< B_TYPE(elem) > B_NAME(elem);
      |                                                ^~~~~~
/usr/include/boost/preprocessor/seq/for_each_i.hpp:85:66: note: in expansion of macro ‘B_MEMBERS’
   85 | # define BOOST_PP_SEQ_FOR_EACH_I_M_I(r, macro, data, seq, i, sz) macro(r, data, i, BOOST_PP_SEQ_HEAD(seq))
      |                                                                  ^~~~~
/usr/include/boost/preprocessor/control/iif.hpp:32:31: note: in expansion of macro ‘QUERY_WITHOUT_INPUTS’
   32 | # define BOOST_PP_IIF_1(t, f) t
      |                               ^
../../../source/tools/atlas/GameInterface/Messages.h:212:1: note: in expansion of macro ‘QUERY’
  212 | QUERY(RasterizeMinimap,
      | ^~~~~
../../../source/tools/atlas/GameInterface/MessagesSetup.h:120:61: error: template argument 1 is invalid
  120 | #define B_MEMBERS(r, data, n, elem) Shareable< B_TYPE(elem) > B_NAME(elem);
      |                                                             ^
/usr/include/boost/preprocessor/seq/for_each_i.hpp:85:66: note: in expansion of macro ‘B_MEMBERS’
   85 | # define BOOST_PP_SEQ_FOR_EACH_I_M_I(r, macro, data, seq, i, sz) macro(r, data, i, BOOST_PP_SEQ_HEAD(seq))
      |                                                                  ^~~~~
/usr/include/boost/preprocessor/control/iif.hpp:32:31: note: in expansion of macro ‘QUERY_WITHOUT_INPUTS’
   32 | # define BOOST_PP_IIF_1(t, f) t
      |                               ^
../../../source/tools/atlas/GameInterface/Messages.h:212:1: note: in expansion of macro ‘QUERY’
  212 | QUERY(RasterizeMinimap,
      | ^~~~~
In file included from /usr/include/boost/preprocessor/variadic/elem.hpp:102,
                 from /usr/include/boost/preprocessor/tuple/elem.hpp:23,
                 from ../../../source/tools/atlas/GameInterface/MessagesSetup.h:109,
                 from ../../../source/tools/atlas/GameInterface/Messages.h:22,
                 from ../../../source/tools/atlas/AtlasUI/CustomControls/MapResizeDialog/MapResizeDialog.cpp:22:
../../../source/tools/atlas/GameInterface/Messages.h:215:31: error: ‘uint8_t’ was not declared in this scope
  215 |                 ((std::vector<uint8_t>, imageBytes))
      |                               ^~~~~~~
../../../source/tools/atlas/GameInterface/MessagesSetup.h:120:48: note: in expansion of macro ‘B_TYPE’
  120 | #define B_MEMBERS(r, data, n, elem) Shareable< B_TYPE(elem) > B_NAME(elem);
      |                                                ^~~~~~
/usr/include/boost/preprocessor/seq/for_each_i.hpp:85:66: note: in expansion of macro ‘B_MEMBERS’
   85 | # define BOOST_PP_SEQ_FOR_EACH_I_M_I(r, macro, data, seq, i, sz) macro(r, data, i, BOOST_PP_SEQ_HEAD(seq))
      |                                                                  ^~~~~
/usr/include/boost/preprocessor/control/iif.hpp:32:31: note: in expansion of macro ‘QUERY_WITHOUT_INPUTS’
   32 | # define BOOST_PP_IIF_1(t, f) t
      |                               ^
../../../source/tools/atlas/GameInterface/Messages.h:212:1: note: in expansion of macro ‘QUERY’
  212 | QUERY(RasterizeMinimap,
      | ^~~~~
../../../source/tools/atlas/GameInterface/Messages.h:23:1: note: ‘uint8_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
   22 | #include "MessagesSetup.h"
  +++ |+#include <cstdint>
   23 | #endif
../../../source/tools/atlas/GameInterface/Messages.h:215:38: error: template argument 1 is invalid
  215 |                 ((std::vector<uint8_t>, imageBytes))
      |                                      ^
../../../source/tools/atlas/GameInterface/MessagesSetup.h:120:48: note: in expansion of macro ‘B_TYPE’
  120 | #define B_MEMBERS(r, data, n, elem) Shareable< B_TYPE(elem) > B_NAME(elem);
      |                                                ^~~~~~
/usr/include/boost/preprocessor/seq/for_each_i.hpp:85:66: note: in expansion of macro ‘B_MEMBERS’
   85 | # define BOOST_PP_SEQ_FOR_EACH_I_M_I(r, macro, data, seq, i, sz) macro(r, data, i, BOOST_PP_SEQ_HEAD(seq))
      |                                                                  ^~~~~
/usr/include/boost/preprocessor/control/iif.hpp:32:31: note: in expansion of macro ‘QUERY_WITHOUT_INPUTS’
   32 | # define BOOST_PP_IIF_1(t, f) t
      |                               ^
../../../source/tools/atlas/GameInterface/Messages.h:212:1: note: in expansion of macro ‘QUERY’
  212 | QUERY(RasterizeMinimap,
      | ^~~~~
../../../source/tools/atlas/GameInterface/Messages.h:215:38: error: template argument 2 is invalid
  215 |                 ((std::vector<uint8_t>, imageBytes))
      |                                      ^
../../../source/tools/atlas/GameInterface/MessagesSetup.h:120:48: note: in expansion of macro ‘B_TYPE’
  120 | #define B_MEMBERS(r, data, n, elem) Shareable< B_TYPE(elem) > B_NAME(elem);
      |                                                ^~~~~~
/usr/include/boost/preprocessor/seq/for_each_i.hpp:85:66: note: in expansion of macro ‘B_MEMBERS’
   85 | # define BOOST_PP_SEQ_FOR_EACH_I_M_I(r, macro, data, seq, i, sz) macro(r, data, i, BOOST_PP_SEQ_HEAD(seq))
      |                                                                  ^~~~~
/usr/include/boost/preprocessor/control/iif.hpp:32:31: note: in expansion of macro ‘QUERY_WITHOUT_INPUTS’
   32 | # define BOOST_PP_IIF_1(t, f) t
      |                               ^
../../../source/tools/atlas/GameInterface/Messages.h:212:1: note: in expansion of macro ‘QUERY’
  212 | QUERY(RasterizeMinimap,
      | ^~~~~
../../../source/tools/atlas/GameInterface/MessagesSetup.h:120:61: error: template argument 1 is invalid
  120 | #define B_MEMBERS(r, data, n, elem) Shareable< B_TYPE(elem) > B_NAME(elem);
      |                                                             ^
/usr/include/boost/preprocessor/seq/for_each_i.hpp:85:66: note: in expansion of macro ‘B_MEMBERS’
   85 | # define BOOST_PP_SEQ_FOR_EACH_I_M_I(r, macro, data, seq, i, sz) macro(r, data, i, BOOST_PP_SEQ_HEAD(seq))
      |                                                                  ^~~~~
/usr/include/boost/preprocessor/control/iif.hpp:32:31: note: in expansion of macro ‘QUERY_WITHOUT_INPUTS’
   32 | # define BOOST_PP_IIF_1(t, f) t
      |                               ^
../../../source/tools/atlas/GameInterface/Messages.h:212:1: note: in expansion of macro ‘QUERY’
  212 | QUERY(RasterizeMinimap,
      | ^~~~~
../../../source/tools/atlas/AtlasUI/CustomControls/MapResizeDialog/PseudoMiniMapPanel.cpp: In constructor ‘PseudoMiniMapPanel::PseudoMiniMapPanel(wxWindow*, int)’:
../../../source/tools/atlas/AtlasUI/CustomControls/MapResizeDialog/PseudoMiniMapPanel.cpp:64:43: error: invalid type argument of unary ‘*’ (have ‘int’)
   64 |         std::vector<uint8_t> imageBytes = *qryBackground.imageBytes;
      |                                           ^~~~~~~~~~~~~~~~~~~~~~~~~
make[1]: *** [AtlasUI.make:261: obj/AtlasUI_Release/PseudoMiniMapPanel.o] Error 1
make[1]: *** [AtlasUI.make:258: obj/AtlasUI_Release/MapResizeDialog.o] Error 1
make: *** [Makefile:181: AtlasUI] Error 2

System Information:

[caleb@NerdTop 0ad]$ neofetch
                   -`                    caleb@NerdTop 
                  .o+`                   ------------- 
                 `ooo/                   OS: Arch Linux x86_64 
                `+oooo:                  Host: Latitude 3190 2-in-1 
               `+oooooo:                 Kernel: 6.3.1-arch2-1 
               -+oooooo+:                Uptime: 3 hours, 53 mins 
             `/:-:++oooo+:               Packages: 2088 (pacman), 13 (flatpak) 
            `/++++/+++++++:              Shell: bash 5.1.16 
           `/++++++++++++++:             Resolution: 1366x768 
          `/+++ooooooooooooo/`           DE: Plasma 5.27.5 
         ./ooosssso++osssssso+`          WM: kwin 
        .oossssso-````/ossssss+`         Theme: [Plasma], Default [GTK2/3] 
       -osssssso.      :ssssssso.        Icons: Papirus-Dark [Plasma], Papirus-Dark [GTK2/3] 
      :osssssss/        osssso+++.       Terminal: konsole 
     /ossssssss/        +ssssooo/-       CPU: Intel Pentium Silver N5000 (4) @ 2.700GHz 
   `/ossssso+/:-        -:/+osssso+-     GPU: Intel GeminiLake [UHD Graphics 605] 
  `+sso+:-`                 `.-/+oso:    Memory: 3836MiB / 7763MiB 
 `++:.                           `-/+/
 .`                                 `/                           
                                                                 

Attachments (1)

system_info.txt (3.9 KB ) - added by Caleb Marshall 12 months ago.
System information.

Download all attachments as: .zip

Change History (11)

comment:1 by Stan, 12 months ago

Milestone: BacklogAlpha 27
Priority: Release BlockerMust Have

Hey can you give us more information about your system?

Which gcc version? the package manager uses gcc12

Which flags did you pass to update-workspaces.sh?

comment:2 by phosit, 12 months ago

Owner: set to phosit
Status: newassigned

I get the same error when using gcc-13. The headers of gcc-13 are cleaned up.
With gcc-12 it did work.

in reply to:  1 comment:3 by Caleb Marshall, 12 months ago

Replying to Stan:

Hey can you give us more information about your system?

Which gcc version? the package manager uses gcc12

Which flags did you pass to update-workspaces.sh?

I am using gcc 13.1.1, I will try with gcc12. I only passed -j4 with update-workspaces.sh

by Caleb Marshall, 12 months ago

Attachment: system_info.txt added

System information.

comment:4 by Caleb Marshall, 12 months ago

Built successfully with CXX=/usr/bin/g++-12 make -j4 config=release . I've also attached my system_info.txt if needed.

comment:5 by phosit, 12 months ago

It does also work if one passes --disable-atlas to `update-workspaces.sh

in reply to:  5 ; comment:6 by Ralph Sennhauser, 12 months ago

Replying to phosit:

It does also work if one passes --disable-atlas to `update-workspaces.sh

:)

Well, adding the missing <cstdint> to Messages.h might actually fix it ...

in reply to:  6 comment:7 by Caleb Marshall, 12 months ago

Replying to Ralph Sennhauser:

Replying to phosit:

It does also work if one passes --disable-atlas to `update-workspaces.sh

:)

Well, adding the missing <cstdint> to Messages.h might actually fix it ...

I have already tried that, it just generates a larger error :P

in reply to:  6 comment:8 by phosit, 12 months ago

I don't know why but including <cstdint> in MessagesSetup.h does fix everything :D

comment:9 by Ralph Sennhauser, 12 months ago

Patch: 27641https://code.wildfiregames.com/D4997

comment:10 by Stan, 12 months ago

Resolution: fixed
Status: assignedclosed

In 27644:

Fix compilation with GCC 13.

gcc-13 less often includes cstdint so one might need to include it manually if needed.

The headers already included in Message.h are included within namespace AtlasMessage which didn't break by chance, move them out and add cstdint.

Patch by: @sera
Reviewed by: @phosit
Fixes: #6800
Differential Revision: https://code.wildfiregames.com/D4997

Note: See TracTickets for help on using tickets.