kodi and kodi-debug: build-id mismatch

Description:

While trying to debug a segmentation fault triggered by the Play-Random-Videos addon I noticed that kodi-debug doesn't provided the right debug information.

warning: the debug information found in "/usr/lib/debug//usr/lib/kodi/kodi.bin.debug" does not match "/usr/lib/kodi/kodi.bin" (CRC mismatch).                                                                       
(No debugging symbols found in /usr/lib/kodi/kodi.bin)

Additional info:

There seems to be two reasons for the mismatch.

  1. PKGBUILD contains options=(!lto) and -DUSE_LTO=ON. The latter should be changed to OFF
  2. build() builds kodi and kodi-gles.

With USE_LTO switched to OFF. The symbols provided by kodi-debug match kodi-gles but not kodi.

Steps to reproduce:

  1. Install the Play-Random-Videos plugin
  2. Select "Play random" from context menu
  3. Segmentation fault
  4. $ coredumpctl debug