v17 cmake build system - how to user-specify $libdir=lib64 ?
#16
@wsnipex

> You can now disable it with -DENABLE_SMBCLIENT=OFF

close, but not quite ...
Code:
git log | head
    commit 75e0645bf4d7adf372b491783c1a06c30a713598
    Author: wsnipex <[email protected]>
    Date:   Sun Aug 28 20:33:16 2016 +0200

        [cmake] Samba is an optional dependency

    commit ff6acbba85ccc93c1c30907c432f1e855913d1b1
    Author: wsnipex <[email protected]>
    Date:   Sun Aug 28 15:13:21 2016 +0200

    cd build
    cmake  -DENABLE_SMBCLIENT=OFF ...
        ...
        -- #---- CONFIGURATION ----#
        -- -- PATH config --
        ...
        -- SMBCLIENT enabled: No
        ...

        cmake --build . -- VERBOSE=1 -j4
            ...
            [ 30%] Building CXX object CMakeFiles/libkodi.dir/usr/local/src/kodi17/xbmc/filesystem/SMBDirectory.cpp.o
            /usr/bin/g++-6   -DNPT_CONFIG_ENABLE_LOGGING -I/usr/local/src/kodi17 -I/usr/local/src/kodi17/addons/library.xbmc.addon -I/usr/local/src/kodi17/lib -I/usr/local/src/kodi17/lib/gtest/include -I/usr/local/src/kodi17/xbmc -I/usr/local/src/kodi17/xbmc/linux -I/usr/local/src/kodi17/xbmc/cores/VideoPlayer -I/usr/local/src/kodi17/build/build -I/usr/local/include -I/usr/local/src/kodi17/build/build/cpluff/include -I/usr/local/src/kodi17/build/build/libdvd/include -I/usr/include/python2.7 -I/usr/include/lzo -I/usr/local/src/kodi17/build/build/include -I/usr/local/mariadb/include -I/usr/include/libxml2 -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/libdrm -I/usr/local/src/kodi17/xbmc/cores/AudioEngine -I/usr/local/src/kodi17/lib/libUPnP -I/usr/local/src/kodi17/lib/libUPnP/Platinum/Source/Core -I/usr/local/src/kodi17/lib/libUPnP/Platinum/Source/Platinum -I/usr/local/src/kodi17/lib/libUPnP/Platinum/Source/Devices/MediaConnect -I/usr/local/src/kodi17/lib/libUPnP/Platinum/Source/Devices/MediaRenderer -I/usr/local/src/kodi17/lib/libUPnP/Platinum/Source/Devices/MediaServer -I/usr/local/src/kodi17/lib/libUPnP/Platinum/Source/Extras -I/usr/local/src/kodi17/lib/libUPnP/Neptune/Source/Core -I/usr/local/src/kodi17/lib/libUPnP/Neptune/Source/System/Posix  -I/usr/include/freetype2 -I/usr/local/include -std=c++11 -O3 -DNDEBUG   -D_LINUX -DTARGET_POSIX -DTARGET_LINUX -D__STDC_CONSTANT_MACROS -D_FILE_DEFINED -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_STD__U16_STRING=1 -DHAVE_STD__U32_STRING=1 -DHAVE_CHAR16_T=1 -DHAVE_CHAR32_T=1 -DHAVE_STDINT_H=1 -DHAS_BUILTIN_SYNC_ADD_AND_FETCH=1 -DHAS_BUILTIN_SYNC_SUB_AND_FETCH=1 -DHAS_BUILTIN_SYNC_VAL_COMPARE_AND_SWAP=1 -DHAVE_POSIX_FADVISE=1 -DHAVE_LOCALTIME_R=1 -DLIRC_DEVICE=\"/var/run/lirc/lircd\" -DHAVE_LIRC=1 -DFFMPEG_VER_SHA=\"3.1.2-Krypton-Beta1\" -DUSE_STATIC_FFMPEG=1 -DHAVE_LIBMICROHTTPD=1 -DHAVE_MYSQL=1 -DHAVE_LIBSSH=1 -DHAVE_LIBXSLT=1 -DHAVE_ALSA=1 -DUSE_ALSA=1 -DHAVE_LIBUDEV=1 -DHAVE_DBUS=1 -DHAVE_LIBVDPAU=1 -DHAVE_LIBVA=1 -DHAVE_LIBCEC=1 -DHAVE_LIBBLURAY=1 -DHAVE_LIBPLIST=1 -DHAVE_LIBNFS=1 -DHAVE_OPENSSL=1 -DUSE_UPNP=1 -DHAVE_XBMC_NONFREE=1 -DHAS_DVD_DRIVE -DHAVE_LIBGL=1 -DHAVE_X11=1 -DHAVE_LIBXRANDR=1 -DHAVE_LIBEGL=1 -DBIN_INSTALL_PATH=\"/usr/local/kodi/lib64/kodi\" -DINSTALL_PATH=\"/usr/local/kodi/share/kodi\" -std=c++11 -o CMakeFiles/libkodi.dir/usr/local/src/kodi17/xbmc/filesystem/SMBDirectory.cpp.o -c /usr/local/src/kodi17/xbmc/filesystem/SMBDirectory.cpp
            /usr/local/src/kodi17/xbmc/filesystem/SMBDirectory.cpp:48:26: fatal error: libsmbclient.h: No such file or directory
             #include <libsmbclient.h>
                                      ^
            compilation terminated.
            CMakeFiles/libkodi.dir/build.make:3425: recipe for target 'CMakeFiles/libkodi.dir/usr/local/src/kodi17/xbmc/filesystem/SMBDirectory.cpp.o' failed
            gmake[2]: *** [CMakeFiles/libkodi.dir/usr/local/src/kodi17/xbmc/filesystem/SMBDirectory.cpp.o] Error 1
            gmake[2]: *** Waiting for unfinished jobs....
            gmake[2]: Leaving directory '/usr/local/src/kodi17/build'
            CMakeFiles/Makefile2:778: recipe for target 'CMakeFiles/libkodi.dir/all' failed
            gmake[1]: *** [CMakeFiles/libkodi.dir/all] Error 2
            gmake[1]: Leaving directory '/usr/local/src/kodi17/build'
            Makefile:130: recipe for target 'all' failed
            gmake: *** [all] Error 2


how about the openssl/gnutls/gcrypt biz? can/should an openssl-only build be possible?
Reply
#17
samba build is fixed with the new version of the last commit, you need to git reset --hard

Gnutls is needed for ffmpegs TLS support, since ffmpeg claims being non redistributable if you link it against openssl.
You can patch the cmake files to do that. I agree its kinda stupid though.
Reply
#18
> samba build is fixed with the new version of the last commit, you need to git reset --hard

my bad

Code:
git checkout remotes/wsnipex/cmake-internal-libs
git reset --hard
mkdir -p build
cd       build
THIS_PREFIX="/usr/local/kodi"
cmake \
-DCMAKE_INSTALL_PREFIX=${THIS_PREFIX} \
-DCMAKE_INSTALL_LOCALSTATEDIR=/var/lib \
...
../project/cmake/
cmake --build . -- VERBOSE=1 -j4
        ...
        [100%] Built target kodi
        ...

rm -rf $THIS_PREFIX
make install

tree -L 1 /usr/local/kodi
    /usr/local/kodi
    ├── bin
    ├── include
    ├── lib64
    └── share

find $THIS_PREFIX -name "kodi.bin"
    /usr/local/kodi/lib64/kodi/kodi.bin

/usr/local/kodi/lib64/kodi/kodi.bin --version
    17.0-BETA2 Git:20160828-ff6acbb Media Center Kodi
    Copyright (C) 2005-2013 Team Kodi - http://kodi.tv

> ldd /usr/local/kodi/lib64/kodi/kodi.bin | egrep -i "samba|smb"
>

looks good!

> Gnutls is needed for ffmpegs TLS support, since ffmpeg claims being non redistributable if you link it against openssl.
> You can patch the cmake files to do that. I agree its kinda stupid though.

Does a non-default, user-flag ( e.g. -DENABLE_GNUTLS=0 ) somehow violate licensing? In general I prefer not to have gnutls dependencies.
Reply
#19
If you don't redistribute, it doesn't violate licensing. A PR for the necessary cmake changes is welcome, since this has very low prio on my list.
Reply
#20
> not yet tested in operation. Will do that after I backup/migrate my Jarvis install.

kodi17 build is up & running, with only one immediately obvious hiccup ... window timeout/blank -- NOT the linux screen, but the Kodi window -- seems to be ~ a minute.

While running long-running data export, e.g., the window blanks, and un-blanking is verrrrry unresponsive. Moving the mouse in the window takes ~ 30secs - 1 min to unblank the screen. Haven't found a setting, or bug, for that yet ...

Other than that, seems smooth sailing so far.
Reply
#21
For your kodi bugs: No Debug Log no issue - devs tend to skip text while there is no Debug Log attached.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply

Logout Mark Read Team Forum Stats Members Help
cmake build system - how to user-specify $libdir=lib64 ?0