Solved Compilation of binary addons in Linux
#31
Hello everybody.
I have a problem with FCEUmm emulator - I have Kodi installed on Ubuntu Server 16.04 from kodi repository, so I installed kodi-game-libretro from PPA, cloned Kodi-Install repo, adjusted build-binary-addons-libretro-cores.sh to build only game.libretro.fceumm. Compilation was successful so I copied all files and directories from /home/kodi/bin-kodi to /usr, then enabled addon in Kodi settings but when I try to run any NES rom (*.nes) Kodi says 'Add-on couldn't be loaded' and in kodi.log I see a couple of errors:
Code:
19:27:04.310 T:139945204856576   ERROR: GetDirectory - Error getting
19:27:07.746 T:139946235836800   ERROR: Previous line repeats 5 times.
19:27:07.746 T:139946235836800   ERROR: ADDON: Could not locate game.libretro.fceumm.so
19:27:07.798 T:139946235836800   ERROR: AddOnLog: Nintendo - NES / Famicom (FCEUmm): Unable to assign function: /usr/lib/x86_64-linux-gnu/kodi/kodi-x11: undefined symbol: retro_set_environment
19:27:07.798 T:139946235836800   ERROR: AddOnLog: Nintendo - NES / Famicom (FCEUmm): Failed to load
19:27:07.798 T:139946235836800   ERROR: ADDON: Dll Nintendo - NES / Famicom (FCEUmm) - Client returned bad status (5) from Create and is not usable
19:27:09.766 T:139946235836800   ERROR: RetroPlayer[PLAYER]: Failed to initialize game.libretro.fceumm
Reply
#32
(2019-02-04, 19:33)slimp Wrote: Hello everybody.
I have a problem with FCEUmm emulator - I have Kodi installed on Ubuntu Server 16.04 from kodi repository, so I installed kodi-game-libretro from PPA, cloned Kodi-Install repo, adjusted build-binary-addons-libretro-cores.sh to build only game.libretro.fceumm. Compilation was successful so I copied all files and directories from /home/kodi/bin-kodi to /usr, then enabled addon in Kodi settings but when I try to run any NES rom (*.nes) Kodi says 'Add-on couldn't be loaded' and in kodi.log I see a couple of errors:
Code:
19:27:04.310 T:139945204856576   ERROR: GetDirectory - Error getting
19:27:07.746 T:139946235836800   ERROR: Previous line repeats 5 times.
19:27:07.746 T:139946235836800   ERROR: ADDON: Could not locate game.libretro.fceumm.so
19:27:07.798 T:139946235836800   ERROR: AddOnLog: Nintendo - NES / Famicom (FCEUmm): Unable to assign function: /usr/lib/x86_64-linux-gnu/kodi/kodi-x11: undefined symbol: retro_set_environment
19:27:07.798 T:139946235836800   ERROR: AddOnLog: Nintendo - NES / Famicom (FCEUmm): Failed to load
19:27:07.798 T:139946235836800   ERROR: ADDON: Dll Nintendo - NES / Famicom (FCEUmm) - Client returned bad status (5) from Create and is not usable
19:27:09.766 T:139946235836800   ERROR: RetroPlayer[PLAYER]: Failed to initialize game.libretro.fceumm
My bad - I copied compiled addon from /home/kodi/bin-kodi/lib/kodi/addons/ to /usr/lib/x86_64-linux-gnu/kodi/addons and it works now
Reply
#33
Hello everybody
First to apologize because my English is not good, and that makes it more difficult to solve the problems that appear to me. Also I have no experience in Linux. Many thanks for your work.
When I have to compile Kodi, there is an error. I run $ sudo ./configure-kodi.sh and this appears: "Using 2 processors. Make: ** No targets specified and no makefile found.Stop".
I don't understand the difference between kodi user and root. Maybe there is the problem. I don't know how to be a kodi user.
Reply
#34
(2019-05-08, 23:25)peibolmeneibol Wrote: Hello everybody
First to apologize because my English is not good, and that makes it more difficult to solve the problems that appear to me. Also I have no experience in Linux. Many thanks for your work.
When I have to compile Kodi, there is an error. I run $ sudo ./configure-kodi.sh and this appears: "Using 2 processors. Make: ** No targets specified and no makefile found.Stop".
I don't understand the difference between kodi user and root. Maybe there is the problem. I don't know how to be a kodi user.

Your English is OK.

root is the name of the administrator user in Unix/Linux systems. kodi is the name of a regular user. In the scripts I use the user named kodi because it simplifies the path creation. For example, the home directory of user kodi is /home/kodi/ and all paths (Kodi source path, Kodi installation path, etc.) are based on that.

If you have to use sudo that means you are a normal user, not root. sudo is used to invoke commands as if you were user root. To know the name of the current user type whoami. To create a new user named kodi use the command useradd, follow the tutorial here.
Reply
#35
(2019-05-09, 08:55)Wintermute0110 Wrote:
(2019-05-08, 23:25)peibolmeneibol Wrote: Hello everybody
First to apologize because my English is not good, and that makes it more difficult to solve the problems that appear to me. Also I have no experience in Linux. Many thanks for your work.
When I have to compile Kodi, there is an error. I run $ sudo ./configure-kodi.sh and this appears: "Using 2 processors. Make: ** No targets specified and no makefile found.Stop".
I don't understand the difference between kodi user and root. Maybe there is the problem. I don't know how to be a kodi user.

Your English is OK.

root is the name of the administrator user in Unix/Linux systems. kodi is the name of a regular user. In the scripts I use the user named kodi because it simplifies the path creation. For example, the home directory of user kodi is /home/kodi/ and all paths (Kodi source path, Kodi installation path, etc.) are based on that.

If you have to use sudo that means you are a normal user, not root. sudo is used to invoke commands as if you were user root. To know the name of the current user type whoami. To create a new user named kodi use the command useradd, follow the tutorial here
Hi, a lot of thanks.
I started again from the beginning, creating the user kodi and being root with the command sudo -i.
I have 2 errors that do not allow me to compile kodi.
The first is with the git checkout command. The message "You are in 'detached HEAD ..." appears. The message "You are in 'detached HEAD ..." appears

When the kodi directory needs to be configured this appears:[font][email protected]_1804[/font]:[font]~/Kodi-Install[/font]$ ./install-build-dependencies-ubuntu-bionic.sh
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?

what am I doing wrong? I followed the instructions.
Reply
#36
(2019-05-10, 15:40)peibolmeneibol Wrote:
(2019-05-09, 08:55)Wintermute0110 Wrote:
(2019-05-08, 23:25)peibolmeneibol Wrote: Hello everybody
First to apologize because my English is not good, and that makes it more difficult to solve the problems that appear to me. Also I have no experience in Linux. Many thanks for your work.
When I have to compile Kodi, there is an error. I run $ sudo ./configure-kodi.sh and this appears: "Using 2 processors. Make: ** No targets specified and no makefile found.Stop".
I don't understand the difference between kodi user and root. Maybe there is the problem. I don't know how to be a kodi user.

Your English is OK.

root is the name of the administrator user in Unix/Linux systems. kodi is the name of a regular user. In the scripts I use the user named kodi because it simplifies the path creation. For example, the home directory of user kodi is /home/kodi/ and all paths (Kodi source path, Kodi installation path, etc.) are based on that.

If you have to use sudo that means you are a normal user, not root. sudo is used to invoke commands as if you were user root. To know the name of the current user type whoami. To create a new user named kodi use the command useradd, follow the tutorial here
Hi, a lot of thanks.
I started again from the beginning, creating the user kodi and being root with the command sudo -i.
I have 2 errors that do not allow me to compile kodi.
The first is with the git checkout command. The message "You are in 'detached HEAD ..." appears. The message "You are in 'detached HEAD ..." appears

When the kodi directory needs to be configured this appears:[font][email protected]_1804[/font]:[font]~/Kodi-Install[/font]$ ./install-build-dependencies-ubuntu-bionic.sh
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?

what am I doing wrong? I followed the instructions.

install-build-dependencies-ubuntu-bionic.sh must be run as root, the rest of the commands as the kodi user. You can use sudo install-build-dependencies-ubuntu-bionic.sh or became root with su. Note that when you are a regular user the promt ends with $ and when you are root with a #.

Do not worry about the "You are in 'detached HEAD ...", it's harmless (your are not a developer and will not make commits into Kodi source Smile).
Reply
#37
(2019-05-10, 20:09)Wintermute0110 Wrote:
(2019-05-10, 15:40)peibolmeneibol Wrote:
(2019-05-09, 08:55)Wintermute0110 Wrote: Your English is OK.

root is the name of the administrator user in Unix/Linux systems. kodi is the name of a regular user. In the scripts I use the user named kodi because it simplifies the path creation. For example, the home directory of user kodi is /home/kodi/ and all paths (Kodi source path, Kodi installation path, etc.) are based on that.

If you have to use sudo that means you are a normal user, not root. sudo is used to invoke commands as if you were user root. To know the name of the current user type whoami. To create a new user named kodi use the command useradd, follow the tutorial here
Hi, a lot of thanks.
I started again from the beginning, creating the user kodi and being root with the command sudo -i.
I have 2 errors that do not allow me to compile kodi.
The first is with the git checkout command. The message "You are in 'detached HEAD ..." appears. The message "You are in 'detached HEAD ..." appears

When the kodi directory needs to be configured this appears:[email protected]_1804:~/Kodi-Install$ ./install-build-dependencies-ubuntu-bionic.sh
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?

what am I doing wrong? I followed the instructions.        

install-build-dependencies-ubuntu-bionic.sh must be run as root, the rest of the commands as the kodi user. You can use sudo install-build-dependencies-ubuntu-bionic.sh or became root with su. Note that when you are a regular user the promt ends with $ and when you are root with a #.

Do not worry about the "You are in 'detached HEAD ...", it's harmless (your are not a developer and will not make commits into Kodi source Smile).        

Thank you for your patience ...
This still does not work, so I checked if there are any errors and I found:
Quote:[email protected]_1804:/home/kodi/Kodi-Install# ./configure-kodi-ubuntu-bionic.sh

-- The CXX compiler identification is GNU 7.4.0
-- The C compiler identification is GNU 7.4.0
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/cc
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Source directory: /home/kodi/kodi-source
-- Build directory: /home/kodi/kodi-build
-- Generator: Single-configuration: Release (Unix Makefiles)
-- CMake Version: 3.10.2
-- System type: Linux
-- Checking to see if CXX compiler accepts flag -std=c++11
-- Checking to see if CXX compiler accepts flag -std=c++11 - yes
-- Found CXX11: -std=c++11  
-- Linker: GNU gold
-- Core system type: linux
-- Platform:
-- CPU: x86_64, ARCH: x86_64-linux
-- Cross-Compiling: FALSE
-- Execute build artefacts on host: TRUE
-- Depends based build:
-- Checking to see if CXX compiler accepts flag -msse
-- Checking to see if CXX compiler accepts flag -msse - yes
-- Checking to see if CXX compiler accepts flag -msse2
-- Checking to see if CXX compiler accepts flag -msse2 - yes
-- Checking to see if CXX compiler accepts flag -msse3
-- Checking to see if CXX compiler accepts flag -msse3 - yes
-- Checking to see if CXX compiler accepts flag -mssse3
-- Checking to see if CXX compiler accepts flag -mssse3 - yes
-- Checking to see if CXX compiler accepts flag -msse4.1
-- Checking to see if CXX compiler accepts flag -msse4.1 - yes
-- Checking to see if CXX compiler accepts flag -msse4.2
-- Checking to see if CXX compiler accepts flag -msse4.2 - yes
-- Checking to see if CXX compiler accepts flag -mavx
-- Checking to see if CXX compiler accepts flag -mavx - yes
-- Checking to see if CXX compiler accepts flag -mavx2
-- Checking to see if CXX compiler accepts flag -mavx2 - yes
-- Found SSE: 1  
-- Found SSE2: 1  
-- Found SSE3: 1  
-- Found SSSE3: 1  
-- Found SSE4_1: 1  
-- Found SSE4_2: 1  
-- Could not find hardware support for AVX (missing: _AVX_TRUE)
-- Could not find hardware support for AVX2 (missing: _AVX2_TRUE)
-- Found Git: /usr/bin/git (found version "2.17.1")
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find Threads (missing: Threads_FOUND)
Call Stack (most recent call first):
  /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.10/Modules/FindThreads.cmake:205 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:101 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/kodi/kodi-build/CMakeFiles/CMakeOutput.log".
See also "/home/kodi/kodi-build/CMakeFiles/CMakeError.log".

what's happening here?
Reply
#38
@peibolmeneibol Your are running configure-kodi-ubuntu-bionic.sh as root and must be run by the kodi user! Please pay attention to the steps of the tutorial, if there is something you don't understand please ask and I will answer here or amend it. If you have been executing scripts as root then delete everything and start over because you may have files with wrong permissions that may mess up the building process.

The threads library is installed by the install-build-dependencies-ubuntu-bionic.sh. Did you execute that as root and press OK to the apt prompts?
Reply
#39
If anyone`s interested, I've forked Wintermute0110's repository and wrapped everything up into a docker container. With the help of x11docker, you can then build a container out run it in your xserver session. You'll still need to manually enable all the binary add-ons as before, but Kodi's home files are being saved to the disk. This is a nice way to play with everything without having to replace a stable version of Kodi.
Reply
#40
(2018-11-15, 16:27)Wintermute0110 Wrote: OK, so I modified the scripts to compile only the Libretro cores you want. The scripts and the documentation are in Github.

@Wintermutu0110 thanks for your scripts and notes. I tried them and got mostly great results except for MAME, I tried building all three MAME cores, they all build without error but suspiciously fast, in like 10/15 seconds inside a virtual machine on a kabylake i7 host. And they dont work when installed, all arcade games fail.

The other cores (beetle-*, bluemsx, genplus) built in the same session worked great. My objective is to build the cores against the official kodi stable release (18.3 in this case, I ubuntu 18.04 LTE) so I can then take the addon bits (library, manifests etc) manually to my 'production' HTPC. I did this and this worked fine for all cores I built except MAME.

Do you know if there is any known issue with MAME in kodi 18.3/ubuntu 18.04?

The one core that errored out was dosbox but I think this is attributable to upstream problems, the source code is missing in the github repo for some reason.

I wonder what is the reason why we dont seem to have unofficial ppas with the li retrocores built for the officially supported linux distros and I am guessing the above could be related.
Reply
#41
(2019-07-08, 14:32)htpcero Wrote: @Wintermutu0110 thanks for your scripts and notes. I tried them and got mostly great results except for MAME, I tried building all three MAME cores, they all build without error but suspiciously fast, in like 10/15 seconds inside a virtual machine on a kabylake i7 host. And they dont work when installed, all arcade games fail.

The other cores (beetle-*, bluemsx, genplus) built in the same session worked great. My objective is to build the cores against the official kodi stable release (18.3 in this case, I ubuntu 18.04 LTE) so I can then take the addon bits (library, manifests etc) manually to my 'production' HTPC. I did this and this worked fine for all cores I built except MAME.

Do you know if there is any known issue with MAME in kodi 18.3/ubuntu 18.04?

The one core that errored out was dosbox but I think this is attributable to upstream problems, the source code is missing in the github repo for some reason.

I wonder what is the reason why we dont seem to have unofficial ppas with the li retrocores built for the officially supported linux distros and I am guessing the above could be related.

To be honest with you I do not use the MAME cores myself. I use external vanilla MAME and Advanced MAME Launcher. I tried to compile one MAME core when developing the scripts and it took about an hour.

The Kodi building system has some problems. For example, when building the cores sometimes the build gets stuck on the patch command and you have to press ENTER and then Y to continue. There could be other issues as well. I'm sure the developers are working on solving those. I have reported this problem in the forum.

Regarding the PPA: I'm not sure why the cores are not available on the PPA. Maybe the Linux developers did not have time to package all the core addons for Ubuntu/Debian, or it is a problem with the building system I mentioned in the previous paragraph. I'm sure the devs are also working on these issues. Keep in mind that Kodi is a volunteer project and maybe the limited developer time is needed on some more important tasks. Garbear, the main Retroplayer developer, recently got a new job and now has little free time, the whole Retroplayer project is suffering from this.
Reply
#42
Thanks for the context!
For arcade I am using the FBA core that is included in the stable ppa, it works really well, may not be as good as MAME but having it neatly integrated with kodi is great.

One issue I noticed from a core built with the script in this thread is with beetle-psx. It works very slow in my apollo-lake HTPC, games are unplayable. I heard retropie can handle light psx emulation so I was hoping my x86 HTPC would handle it too (it is far more powerful than rpi3). Donyou know if there are alternatives to beetlepsx in x86? Folks use psx-rearmed in RPi3 but that one seems to be for ARM only
Reply
#43
@Wintermute0110 / @garbear / @fetzerch, general question on the necessity of compilation.

Isn't it true that the cores are exact copies of the cores already available on the libretro buildbot, or is there something more specific that is required when the core is compiled to use in Kodi?

Just as an experiment, I did the following:
  • Took the latest fbneo buildbot core from libretro
  • Made a copy of the exisiting 'game.libretro.fbalpha' binary addon in Kodi on my local installation and made it 'game.libretro.fbneo'
  • Replaced all instances of 'fbalpha' with 'fbneo' in the folder structure files (addon.xml, settings.xml, etc, note that the settings.xml may have to be updated a little more specifically based on the available core options)
  • Replaced the binary in my new 'game.libretro.fbneo' addon folder with the one from the libretro buildbot, renamed it accordingly
  • Started Kodi and enabled my new addon
  • Launched a game using my newly created addon

The game launched just fine. Kodi log shows:

DEBUG: RetroPlayer[PLAYER]: Using game client game.libretro.fbneo
Image

At any rate, if the cores are in fact exact copies of the libretro cores, then would it just be easier to have a tool generate the addons from the existing/available cores?
Reply
#44
Yes, the cores are essentially copies of libretro cores. Sometimes we patch, but very rarely. You can take a libretro core, give is some XML and add-on fluff, and it will load in Kodi.
Reply
#45
(2019-07-09, 08:08)htpcero Wrote: Thanks for the context!
For arcade I am using the FBA core that is included in the stable ppa, it works really well, may not be as good as MAME but having it neatly integrated with kodi is great.

One issue I noticed from a core built with the script in this thread is with beetle-psx. It works very slow in my apollo-lake HTPC, games are unplayable. I heard retropie can handle light psx emulation so I was hoping my x86 HTPC would handle it too (it is far more powerful than rpi3). Donyou know if there are alternatives to beetlepsx in x86? Folks use psx-rearmed in RPi3 but that one seems to be for ARM only

Go to Kodi settings, Game settings, disable Rewinding and Autosave. This should improve the performance (specially the rewinding). On top of that, I'm not sure about the Kodi implementation of the rendering engine. Some people have reported performance issues when comparing Retroplayer with Retroarch. Keep in mind Retroplayer is still kind of beta, I'm sure it will improve a lot over time.

About your particular PSX question: my HTPC is an intel NUC i5, like 5 years old, with Ubuntu. I use Retroarch and beetlepsx with software rendering works like a charm. I have finished Castlevania, TR 4 and FF VIII with no issues. When using Retroplayer I can feel it is not as "fluid" as Retroarch, but I guess compared with the Pi the old NUC is so powerful you cannot really notice the performance issues.

I'm thinking on upgrading the NUC and buy the latest, more powerful device (the Alienware-like NUC Laugh ), because of OpenGL cores such as dolphin (GameCube is playable but not a full framerate and Wii is almost unplayable) and desmume (some games run at full FR but others don't). Kodi Retroplayer does not support OpenGL cores yet, so you won't have this problem and I will wait a bit for the upgrade.
Reply
 
Thread Rating:
  • 0 Vote(s) - 0 Average



Logout Mark Read Team Forum Stats Members Help
Compilation of binary addons in Linux00