Kodi Leia and BSD
Am I correct to assume that FreeBSD support is still something that is being worked on and not usable at present time?

I got almost instant build error when I tried to build from source on FreeBSD 11.1-RELEASE in a virtual machine. I was browsing the code and suddenly noticed 
#if defined(TARGET_FREEBSD)

and other similar "freebsd"-related additions  in the kodi code, then decided to try..


Testing by substituting -DCORE_SYSTEM_NAME=linux (instead of freebsd) it went further than that, even though I knew it was wrong and predictably it did error out as well.
the sad truth is that the only kodi dev that cared for BSD has been MIA for a while, so the cmake build system hasn't been updated to support it.
Any help there is welcome
Copy cmake/platform/linux/X11.cmake to cmake/platform/freebsd and try again.
This should fix the error you currently see, not sure if everything else will work.
Thanks for the tip. Yes, it would now add "x11" to available platform options.

Had to manually add bunch of dependencies.

Went more or less fine (had to manually add bunch of dependencies, and one time puzzle out shell script variable) until 
Quote:CMake Error at cmake/modules/FindFmt.cmake:61 (find_package):
  Could not find a package configuration file provided by "FMT" (requested
  version 3.0.1) with any of the following names:


  Add the installation prefix of "FMT" to CMAKE_PREFIX_PATH or set "FMT_DIR"
  to a directory containing one of the above files.  If "FMT" provides a
  separate development package or SDK, be sure it has been installed.
Call Stack (most recent call first):
  cmake/scripts/common/Macros.cmake:341 (find_package)
  CMakeLists.txt:166 (core_require_dep)

-- Configuring incomplete, errors occurred!

Since it's past 1 AM, I am giving up for tonight.
Try again with -DENABLE_INTERNAL_FMT=ON as additional cmake argument.
(2017-10-22, 09:02)Rechi Wrote: Try again with -DENABLE_INTERNAL_FMT=ON as additional cmake argument.

Thank you both for assistance Smile Got tired of doing it in virtual machine and moved the attempt of building Kodi over into physical machine.


I found that I could also use the fmtlib (https://github.com/fmtlib/fmt). 
It seems to build and install just fine on FreeBSD without any modifications needed.

I could find existing binary packages for rapidJSON (/devel/rapidjson) and CrossGuid (/devel/libcrossguid). Kodi build system seemed to accept all of them without further complaints

Had to
Quote: cp ../cmake/scripts/linux/ExtraTargets.cmake ../cmake/scripts/freebsd/
to get the configuring/generating finished.

-- #---- CONFIGURATION ----#
-- Platform: x11
-- -- PATH config --
-- Prefix: /usr/local
-- Libdir: /usr/local/lib
-- Bindir: /usr/local/bin
-- Includedir: /usr/local/include
-- Datarootdir: /usr/local/share
-- Datadir: /usr/local/share
-- Docdir: /usr/local/share/doc/kodi
-- ALSA enabled: Yes
-- AVAHI enabled: Yes
-- BLUETOOTH enabled: No
-- CAP enabled: No
-- CCACHE enabled: Yes
-- DBUS enabled: Yes
-- LCMS2 enabled: Yes
-- MDNS enabled: No
-- MICROHTTPD enabled: Yes
-- MYSQLCLIENT enabled: Yes
-- PULSEAUDIO enabled: No
-- PYTHON enabled: Yes
-- SMBCLIENT enabled: Yes
-- SNDIO enabled: Yes
-- SSH enabled: Yes
-- UDEV enabled: Yes
-- XSLT enabled: Yes
-- VAAPI enabled: Yes
-- VDPAU enabled: Yes
-- GLX enabled: Yes
-- PLIST enabled: Yes
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ahto/xbmc/build

Question: What should provide X11/WinSystemX11GL.h ? Some Xorg-related devel package?
[  3%] Building CXX object build/cores/audioengine/CMakeFiles/audioengine.dir/Engines/ActiveAE/ActiveAE.cpp.o
In file included from /home/ahto/xbmc/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp:35:
/home/ahto/xbmc/xbmc/windowing/WindowingFactory.h:60:10: fatal error: 'X11/WinSystemX11GL.h' file not found
#include "X11/WinSystemX11GL.h"
1 error generated.
gmake[2]: *** [build/cores/audioengine/CMakeFiles/audioengine.dir/build.make:255: build/cores/audioengine/CMakeFiles/audioengine.dir/Engines/ActiveAE/ActiveAE.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:1615: build/cores/audioengine/CMakeFiles/audioengine.dir/all] Error 2
gmake: *** [Makefile:141: all] Error 2
I am getting close to the "finish line" now with building Kodi on FreeBSD (past 90%) but I have sneaking suspicion I have ignored something I shouldn't have.

for example:
Scanning dependencies of target wrap_libdvdnav
[ 97%] Generating system/players/VideoPlayer/libdvdnav-x86_64-freebsd.so
[ 97%] Built target wrap_libdvdnav
Scanning dependencies of target wrap_libcpluff
[ 98%] Generating system/libcpluff-x86_64-freebsd.so
[ 98%] Built target wrap_libcpluff
Scanning dependencies of target kodi-libraries
[ 98%] Built target kodi-libraries
Scanning dependencies of target kodi
[ 98%] Building CXX object CMakeFiles/kodi.dir/xbmc/platform/posix/main.cpp.o
/home/ahto/xbmc/xbmc/platform/posix/main.cpp:108:13: error: use of undeclared
     identifier 'LC_NUMERIC'
 setlocale(LC_NUMERIC, "C");
1 error generated.
gmake[2]: *** [CMakeFiles/kodi.dir/build.make:63: CMakeFiles/kodi.dir/xbmc/platform/posix/main.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:648: CMakeFiles/kodi.dir/all] Error 2
gmake: *** [Makefile:141: all] Error 2

Logic chain: I admit I am more or less bumbling through it and taking it as learning-on-the-go experience with only very basic grasp of programming.

First I ran into 'undeclared strverscmp' which actually does appear to be exist in /xbmc/freebsd/FreeBSDGNUReplacements.c . Well, I declared it (again), compiler accepted the change and I did not think about it more.

Then ran twice into time_t error (two different occurences). Had to introduce couple of header files (sys/types.h and utime.h) between #if defined  ... #endif. But since on both of the header files there were no other such #if defined .. #endif it did not appear very clean.

Where should I start looking to fix this? I assume somewhere must be a file I could do those freebsd-specific declarations once, without having to edit cpp or h files 'downstream'?

LC_NUMERIC error is second 'LC' error.. Former was LC_ALL. I assume these should not happen at all.
try https://pastebin.com/rVt5DMct
(2017-10-23, 23:13)Rechi Wrote: try https://pastebin.com/rVt5DMct

Ty but using that particular file did not seem to help Sad
(2017-10-23, 23:13)Rechi Wrote: try https://pastebin.com/rVt5DMct

This should only fix the LC_NUMERIC issue.
For the time_t error I haven't seen a compiler output.
(2017-10-24, 18:04)Rechi Wrote:
(2017-10-23, 23:13)Rechi Wrote: try https://pastebin.com/rVt5DMct

This should only fix the LC_NUMERIC issue.
For the time_t error I haven't seen a compiler output.

Understood then. LC_-issues appeared towards the end of the build process (past 70% and 90%) so it's natural I couldn't spot any differences while I was still figuring out better fix for the issues at the beginning.
If anyone else should be interested:

Fixes couple of missing files and modifies slightly third (assigns x11 value on CORE_PLATFORM_NAME on FreeBSD host. Until now you had to specify -DCORE_PLATFORM_NAME=x11 manually when your host was FreeBSD). Without these you'd error out on FreeBSD host before getting to compiling.

Still fighting it out with linking errors..
It would be great if you can create a PR with all your changes at http://github.com/xbmc/xbmc after you got Kodi compiled completely.
Yeah, I would do that, once I get there.

Besides family and other commitments, progress is rather slow.
Thread Rating:
  • 0 Vote(s) - 0 Average

Logout Mark Read Team Forum Stats Members Help
Kodi Leia and BSD00