garbear / xbmc

XBMC Main Repository
http://xbmc.org
Other
134 stars 53 forks source link

[linux] Binary addons loading from wrong directory #34

Open acmiyaguchi opened 9 years ago

acmiyaguchi commented 9 years ago

Addons built in linux using make -C tools/depends/target/binary-addons PREFIX=$HOME/kodi are not loaded properly. I have only tested game.libretro.nestopia and game.libretro.2048, but they both look for the shared object file in the wrong directory.

Here are the relevant lines from running make -C tools/depends/target/binary-addons PREFIX=$HOME/kodi ADDONS="game.libretro.nestopia"

Install the project...
-- Install configuration: "Release"
-- Installing: /home/anthony/kodi/lib/kodi/addons/game.libretro.nestopia/game.libretro.nestopia.so
-- Installing: /home/anthony/kodi/share/kodi/addons/game.libretro.nestopia

Instead of looking into the /lib folder, the system attempts to load the library from the /share folder, as seen in $HOME/.kodi/temp/kodi.log

13:32:21 T:140160131368896   DEBUG: SECTION:LoadDLL(/home/anthony/kodi/lib/kodi/addons/game.libretro/game.libretro.so)
13:32:21 T:140160131368896   DEBUG: Loading: /home/anthony/kodi/lib/kodi/addons/game.libretro/game.libretro.so
13:32:21 T:140160131368896   ERROR: AddOnLog: NES (Nestopia): Unable to load /home/anthony/kodi/share/kodi/addons/game.libretro.nestopia/game.libretro.nestopia.so: cannot open shared object file: No such file or directory
13:32:21 T:140160131368896   ERROR: AddOnLog: NES (Nestopia): Failed to load /home/anthony/kodi/share/kodi/addons/game.libretro.nestopia/game.libretro.nestopia.so
13:32:21 T:140160131368896   ERROR: ADDON: Dll NES (Nestopia) - Client returned bad status (6) from Create and is not usable

This can be fixed by manually copying over the shared object from the /lib folder into the /share folder.

garbear commented 9 years ago

The correct path is lib/. When running from kodi/addons/game.libretro.nestopia, the .so and the add-on fluff is in the same directory (IAddon::Profile())

@Montellese do we need an IAddon::LibProfile(), or is there another way to figure out the lib/ directory when it's not combined with share/?

Montellese commented 9 years ago

Unfortunately I'm not an expert on the installation of binary addons on linux but I'm sure @wsnipex can jump in and explain.

garbear commented 9 years ago

Right now we're loading the lib from special://profile/addon_data/game.libretro.nestopia/. How can I figure out which directory the lib is in? Is there a special URL for this?

garbear commented 8 years ago

Relevant discussion: https://github.com/garbear/xbmc/commit/1c18dec30#commitcomment-19530533