Closed ghost closed 4 years ago
/opt/vc/include/interface/vcos/vcos_types.h:205:22: error: expected unqualified-id before ‘sizeof’
#define countof(x) ( sizeof((x)) / sizeof((x)[0]))
^~~~~~
/home/pi/anbox2/external/glm/glm/detail/setup.hpp:994:25: note: in expansion of macro ‘countof’
constexpr std::size_t countof(T const (&)[N])
^~~~~~~
/opt/vc/include/interface/vcos/vcos_types.h:205:22: error: expected ‘)’ before ‘sizeof’
#define countof(x) ( sizeof((x)) / sizeof((x)[0]))
~ ^~~~~~
/home/pi/anbox2/external/glm/glm/detail/setup.hpp:994:25: note: in expansion of macro ‘countof’
constexpr std::size_t countof(T const (&)[N])
^~~~~~~
The error
The glm (OpenGL Mathematics) code declares a countof member functions, which is incompatible with using countof as a macro as VCOS does. countof works as expected in the userland repo, and we can't be held responsible for other uses that are less successful.
Describe the bug I'm trying to build anbox, which uses this code, but I always get the error:
/opt/vc/include/interface/vcos/vcos_types.h:205:22: error: expected unqualified-id before ‘sizeof’
To reproduce Compile anbox on a Raspberry Pi
Expected behaviour Builds as usually Actual behaviour Add a clear and concise description of what actually happened.
System
I think this is the right place to post this, or should I post this at anbox?