kodi-game / peripheral.steamcontroller

Steam controller driver for Kodi
GNU General Public License v2.0
23 stars 9 forks source link

Build failures against kodi 18 #7

Closed davidheitman closed 6 years ago

davidheitman commented 6 years ago

I've encountered two build issues with this addon against latest kodi. The first is a series of include statements that don't use the correct path to the header. I've got a branch that fixes that (https://github.com/Lou-Cipher/peripheral.steamcontroller/tree/kodi-peripheral-utils-fix), but now I'm running into linking issues, see the following:

[ 66%] Linking CXX shared library peripheral.steamcontroller.so /usr/bin/ld: /home/loucipher/repos/Lou-Cipher/xbmc/kodi-addon/build/depends/lib/libusb-1.0.a(libusb_1_0_la-core.o): relocation R_X86_64_PC32 against symbol `stderr@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: final link failed: Bad value collect2: error: ld returned 1 exit status CMakeFiles/peripheral.steamcontroller.dir/build.make:433: recipe for target 'peripheral.steamcontroller.so.0.9.0' failed make[5]: [peripheral.steamcontroller.so.0.9.0] Error 1 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/peripheral.steamcontroller.dir/all' failed make[4]: [CMakeFiles/peripheral.steamcontroller.dir/all] Error 2 Makefile:129: recipe for target 'all' failed make[3]: [all] Error 2 CMakeFiles/peripheral.steamcontroller.dir/build.make:112: recipe for target 'peripheral.steamcontroller-prefix/src/peripheral.steamcontroller-stamp/peripheral.steamcontroller-build' failed make[2]: [peripheral.steamcontroller-prefix/src/peripheral.steamcontroller-stamp/peripheral.steamcontroller-build] Error 2 CMakeFiles/Makefile2:68: recipe for target 'CMakeFiles/peripheral.steamcontroller.dir/all' failed make[1]: [CMakeFiles/peripheral.steamcontroller.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: [all] Error 2

Not sure how to make cmake build libusb with -fPIC, but that should be all that is required, aside from the include changes in my branch.

garbear commented 6 years ago

Does https://github.com/kodi-game/peripheral.steamcontroller/pull/6 fix your build failure?

davidheitman commented 6 years ago

Fixes the compile, but not the link:

[100%] Linking CXX shared library peripheral.steamcontroller.so /usr/bin/ld: /home/loucipher/repos/Lou-Cipher/xbmc/kodi-addon/build/depends/lib/libusb-1.0.a(libusb_1_0_la-core.o): relocation R_X86_64_PC32 against symbol `stderr@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: final link failed: Bad value collect2: error: ld returned 1 exit status CMakeFiles/peripheral.steamcontroller.dir/build.make:433: recipe for target 'peripheral.steamcontroller.so.0.10.0' failed make[5]: [peripheral.steamcontroller.so.0.10.0] Error 1 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/peripheral.steamcontroller.dir/all' failed make[4]: [CMakeFiles/peripheral.steamcontroller.dir/all] Error 2 Makefile:129: recipe for target 'all' failed make[3]: [all] Error 2 CMakeFiles/peripheral.steamcontroller.dir/build.make:112: recipe for target 'peripheral.steamcontroller-prefix/src/peripheral.steamcontroller-stamp/peripheral.steamcontroller-build' failed make[2]: [peripheral.steamcontroller-prefix/src/peripheral.steamcontroller-stamp/peripheral.steamcontroller-build] Error 2 CMakeFiles/Makefile2:68: recipe for target 'CMakeFiles/peripheral.steamcontroller.dir/all' failed make[1]: [CMakeFiles/peripheral.steamcontroller.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: [all] Error 2

I'm 100% certain I've run into this same build error before in the past few days, but I've been messing with lots of stuff. I believe libusb gets built by the kodi addon system, but I don't know how to force it to use fPIC for the build.

davidheitman commented 6 years ago

I believe the linker issue being a separate matter, we can close this issue.

garbear commented 6 years ago

OK. Best to skip this add-on for now, as it has an infinite loop bug. I plan to finish this and several other peripheral add-ons once the new Player Manager is released.