WebPlatformForEmbedded / WPEBackend-rdk

BSD 2-Clause "Simplified" License
8 stars 38 forks source link

Build broken with libwpe 1.14.0 #85

Closed aperezdc closed 2 years ago

aperezdc commented 2 years ago

Excerpt from the build failure:

src/input/Libinput/LibinputServer.cpp: In member function ‘bool WPE::LibinputServer::handleKeyboardEvent(uint32_t, uint32_t, uint32_t)’:
src/input/Libinput/LibinputServer.cpp:86:17: error: ‘wpe_input_xkb_context_get_default’ was not declared in this scope
   86 |     auto* xkb = wpe_input_xkb_context_get_default();
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/input/Libinput/LibinputServer.cpp:119:18: error: ‘wpe_input_xkb_context_get_key_code’ was not declared in this scope
  119 |         keysym = wpe_input_xkb_context_get_key_code(xkb, code, !!state);
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/input/Libinput/LibinputServer.cpp:126:22: error: ‘wpe_input_xkb_context_get_state’ was not declared in this scope
  126 |     auto* xkbState = wpe_input_xkb_context_get_state(xkb);
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/input/Libinput/LibinputServer.cpp:127:52: error: ‘XKB_KEY_DOWN’ was not declared in this scope
  127 |     xkb_state_update_key(xkbState, code, !!state ? XKB_KEY_DOWN : XKB_KEY_UP);
      |                                                    ^~~~~~~~~~~~
src/input/Libinput/LibinputServer.cpp:127:67: error: ‘XKB_KEY_UP’ was not declared in this scope
  127 |     xkb_state_update_key(xkbState, code, !!state ? XKB_KEY_DOWN : XKB_KEY_UP);
      |                                                                   ^~~~~~~~~~
src/input/Libinput/LibinputServer.cpp:127:5: error: ‘xkb_state_update_key’ was not declared in this scope
  127 |     xkb_state_update_key(xkbState, code, !!state ? XKB_KEY_DOWN : XKB_KEY_UP);
      |     ^~~~~~~~~~~~~~~~~~~~
src/input/Libinput/LibinputServer.cpp:129:44: error: ‘XKB_STATE_MODS_DEPRESSED’ was not declared in this scope
  129 |         xkb_state_serialize_mods(xkbState, XKB_STATE_MODS_DEPRESSED),
      |                                            ^~~~~~~~~~~~~~~~~~~~~~~~
src/input/Libinput/LibinputServer.cpp:129:9: error: ‘xkb_state_serialize_mods’ was not declared in this scope
  129 |         xkb_state_serialize_mods(xkbState, XKB_STATE_MODS_DEPRESSED),
      |         ^~~~~~~~~~~~~~~~~~~~~~~~
src/input/Libinput/LibinputServer.cpp:130:44: error: ‘XKB_STATE_MODS_LATCHED’ was not declared in this scope
  130 |         xkb_state_serialize_mods(xkbState, XKB_STATE_MODS_LATCHED),
      |                                            ^~~~~~~~~~~~~~~~~~~~~~
aperezdc commented 2 years ago

This is because https://github.com/WebPlatformForEmbedded/libwpe/pull/94 added a compilation flag to the wpe-1.0.pc file, which cmake/FindWPE.cmake is not picking because it should be using ${PC_WPE_CFLAGS_OTHER} (instead of ${PC_WPE_CFLAGS}, which may look fine but is actually wrong!); and also after https://github.com/WebPlatformForEmbedded/libwpe/pull/108 users of libwpe ough including the xkbcommon headers themselves.