Kodi Community Forum

Full Version: Error building kodi-wayland from git ... waylandpp 0.2.6 seems to be to blame
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I maintain the kodi-git package for Arch Linux.  I switched the old python2 deps over to their respective python3 version, but the build for wayland fails.  Link to build log but if I just grep for the for the word error:
hecking for library containing strerror... [ 1%] Generating xbmc.json/addon.xml
checking for strerror... yes
checking for /usr/bin/cc way to treat warnings as errors... -Werror
CC src/error.lo
498 | FF_ALLOC_OR_GOTO(alac->avctx, alac->predict_error_buffer[ch],
CC libavcodec/error_resilience.o
CC libavutil/error.o
340 | av_log(obj, AV_LOG_ERROR, "Unable to parse option value \"%s\" as video rate\n", val);
INSTALL build/kodi-git/src/kodi-build-wayland/build/ffmpeg/src/ffmpeg/libavutil/error.h
/usr/include/wayland-util.hpp:472:7: error: invalid static_cast from type ‘wayland::xdg_toplevel_state*’ to type ‘const char*’
make[2]: *** [build/windowing/wayland/CMakeFiles/windowing_WAYLAND.dir/build.make:193: build/windowing/wayland/CMakeFiles/windowing_WAYLAND.dir/ShellSurfaceXdgShell.cpp.o] Error 1
/usr/include/wayland-util.hpp:472:7: error: invalid static_cast from type ‘wayland::zxdg_toplevel_v6_state*’ to type ‘const char*’
make[2]: *** [build/windowing/wayland/CMakeFiles/windowing_WAYLAND.dir/build.make:206: build/windowing/wayland/CMakeFiles/windowing_WAYLAND.dir/ShellSurfaceXdgShellUnstableV6.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:10634: build/windowing/wayland/CMakeFiles/windowing_WAYLAND.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

Any insights are welcomed.
    -Dlibdvdcss_URL="/libdvdcss-1.4.2-Leia-Beta-5.tar.gz" \
    -Dlibdvdnav_URL="/libdvdnav-6.0.0-Leia-Alpha-3.tar.gz" \
    -Dlibdvdread_URL="/libdvdread-6.0.0-Leia-Alpha-3.tar.gz" \
    -DFFMPEG_URL="/ffmpeg-4.0.4-Leia-18.4.tar.gz" \
    -DFMT_URL="/fmt-5.1.0.tar.gz" \
    -DCROSSGUID_URL="/crossguid-8f399e8bd4.tar.gz" \
    -DFSTRCMP_URL="/fstrcmp-0.7.D001.tar.gz" \
    -DFLATBUFFERS_URL="/flatbuffers-1.11.0.tar.gz" \
    -DCORE_PLATFORM_NAME=wayland \
  make preinstall
I see that arch updated waylandpp recenty (2019-10-06), probably related (the actual error comes from a waylandpp header), maybe Kodi wayland codepath needs some love or or may be it's waylandpp bug.
There is a (poor) comment in https://github.com/NilsBrause/waylandpp/issues/63

BTW specifying your distro helps get better help (wink wink) , I know that you are an arch user, but the relevant Kodi devs probably don't.
@asavah - Good advice, edited.  It seems that building with waylandpp from git fixes this due to fef85e50.  Thank you for the report!

Related: I read a report of a user trying to build kodi-wayland v18.4+some of the patches targeted for 18.5 and encountering similar errors.  It is likely waylandpp 0.2.6 is to blame, and that the whole python3 vs python2 was not involved.  I will edit the title of the thread to reflect this.