Linux How to build new PVR addons
#31
ok, my fault. i executed cmake manually before which led to this issue.
Reply
#32
(2015-03-11, 10:23)ironic_monkey Wrote: install kodi-platform, https://github.com/xbmc/kodi-platform.
you also have to execute the install target of kodi to get the cmake helpers and addon bindings installed.

The link didn't work because of an extra dot at the end. https://github.com/xbmc/kodi-platform
Reply
#33
Helllo @wsnipex

I'm trying to adapt your below (quoted) instructions to my case, but am running into an error, most likely because the installation of Kodi that I compiled is installed to /opt/KODI.d (not in /usr or /usr/local).

(2015-04-01, 20:04)wsnipex Wrote:
Code:
cd /home/carel/src/kodi/kodi-platform
cmake -DCMAKE_INSTALL_PREFIX=/usr # or /usr/local, which is the default
make && sudo make install

cd /home/carel/src/kodi/pvr.vdr.vnsi
cmake -DCMAKE_INSTALL_PREFIX=/usr # must match kodis prefix
make && sudo make install

Here are my details:
Code:
/home/jdoe/KODI.d/xbmc-master/   # Source code for Kodi v15b2/Isengard.
/home/jdoe/KODI.d/kodi-platform-master  # Source code for the Kodi Platform
/home/jdoe/KODI.d/pvr.stalker  # Soure code for the pvr.stalker addon
/opt/KODI.d # The directory under which my compiled Kodi has been installed.

Here is the problem:
Code:
$ cd /home/jdoe/KODI.d/kodi-platform-master && cmake -DCMAKE_INSTALL_PREFIX=/opt/KODI.d

Code:
CMake Error at CMakeLists.txt:11 (find_package):
  By not providing "Findplatform.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "platform",
  but CMake did not find one.

  Could not find a package configuration file provided by "platform" with any
  of the following names:

    platformConfig.cmake
    platform-config.cmake

  Add the installation prefix of "platform" to CMAKE_PREFIX_PATH or set
  "platform_DIR" to a directory containing one of the above files.  If
  "platform" provides a separate development package or SDK, be sure it has
  been installed.

What adjustments to your instructions above (both parts) do I need to make for my case? I've tried a few things, but with no luck.

I thank you in advance! Smile

NYCeyes
Reply
#34
as of lately OS platform specific stuff has been split out of kodi-platform into https://github.com/Pulse-Eight/platform
So, you need to install this lib first as well.
Reply
#35
(2015-05-26, 09:23)wsnipex Wrote: as of lately OS platform specific stuff has been split out of kodi-platform into https://github.com/Pulse-Eight/platform
So, you need to install this lib first as well.

Ah, okay. Thank you!
Adding that extra step (which I pre-pended to your original instructions below), solved the issue.

Code:
cd /home/carel/src/kodi/platform-master # Obtained from here: https://github.com/Pulse-Eight/platform
cmake -DCMAKE_INSTALL_PREFIX=/usr # or /usr/local, which is the default
make && sudo make install

cd /home/carel/src/kodi/kodi-platform
cmake -DCMAKE_INSTALL_PREFIX=/usr # or /usr/local, which is the default
make && sudo make install

cd /home/carel/src/kodi/pvr.vdr.vnsi
cmake -DCMAKE_INSTALL_PREFIX=/usr # must match kodis prefix
make && sudo make install

You're always very helpful @wsnipex, and I appreciate it. Thank you. Smile
Reply
#36
I'm having a problem with the platform library. It used to build fine using the command:

Code:
cmake -DCMAKE_BUILD_TYPE=Debug \
      -DCMAKE_INSTALL_PREFIX=$HOME/kodi \
      ..

However, now CMake reports:

Code:
CMake Error at CMakeLists.txt:45 (install):
  install TARGETS given no ARCHIVE DESTINATION for static library target
  "platform".

I got platform to build using:

Code:
cmake -DCMAKE_BUILD_TYPE=Debug \
      -DCMAKE_INSTALL_PREFIX=$HOME/kodi \
      -DCMAKE_INSTALL_LIBDIR=$HOME/kodi/lib \
      -DCMAKE_INSTALL_LIBDIR_NOARCH=$HOME/kodi/lib \
      ..

But when I try to build kodi-platform, I get this error:

Code:
CMake Error at CMakeLists.txt:41 (message):
  -L/home/garrett/kodi//home/garrett/kodi/lib -lplatform;-lpthread

The problem is in the installed platform.pc pkgconfig file. it looks like

Code:
prefix=/home/garrett/kodi
libdir=/home/garrett/kodi//home/garrett/kodi/lib
includedir=/home/garrett/kodi/include
DEPENDENCIES=-lpthread

Name: platform
Description: Platform support library 1.0
Version: 1.0
Libs: -L${libdir} -lplatform
Cflags: -I${includedir}

Do i need to use a different CMake command, or is there a problem figuring out the lib directory?
BTC: 1JtXwJdGdE9YnYgThWBT2StFCU5sEYkbVD (personal), https://kodi.tv/contribute/donate-bitcoin (foundation). Donations in the form of controllers, especially ones that don't work in Kodi, are also appreciated.
Reply
#37
I just commited the fix to platform: https://github.com/Pulse-Eight/platform/...6911c80580
Reply
#38
you rock. still seeing the same cmake error with kodi-platform (although with a correct path now):

Code:
CMake Error at CMakeLists.txt:41 (message):
  -L/home/garrett/kodi/lib -lplatform;-lpthread
BTC: 1JtXwJdGdE9YnYgThWBT2StFCU5sEYkbVD (personal), https://kodi.tv/contribute/donate-bitcoin (foundation). Donations in the form of controllers, especially ones that don't work in Kodi, are also appreciated.
Reply
#39
The issue-11 'Platform' fix that @wsnipex just fixed (btw, I created that now-resolved issue), seems different than your still lingering 'kodi-platform' issue.

I'm of course interested in this, too (for my Fedora based compiles of stalker pvr). Smile
Reply
#40
garbear, can you provide full output? Did you clean kodi-platform after the libplatform fix?
Reply
#41
mixing lists and strings somewhere.
Reply
#42
(2015-07-25, 09:33)wsnipex Wrote: garbear, can you provide full output? Did you clean kodi-platform after the libplatform fix?

sorry, traveling over the weekend. here's the cmake output

Code:
$ mkdir build && cd build
$ cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$HOME/kodi ..
-- The C compiler identification is GNU 4.9.1
-- The CXX compiler identification is GNU 4.9.1
-- 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
-- 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
-- Checking to see if CXX compiler accepts flag -flto
-- Checking to see if CXX compiler accepts flag -flto - yes
-- Found TinyXML: /usr/include  
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Looking for __atomic_fetch_add_4 in atomic
-- Looking for __atomic_fetch_add_4 in atomic - found
-- Performing Test HAS_BUILTIN_SYNC_ADD_AND_FETCH
-- Performing Test HAS_BUILTIN_SYNC_ADD_AND_FETCH - Success
-- Performing Test HAS_BUILTIN_SYNC_SUB_AND_FETCH
-- Performing Test HAS_BUILTIN_SYNC_SUB_AND_FETCH - Success
-- Performing Test HAS_BUILTIN_SYNC_VAL_COMPARE_AND_SWAP
-- Performing Test HAS_BUILTIN_SYNC_VAL_COMPARE_AND_SWAP - Success
CMake Error at CMakeLists.txt:41 (message):
  -L/home/garrett/kodi/lib -lplatform;-lpthread


-- Configuring incomplete, errors occurred!
See also "/home/garrett/Documents/kodi-platform/build/CMakeFiles/CMakeOutput.log".
See also "/home/garrett/Documents/kodi-platform/build/CMakeFiles/CMakeError.log".
BTC: 1JtXwJdGdE9YnYgThWBT2StFCU5sEYkbVD (personal), https://kodi.tv/contribute/donate-bitcoin (foundation). Donations in the form of controllers, especially ones that don't work in Kodi, are also appreciated.
Reply
#43
this is again something stupid with libplatform. Like notspiff said, its mixing lists and strings:
in lib/platform/platform-config.cmake:
Code:
else(WIN32)
  set (platform_LIBRARY "-L/usr/lib/x86_64-linux-gnu -lplatform")
endif(WIN32)
set (platform_LIBRARIES ${platform_LIBRARY} "-lpthread")
try to change it to:
Code:
else(WIN32)
  set (platform_LIBRARY "-L/usr/lib/x86_64-linux-gnu -lplatform")
endif(WIN32)
set (platform_LIBRARIES "${platform_LIBRARY} -lpthread")
Reply
#44
good news! i made the change, ran cmake again, and got this output:

Code:
CMake Error at CMakeLists.txt:41 (message):
  -L/home/garrett/kodi/lib -lplatform -lpthread

Hm... that looks right, yea? So the error must be caused by something else. I deleted everything and started fresh - kodi, platform, kodi-platform, all the add-ons, and the entire cmake install prefix

Now things are working correctly, even without your change applied. Something must have been stale (or possibly I forgot a git pull --rebase was was using a really old repo) as kodi-platform builds and installs now. thanks again!
BTC: 1JtXwJdGdE9YnYgThWBT2StFCU5sEYkbVD (personal), https://kodi.tv/contribute/donate-bitcoin (foundation). Donations in the form of controllers, especially ones that don't work in Kodi, are also appreciated.
Reply
#45
doh
some issues simply solves themselves Smile
Reply
 
Thread Rating:
  • 2 Vote(s) - 4 Average



Logout Mark Read Team Forum Stats Members Help
How to build new PVR addons42