Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
Cross compiling to aarch64
#46
Luckily I have gotten past this (thanks to some wonderful help on github) by setting:
Quote:export WAYLAND_DISPLAY=wayland-0
./kodi.bin
I haven't picked a driver in mesa when compiling so I've still got to work out that one:
Quote:libEGL warning: MESA-LOADER: failed to open swrast (search paths /media/developer/opt/xbmc-deps/arm-linux-gnueabi-release/lib/dri)
libEGL warning: MESA-LOADER: failed to open swrast (search paths /media/developer/opt/xbmc-deps/arm-linux-gnueabi-release/lib/dri)

So making progress! Smile
Reply
#47
right on, its hell being a pioneer but persistence pays off, without it we wouldnt be here because nobody would have put a media center onto an old xbox way back when
Reply
#48
How do i go about compiling swrast to use -static-libstdc++?
Quote:./configure     --prefix=/media/developer/kodi/xbmc-depends --host=arm-linux-gnueabi \
        --with-rendersystem=gles --enable-debug=no --with-target-cflags='-static-libgcc -march=armv7-a -mfloat-abi=softfp -mfpu=neon' \
        --with-target-cxxflags='-static-libstdc++'
When launching kodi:

libEGL warning: MESA-LOADER: failed to open swrast: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.29' not found.

I am using **-static-libstdc++** in cpp args which works for other areas of the project, but because mesa meson build is using gcc and not using g++ it is failing to pick up this option.

Any ideas on how to fix this?

build.ninja:
Quote:build src/gallium/targets/dri/swrast_dri.so: CUSTOM_COMMAND src/gallium/targets/dri/libgallium_dri.so | /usr/bin/ln
 COMMAND = /usr/bin/ln -f src/gallium/targets/dri/libgallium_dri.so src/gallium/targets/dri/swrast_dri.so
 description = Generating$ devenv_swrast_dri.so$ with$ a$ custom$ command


build/compile_commands.json
Quote:  {
    "directory": "/home/developer/kodi/tools/depends/target/mesa/arm-linux-gnueabi-release/build",
    "command": "/home/developer/toolchain/arm-linux-gnueabi_sdk-buildroot/bin/arm-linux-gnueabi-gcc -Isrc/gallium/targets/dri/libgallium_dri.so.p -Isrc/gallium/targets/dri -I../src/gallium/targets/dri -Iinclude -I../include -Isrc -I../src -Isrc/mapi -I../src/mapi -Isrc/mesa -I../src/mesa -I../src/gallium/include -Isrc/gallium/auxiliary -I../src/gallium/auxiliary -Isrc/util -I../src/util -Isrc/gallium/drivers -I../src/gallium/drivers -Isrc/gallium/winsys -I../src/gallium/winsys -Isrc/gallium/frontends/dri -I../src/gallium/frontends/dri -Isrc/compiler/nir -I../src/compiler/nir -I/media/developer/kodi/xbmc-depends/arm-linux-gnueabi-release/include -I/media/developer/kodi/xbmc-depends/arm-linux-gnueabi-release/include/libdrm -fvisibility=hidden -fdiagnostics-color=always -DNDEBUG -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -O3 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS '-DPACKAGE_VERSION=\"22.3.3\"' '-DPACKAGE_BUGREPORT=\"https://gitlab.freedesktop.org/mesa/mesa/-/issues\"' -DHAVE_LIMA -DHAVE_PANFROST -DHAVE_KMSRO -DHAVE_SWRAST -DVIDEO_CODEC_VC1DEC=0 -DVIDEO_CODEC_H264DEC=0 -DVIDEO_CODEC_H264ENC=0 -DVIDEO_CODEC_H265DEC=0 -DVIDEO_CODEC_H265ENC=0 -DHAVE_WAYLAND_PLATFORM -DHAVE_SURFACELESS_PLATFORM -DHAVE_DRM_PLATFORM -DENABLE_ST_OMX_BELLAGIO=0 -DENABLE_ST_OMX_TIZONIA=0 -DENABLE_SHADER_CACHE -DHAVE___BUILTIN_BSWAP32 -DHAVE___BUILTIN_BSWAP64 -DHAVE___BUILTIN_CLZ -DHAVE___BUILTIN_CLZLL -DHAVE___BUILTIN_CTZ -DHAVE___BUILTIN_EXPECT -DHAVE___BUILTIN_FFS -DHAVE___BUILTIN_FFSLL -DHAVE___BUILTIN_POPCOUNT -DHAVE___BUILTIN_POPCOUNTLL -DHAVE___BUILTIN_UNREACHABLE -DHAVE___BUILTIN_TYPES_COMPATIBLE_P -DHAVE_FUNC_ATTRIBUTE_CONST -DHAVE_FUNC_ATTRIBUTE_FLATTEN -DHAVE_FUNC_ATTRIBUTE_MALLOC -DHAVE_FUNC_ATTRIBUTE_PURE -DHAVE_FUNC_ATTRIBUTE_UNUSED -DHAVE_FUNC_ATTRIBUTE_WARN_UNUSED_RESULT -DHAVE_FUNC_ATTRIBUTE_WEAK -DHAVE_FUNC_ATTRIBUTE_FORMAT -DHAVE_FUNC_ATTRIBUTE_PACKED -DHAVE_FUNC_ATTRIBUTE_RETURNS_NONNULL -DHAVE_FUNC_ATTRIBUTE_ALIAS -DHAVE_FUNC_ATTRIBUTE_NORETURN -DHAVE_FUNC_ATTRIBUTE_VISIBILITY -DHAVE_REALLOCARRAY -D_GNU_SOURCE -DUSE_GCC_ATOMIC_BUILTINS -DUSE_ARM_ASM -DMAJOR_IN_SYSMACROS -DHAS_SCHED_H -DHAS_SCHED_GETAFFINITY -DHAVE_LINUX_FUTEX_H -DHAVE_ENDIAN_H -DHAVE_DLFCN_H -DHAVE_SYS_SHM_H -DHAVE_FLOCK -DHAVE_GETRANDOM -DHAVE_MEMFD_CREATE -DHAVE_MKOSTEMP -DHAVE_RANDOM_R -DHAVE_STRTOF -DHAVE_STRTOK_R -DHAVE_TIMESPEC_GET -DHAVE_GNU_QSORT_R -DHAVE_STRUCT_TIMESPEC -DHAVE_PROGRAM_INVOCATION_NAME -DHAVE_ISSIGNALING -DHAVE_POSIX_MEMALIGN -DHAVE_DIRENT_D_TYPE -DHAVE_STRTOD_L -DHAVE_DLADDR -DHAVE_DL_ITERATE_PHDR -DHAVE_ZLIB -DHAVE_COMPRESSION -DHAVE_PTHREAD -DHAVE_PTHREAD_SETAFFINITY -DHAVE_LIBDRM -DHAVE_LIBUDEV -DMESA_EXECMEM -DWL_HIDE_DEPRECATED -DHAVE_DRI -DHAVE_DRI2 -DHAVE_DRISW_KMS -DVK_USE_PLATFORM_WAYLAND_KHR -DVK_USE_PLATFORM_DISPLAY_KHR -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=return-type -Werror=empty-body -Werror=incompatible-pointer-types -Werror=int-conversion -Wimplicit-fallthrough -Wno-missing-field-initializers -Wno-format-truncation -fno-math-errno -fno-trapping-math -fno-common -Wno-unused-function -Werror=format -Wformat-security -ffunction-sections -fdata-sections -Wno-unused-variable -Wno-unused-but-set-variable -fPIC -DPIC -DNDEBUG=1 -Os -static-libgcc -march=armv7-a -mfloat-abi=softfp -mfpu=neon -isystem /media/developer/kodi/xbmc-depends/arm-linux-gnueabi-release/include -fPIC -DGALLIUM_LIMA -DGALLIUM_PANFROST -Wno-pointer-arith -DGALLIUM_KMSRO -DGALLIUM_SOFTPIPE -pthread -MD -MQ src/gallium/targets/dri/libgallium_dri.so.p/target.c.o -MF src/gallium/targets/dri/libgallium_dri.so.p/target.c.o.d -o src/gallium/targets/dri/libgallium_dri.so.p/target.c.o -c ../src/gallium/targets/dri/target.c",
    "file": "../src/gallium/targets/dri/target.c",
    "output": "src/gallium/targets/dri/libgallium_dri.so.p/target.c.o"
  },
  {
    "directory": "/home/developer/kodi/tools/depends/target/mesa/arm-linux-gnueabi-release/build",
    "command": "/home/developer/toolchain/arm-linux-gnueabi_sdk-buildroot/bin/arm-linux-gnueabi-gcc -Isrc/egl/libEGL.so.1.0.0.p -Isrc/egl -I../src/egl -Iinclude -I../include -Isrc -I../src -I../src/egl/main -Isrc/loader -I../src/loader -Isrc/gbm -I../src/gbm -I../src/gbm/main -I../src/gbm/backends/dri -Isrc/egl/wayland/wayland-drm -I../src/egl/wayland/wayland-drm -Isrc/util -I../src/util -I../src/gallium/include -I/media/developer/kodi/xbmc-depends/arm-linux-gnueabi-release/include -I/media/developer/kodi/xbmc-depends/arm-linux-gnueabi-release/include/libdrm -fvisibility=hidden -fdiagnostics-color=always -DNDEBUG -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -O3 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS '-DPACKAGE_VERSION=\"22.3.3\"' '-DPACKAGE_BUGREPORT=\"https://gitlab.freedesktop.org/mesa/mesa/-/issues\"' -DHAVE_LIMA -DHAVE_PANFROST -DHAVE_KMSRO -DHAVE_SWRAST -DVIDEO_CODEC_VC1DEC=0 -DVIDEO_CODEC_H264DEC=0 -DVIDEO_CODEC_H264ENC=0 -DVIDEO_CODEC_H265DEC=0 -DVIDEO_CODEC_H265ENC=0 -DHAVE_WAYLAND_PLATFORM -DHAVE_SURFACELESS_PLATFORM -DHAVE_DRM_PLATFORM -DENABLE_ST_OMX_BELLAGIO=0 -DENABLE_ST_OMX_TIZONIA=0 -DENABLE_SHADER_CACHE -DHAVE___BUILTIN_BSWAP32 -DHAVE___BUILTIN_BSWAP64 -DHAVE___BUILTIN_CLZ -DHAVE___BUILTIN_CLZLL -DHAVE___BUILTIN_CTZ -DHAVE___BUILTIN_EXPECT -DHAVE___BUILTIN_FFS -DHAVE___BUILTIN_FFSLL -DHAVE___BUILTIN_POPCOUNT -DHAVE___BUILTIN_POPCOUNTLL -DHAVE___BUILTIN_UNREACHABLE -DHAVE___BUILTIN_TYPES_COMPATIBLE_P -DHAVE_FUNC_ATTRIBUTE_CONST -DHAVE_FUNC_ATTRIBUTE_FLATTEN -DHAVE_FUNC_ATTRIBUTE_MALLOC -DHAVE_FUNC_ATTRIBUTE_PURE -DHAVE_FUNC_ATTRIBUTE_UNUSED -DHAVE_FUNC_ATTRIBUTE_WARN_UNUSED_RESULT -DHAVE_FUNC_ATTRIBUTE_WEAK -DHAVE_FUNC_ATTRIBUTE_FORMAT -DHAVE_FUNC_ATTRIBUTE_PACKED -DHAVE_FUNC_ATTRIBUTE_RETURNS_NONNULL -DHAVE_FUNC_ATTRIBUTE_ALIAS -DHAVE_FUNC_ATTRIBUTE_NORETURN -DHAVE_FUNC_ATTRIBUTE_VISIBILITY -DHAVE_REALLOCARRAY -D_GNU_SOURCE -DUSE_GCC_ATOMIC_BUILTINS -DUSE_ARM_ASM -DMAJOR_IN_SYSMACROS -DHAS_SCHED_H -DHAS_SCHED_GETAFFINITY -DHAVE_LINUX_FUTEX_H -DHAVE_ENDIAN_H -DHAVE_DLFCN_H -DHAVE_SYS_SHM_H -DHAVE_FLOCK -DHAVE_GETRANDOM -DHAVE_MEMFD_CREATE -DHAVE_MKOSTEMP -DHAVE_RANDOM_R -DHAVE_STRTOF -DHAVE_STRTOK_R -DHAVE_TIMESPEC_GET -DHAVE_GNU_QSORT_R -DHAVE_STRUCT_TIMESPEC -DHAVE_PROGRAM_INVOCATION_NAME -DHAVE_ISSIGNALING -DHAVE_POSIX_MEMALIGN -DHAVE_DIRENT_D_TYPE -DHAVE_STRTOD_L -DHAVE_DLADDR -DHAVE_DL_ITERATE_PHDR -DHAVE_ZLIB -DHAVE_COMPRESSION -DHAVE_PTHREAD -DHAVE_PTHREAD_SETAFFINITY -DHAVE_LIBDRM -DHAVE_LIBUDEV -DMESA_EXECMEM -DWL_HIDE_DEPRECATED -DHAVE_DRI -DHAVE_DRI2 -DHAVE_DRISW_KMS -DVK_USE_PLATFORM_WAYLAND_KHR -DVK_USE_PLATFORM_DISPLAY_KHR -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=return-type -Werror=empty-body -Werror=incompatible-pointer-types -Werror=int-conversion -Wimplicit-fallthrough -Wno-missing-field-initializers -Wno-format-truncation -fno-math-errno -fno-trapping-math -fno-common -Wno-unused-function -Werror=format -Wformat-security -ffunction-sections -fdata-sections -Wno-unused-variable -Wno-unused-but-set-variable -fPIC -DPIC -DNDEBUG=1 -Os -static-libgcc -march=armv7-a -mfloat-abi=softfp -mfpu=neon -isystem /media/developer/kodi/xbmc-depends/arm-linux-gnueabi-release/include -fPIC -pthread -DBUILT_WITH_ASAN=0 -DHAVE_MINCORE -D_EGL_NATIVE_PLATFORM=_EGL_PLATFORM_WAYLAND -MD -MQ src/egl/libEGL.so.1.0.0.p/meson-generated_.._wayland_wayland-drm_linux-dmabuf-unstable-v1-protocol.c.o -MF src/egl/libEGL.so.1.0.0.p/meson-generated_.._wayland_wayland-drm_linux-dmabuf-unstable-v1-protocol.c.o.d -o src/egl/libEGL.so.1.0.0.p/meson-generated_.._wayland_wayland-drm_linux-dmabuf-unstable-v1-protocol.c.o -c src/egl/wayland/wayland-drm/linux-dmabuf-unstable-v1-protocol.c",
    "file": "src/egl/wayland/wayland-drm/linux-dmabuf-unstable-v1-protocol.c",
    "output": "src/egl/libEGL.so.1.0.0.p/meson-generated_.._wayland_wayland-drm_linux-dmabuf-unstable-v1-protocol.c.o"
  },

I tried substituting gcc with g++ here and the compiler meson didn't like that, saying it couldn't compile programs..

My share/cross-file.meson:
Quote:[binaries]
c = '/home/developer/toolchain/arm-linux-gnueabi_sdk-buildroot/bin/arm-linux-gnueabi-gcc'
cpp = '/home/developer/toolchain/arm-linux-gnueabi_sdk-buildroot/bin/arm-linux-gnueabi-g++'
ar = '/home/developer/toolchain/arm-linux-gnueabi_sdk-buildroot/bin/arm-linux-gnueabi-ar'
strip = '/home/developer/toolchain/arm-linux-gnueabi_sdk-buildroot/bin/arm-linux-gnueabi-strip'
pkgconfig = '/media/developer/kodi/xbmc-depends/x86_64-linux-gnu-native/bin/pkg-config'

[host_machine]
system = 'linux'
cpu_family = 'arm'
cpu = 'arm'
endian = 'little'

[properties]
pkg_config_libdir = '/media/developer/kodi/xbmc-depends/arm-linux-gnueabi-release/lib/pkgconfig'

[built-in options]
c_args = ['-fPIC', '-DPIC', '-DNDEBUG=1', '-Os', '-static-libgcc', '-static-libstdc++', '-march=armv7-a', '-mfloat-abi=softfp', '-mfpu=neon', '-isystem', '/media/developer/kodi/xbmc-depends/arm-linux-gnueabi-release/include']
c_link_args = ['-L/media/developer/kodi/xbmc-depends/arm-linux-gnueabi-release/lib', '-Wl,-rpath-link=/media/developer/kodi/xbmc-depends/arm-linux-gnueabi-release/lib']
cpp_args = ['-fPIC', '-DPIC', '-DNDEBUG=1', '-Os', '-static-libstdc++', '-std=c++17', '-isystem', '/media/developer/kodi/xbmc-depends/arm-linux-gnueabi-release/include']
cpp_link_args = ['-L/media/developer/kodi/xbmc-depends/arm-linux-gnueabi-release/lib', '-Wl,-rpath-link=/media/developer/kodi/xbmc-depends/arm-linux-gnueabi-release/lib']
default_library = 'static'
prefix = '/media/developer/kodi/xbmc-depends/arm-linux-gnueabi-release'
libdir = 'lib'
bindir = 'bin'
includedir = 'include'
Reply
#49
I figured out why it's losing  -static-libstdc++.. If make is interrupted due to an error, and you resume after correcting the issue, it will lose the CXXFLAGS_FOR_BUILD envs.
Reply
#50
OK so it's just not setting CXX_FLAGS..
Reply
#51
are you able to set the cxx_flags directly in the cmakefile.txt ?
like this https://stackoverflow.com/questions/1008...sing-cmake
Reply
#52
Any idea how to fix this issue?
Quote:xkbcommon: ERROR: failed to add default include path /media/developer/<snip>/xbmc-deps/arm-linux-release/share/X11/xkb

Secondly, I'm getting a blank screen after launching. I can hear menu sounds in the background. How do I debug this? I'm using wayland/GLES.

How can I force it to try 4k resolution? It's trying to do 1920x1080 but failing. It's a LG C2 4k TV.
Reply
#53
as far as forcing resolution i think it can be done from advancedsettings.xml but i have little luck finding the information
i found this from libreelec forums but TFIIK what those values are that they used - https://forum.libreelec.tv/thread/24421-...xml-values

the xkb thing appears to be for keyboards so maybe a little less important?
Reply
#54
afterthought
if kodi is actually running to where you can hear gui sounds then enable the webserver from advancedsettings.xml and take control of it from your computer, you can set the resolution there
the wiki shows the advanced settings needed - https://kodi.wiki/view/Web_interface
Reply
#55
I couldn't get the web http interface to even do anything.

Regarding kodi, is there a minimal wayland version it is compatible with? This device has 1.11.
Reply
#56
i think youve arrived at uncharted territory - where no man has gone before etc and so on

is it possible to get a kodi log at this stage? - it may reveal some good questions

i was unable to locate any minimum version is why im asking, if the log is available it would tell you more or less why its freaking out
Reply
#57
This is a wayland debug log:
https://pastebin.com/fpeYQ3fu (or https://pastebin.com/Zw1CbHva)

Seems to be stuck in a loop??
Quote:[2884057.473] [email protected]_id(52)
[2884057.507] [email protected](10397143)
[2884091.356] -> [email protected](new id wl_callback@52)
[2884092.025] -> [email protected]()
[2884099.940] [email protected]_id(52)

Here is the kodi.log:
https://pastebin.com/9zTzwGFL

Still getting a black screen. I tried adding the code from https://github.com/xbmc/xbmc/pull/20632 but this made no difference (if it is related).
Reply
#58
i think your answer is on lines 255,256 and 265
output "" size 0x0

in the kodi log
Reply
#59
Does any one at Kodi give me some insight into how I can debug this issue?
Reply
#60
CWinSystemWayland::UserFriendlyOutputName returns "". I don't believe this is the issue. It finds 1 output at 1920x1080 called "". Although the comment says it should return "unknown".

https://github.com/xbmc/xbmc/blob/master....cpp#L1061

It could cause further issues in other parts of the code.. need to look at it.
Reply

Logout Mark Read Team Forum Stats Members Help
Cross compiling to aarch640