hyprwm / aquamarine

Aquamarine is a very light linux rendering backend library
BSD 3-Clause "New" or "Revised" License
219 stars 16 forks source link

Fails to build on 32-bit architectures (e.g., armv7, i386, powerpc) #5

Closed jbeich closed 1 month ago

jbeich commented 2 months ago
$ export CFLAGS=-m32 CXXFLAGS=-m32
$ cmake -B ./build
$ cmake --build ./build
[...]
src/backend/drm/DRM.cpp:628:37: error: non-constant-expression cannot be narrowed from type 'unsigned int' to 'time_t' (aka 'int') in initializer list [-Wc++11-narrowing]
  628 |     timespec presented = {.tv_sec = tv_sec, .tv_nsec = tv_usec * 1000};
      |                                     ^~~~~~
src/backend/drm/DRM.cpp:628:37: note: insert an explicit cast to silence this issue
  628 |     timespec presented = {.tv_sec = tv_sec, .tv_nsec = tv_usec * 1000};
      |                                     ^~~~~~
      |                                     static_cast<time_t>( )
src/backend/drm/DRM.cpp:628:56: error: non-constant-expression cannot be narrowed from type 'unsigned int' to 'long' in initializer list [-Wc++11-narrowing]
  628 |     timespec presented = {.tv_sec = tv_sec, .tv_nsec = tv_usec * 1000};
      |                                                        ^~~~~~~~~~~~~~
src/backend/drm/DRM.cpp:628:56: note: insert an explicit cast to silence this issue
  628 |     timespec presented = {.tv_sec = tv_sec, .tv_nsec = tv_usec * 1000};
      |                                                        ^~~~~~~~~~~~~~
      |                                                        static_cast<long>( )