pulse-eight / platform Goto Github PK
View Code? Open in Web Editor NEWPlatform support library used by libCEC and binary add-ons for Kodi
Platform support library used by libCEC and binary add-ons for Kodi
Having cloned the repo down on my RPI and built the platform, I get compiler issues when referencing the platform from 3.party. It seems like it origins from this package:
/usr/bin/ld: /usr/local/lib/libp8-platform.a(StringUtils.cpp.o): undefined reference to symbol '_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev@@GLIBCXX_3.4.21'
//usr/lib/arm-linux-gnueabihf/libstdc++.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
the libstdc++ is 6.3.0-18 and I had no issue building the platform
on a source build
cd /develop/
mkdir tmp
cd tmp
git clone https://github.com/Pulse-Eight/platform
cd platform
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/develop/tmp/P8 -DCMAKE_INSTALL_LIBDIR=lib64 -DBUILD_SHARED_LIBS=1
creates a PKG-CONFIG file
cat P8.pc
prefix=/develop/tmp/P8
libdir=/develop/tmp/P8//develop/tmp/platform/build/lib64
includedir=/develop/tmp/P8/include
DEPENDENCIES=-lpthread
Name: P8
Description: Pulse-Eight platform support library 2.1
Version: 2.1.0
Libs: -L${libdir} -lP8
Cflags: -I${includedir}
where the value for libdir
libdir=/develop/tmp/P8//develop/tmp/platform/build/lib64
is wrong. it should be just
libdir=/develop/tmp/P8/lib64
and then
make
make install
never installs the .pc file , or the LIBS, in the target dir
make install
[100%] Built target P8
Install the project...
-- Install configuration: ""
-- Up-to-date: /develop/tmp/platform/build/lib64/libP8.so.2.1.0
-- Up-to-date: /develop/tmp/platform/build/lib64/libP8.so.2
-- Up-to-date: /develop/tmp/platform/build/lib64/libP8.so
-- Installing: /develop/tmp/P8/include/P8/os.h
-- Installing: /develop/tmp/P8/include/P8/posix/os-socket.h
-- Installing: /develop/tmp/P8/include/P8/posix/os-threads.h
-- Installing: /develop/tmp/P8/include/P8/posix/os-types.h
-- Installing: /develop/tmp/P8/include/P8/sockets/cdevsocket.h
-- Installing: /develop/tmp/P8/include/P8/sockets/socket.h
-- Installing: /develop/tmp/P8/include/P8/sockets/tcp.h
-- Installing: /develop/tmp/P8/include/P8/threads/atomics.h
-- Installing: /develop/tmp/P8/include/P8/threads/mutex.h
-- Installing: /develop/tmp/P8/include/P8/threads/threads.h
-- Installing: /develop/tmp/P8/include/P8/util/atomic.h
-- Installing: /develop/tmp/P8/include/P8/util/buffer.h
-- Installing: /develop/tmp/P8/include/P8/util/StringUtils.h
-- Installing: /develop/tmp/P8/include/P8/util/StdString.h
-- Installing: /develop/tmp/P8/include/P8/util/timeutils.h
-- Installing: /develop/tmp/P8/include/P8/util/util.h
-- Up-to-date: /develop/tmp/platform/build/lib64/pkgconfig/P8.pc
-- Up-to-date: /develop/tmp/platform/build/lib64/P8/P8-config.cmake
find /develop/tmp/P8 | grep pc
empty result
```
Hi,
I plan uploading the package to Debian with minor tweaks as a dependency for next libCEC version, but he name of the project - platform - is a bit too generic and the won't be accepted to Debian for sure. How about renaming the project or at least the Debian packages to libcec-platform or something similar?
Maybe the C++ namespace could be changed to something more specific as well.
Cheers,
Balint
fstrcmp.c is covered by version 3.01 of the PHP license which is not compatible with GPL:
https://github.com/Pulse-Eight/platform/blob/master/src/util/fstrcmp.c
https://en.wikipedia.org/wiki/PHP_License
The install procedure for macOS includes sudo ldconfig
. This doesn't appear to be a macOS thing. What's the analog for mac users?
I'm building 'platform'
cd /home/lssl/source/platform
git log | head
commit 041a8c6cf4c44dbf0a8e295e3d3d2da13bbe0ad3
Merge: 38343e0 d795fde
Author: Lars Op den Kamp <[email protected]>
Date: Sat Mar 19 20:54:21 2016 +0100
Merge pull request #23 from Memphiz/no_iokit
[tvos] - remove iokit linkage
commit d795fde027981ae36abfcac85d7caf028d695cc4
According to
https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html
...
CMAKE_INSTALL_<dir>
Destination for files of a given type. This value may be passed to the DESTINATION options of install() commands for the corresponding file type.
...
LIBDIR
object code libraries (lib or lib64 or lib/<multiarch-tuple> on Debian)
...
I should be able to specify
-DCMAKE_INSTALL_LIBDIR=lib64
-DCMAKE_INSTALL_LIBDIR_NOARCH=lib64
If I do
cd build
cmake\
-DCMAKE_INSTALL_PREFIX=/usr/local \
-DCMAKE_INSTALL_LIBDIR=lib64 \
-DCMAKE_INSTALL_LIBDIR_NOARCH=lib64 \
..
the build generates this
grep libdir= ./p8-platform.pc
libdir=/usr/local//home/lssl/source/platform/build/lib64
instead of what you'd expect
libdir=/usr/local/lib64
from
grep libdir= p8-platform.pc.in
libdir=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@
Hello friends:
I use (and compile) this 'Platform' component as part of building 'Kodi' extensions.
Up until today, the following sequence would compile this successfully:
cd /home/user/Downloads/KODI.d/CURRENT.d || exit 1
git clone https://github.com/Pulse-Eight/platform.git platform.d
cd /home/user/Downloads/KODI.d/CURRENT.d/platform.d || exit 1
cmake -DCMAKE_INSTALL_PREFIX=/opt/KODI.d
make
sudo make install
But today, I unfortunately ran into the following compile error and don't know how to resolve it:
CMake Error at CMakeLists.txt:45 (install):
install TARGETS given no ARCHIVE DESTINATION for static library target "platform".
-- Configuring incomplete, errors occurred!
See also ".../CMakeFiles/CMakeOutput.log".
See also ".../CMakeFiles/CMakeError.log".make: *** No targets specified and no makefile found. Stop.
Do I need to tweak/augment the above compile steps? If so, can you provide guidance?
Thank you in advance! (I appreciate it).
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=700177 means that a package version of 2.0.0-1~debian
isn't valid but 2.0.0.1~debian
is.
looks like only debian/changelog.in
needs to be fixed but it affects your other repos too - do you want separate bugs?
Platform embeds a very old version of the fstrcmp() function which is available in libfstrcmp for quite some time:
https://packages.qa.debian.org/f/fstrcmp.html
The local copy takes three parameters (where the last one is not used BTW)
double fstrcmp (const char *__s1, const char *__s2, double __minimum);
versus the newer version in libfstrcmp which takes only two:
double fstrcmp(const char *string1, const char *string2);
If any library or program dynamically links with libplatform and libfstrcmp the C function name will be provided by both.
Please link to libfstrcmp instead of embedding the function or use the function internally but don't export it.
The comments at
https://github.com/Pulse-Eight/libcec/issues/175
opdenkamp commented 4 days ago
it's the same bug as this one: Pulse-Eight/platform@51e2b28
you need to update the platform lib to include this commit and I need to fix the same thing in libCEC
&
opdenkamp commented 4 days ago
set correctly here already, upgrading the platform lib should fix it
https://github.com/Pulse-Eight/libcec/blob/master/cmake/PkgConfigHandler.cmake#L96
are unclear, as building latest platform pull still exhibits the pkg-config problem
What changes/fixes specifically need to be made here?
cd cmake-platform
git pull
git log | head
commit 38343e0acd6a636ac46139aa666aee4a8d1f13db
Author: Lars Op den Kamp <[email protected]>
Date: Tue Jan 19 20:49:33 2016 +0100
bump to 2.0.1
commit e1f8dc1b882069e52e6ead4380e3bb9b4792c398
Merge: cce6a49 51e2b28
Author: Lars Op den Kamp <[email protected]>
Date: Mon Jan 18 20:55:13 2016 +0100
cat CmakeLists.txt
...
IF(NOT WIN32)
==> configure_file(p8-platform.pc.in p8-platform.pc @ONLY)
install(FILES ${CMAKE_BINARY_DIR}/p8-platform.pc
DESTINATION ${CMAKE_INSTALL_LIBDIR_NOARCH}/pkgconfig)
ENDIF(NOT WIN32)
...
mkdir build
cd build
cmake .. \
-DCMAKE_INSTALL_PREFIX=/usr/local \
-DBUILD_SHARED_LIBS=1 \
-DCMAKE_INSTALL_LIBDIR=/usr/local/lib64 \
-DCMAKE_INSTALL_LIBDIR_NOARCH=/usr/local/lib64
make
make install
...
-- Installing: /usr/local/lib64/pkgconfig/p8-platform.pc
...
cat /usr/local/lib64/pkgconfig/p8-platform.pc
prefix=/usr/local
??? libdir=/usr/local//usr/local/lib64
includedir=/usr/local/include
DEPENDENCIES=-lpthread
Name: p8-platform
Description: Pulse-Eight platform support library 2.0
Version: 2.0.1
Libs: -L${libdir} -lp8-platform
Cflags: -I${includedir}
pkg-config --libs p8-platform
??? -L/usr/local//usr/local/lib64 -lp8-platform
multi-arch is for /usr only. Same fix has been made for kodi-platform. Actually it install in
ls -l /usr/local/lib/x86_64-linux-gnu/
total 156
-rw-r--r-- 1 root staff 157734 May 5 14:44 libplatform.a
But the linker only search for /usr/local/lib (dynamic and static) at elast ondebian and ubuntu
In this repositories current state these are the errors I have come across
Does not handle spaces in paths properly.
Command structure for cmake is incorrect, the source directory is the last item supplied to cmake.
MAKE_INSTALL_PREFIX variable gets applied to the source path, causing an invalid directory error.
These things I have fixed.
I also added support for Visual Studio 2017, as well as auto detection of Visual Studio versions 12, 14, and 15. It will automatically use the highest version installed.
I know that there is a form to be filled out when contributing. I have done this for the libCEC repository and I would like to know if I have to do another for this repository as well?
After upgrading to libCEC 3.0.0 i couldn't compile my VDR-Plugin. The problem is the colon in -l:platform in plattform.pc.
The full file:
vdr:/video/src/libcec/platformbuild # more /usr/lib64/pkgconfig/platform.pc
prefix=/usr
libdir=/usr/lib64
includedir=/usr/include
CXX=/usr/bin/c++
CC=/usr/bin/cc
DEPENDENCIES=
Name: platform
Description: Platform support library 1.0
Version: 1.0
Libs: -L -l:platform
Cflags: -fPIC
I have built plattform with:
vdr:/video/src/libcec/platformbuild # cmake ../platform -DCMAKE_INSTALL_PREFIX:PATH=/usr
I had to change -l:plattform to -lplattform manually after installation.
Hello,
I am trying to fetch the platform repository with all the references, but receiving permission denied while fetching Pulse-Eight/libcec-support. Are the Github access rights setup correctly?
Thank you
`Initialized empty Git repository in /usr/portage/distfiles/git3-src/Pulse-Eight_platform.git/
Please make sure you have the correct access rights
and the repository exists.
`
I wax wondering why I had only static libs, looked at the debian rules Makefile and found this define. IMHO, to be homogeneous with kodi where on Linux, shared libs are default (like kodi platform, pvr, ...) the default value should be to build shared libs
If I build this myself and install it via clean room building (pbuilder) or a chroot, it conflicts with the Jessie backports package. Shound't the control fiend here specify to remove 2v4 since they conflict/replace each others files? Unfortunately pbuilder does not respect apt-pinning with the default setup. If this is not something that you deem reasonable, that is fine.
Selecting previously unselected package libp8-platform2:amd64.
(Reading database ... 54437 files and directories currently installed.)
Preparing to unpack .../libp8-platform2_2.0.1+git+bsos2_amd64.deb ...
Unpacking libp8-platform2:amd64 (2.0.1+git+bsos2) ...
dpkg: error processing archive /var/cache/apt/archives/libp8-platform2_2.0.1+git+bsos2_amd64.deb (--unpack):
trying to overwrite '/usr/lib/x86_64-linux-gnu/libp8-platform.so.2.0.1', which is also in package libp8-platform2v4:amd64 2.0.1+dfsg1-1~bpo8+1
Selecting previously unselected package libp8-platform-dev:amd64.
Preparing to unpack .../libp8-platform-dev_2.0.1+git+bsos2_amd64.deb ...
Unpacking libp8-platform-dev:amd64 (2.0.1+git+bsos2) ...
Errors were encountered while processing:
/var/cache/apt/archives/libp8-platform2_2.0.1+git+bsos2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
The last release, 2.1.0.1, was a while ago and there have been some useful commits since then.
Could you please create a new release?
Thanks!
Hi,
unfortunately there is a bug in file:
https://github.com/Pulse-Eight/platform/blob/master/src/posix/os-socket.h#L138
The timeout is defined with:
long iTimeLeft = (long)readTimeout.TimeLeft();
timeout.tv_sec = iTimeLeft / (long int)1000.;
timeout.tv_usec = iTimeLeft % (long int)1000.;
but tv_usec are micro- and not nanoseconds, one millionth of a second.
http://man7.org/linux/man-pages/man2/select.2.html
So it should be
timeout.tv_usec = (iTimeLeft % (long int)1000.) * (long int)1000.;
Otherwise the default timeout of 50ms goes down to 0,05ms and gives heavy cpu load even when adapter is idle. Can you fix it? Thank you!
Cheers
Sebastian
Allow moves, particularly in non-copyable objects.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.