Git Product home page Git Product logo

platform's People

Contributors

a1rwulf avatar adamsutton avatar akva2 avatar dhead666 avatar fernetmenta avatar garbear avatar jalle19 avatar janbar avatar jaredmcneill avatar ktdreyer avatar lrusak avatar margro avatar memphiz avatar montellese avatar opdenkamp avatar rbalint avatar sraue avatar srg70 avatar tryum avatar wsnipex avatar yann-morin-1998 avatar zcsizmadia avatar zpon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

platform's Issues

Reference issues when compiled

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

libdir config & pkg-config file are incorrect in source build

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
	```

Platform name is very generic

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

`sudo ldconfig` on macOS??

The install procedure for macOS includes sudo ldconfig. This doesn't appear to be a macOS thing. What's the analog for mac users?

cmake MultiArch libdir not set correctly

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@

My procedure for compiling this (previously successful) no longer works I noticed today ...

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:

===================================================

BUILD PULSE-EIGHT PLATFORM ...

===================================================

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).

fstrcmp() function and fstrcmp.h collide with libfstrcmp's well known symbol and header

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.

platform src build generates incorrect libdir entry in pkgconfig(p8-platform.pc)

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 

Windows build needs to be fixed

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?

Colon after -l option in platform.pc

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.

Are the Github access rights correct?

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/

  • Fetching https://github.com/Pulse-Eight/platform.git ...
    git fetch https://github.com/Pulse-Eight/platform.git +refs/heads/master:refs/heads/master
    remote: Counting objects: 500, done.
    remote: Compressing objects: 100% (25/25), done.
    remote: Total 500 (delta 7), reused 0 (delta 0), pack-reused 475
    Receiving objects: 100% (500/500), 177.13 KiB | 213.00 KiB/s, done.
    Resolving deltas: 100% (280/280), done.
    From https://github.com/Pulse-Eight/platform
  • [new branch] master -> master
  • [new tag] p8-platform-2.1.0.1 -> p8-platform-2.1.0.1
  • [new tag] 1.0.0 -> 1.0.0
  • [new tag] 1.0.1 -> 1.0.1
  • [new tag] 1.0.10 -> 1.0.10
  • [new tag] 1.0.2 -> 1.0.2
  • [new tag] 1.0.3 -> 1.0.3
  • [new tag] 1.0.4 -> 1.0.4
  • [new tag] 1.0.5 -> 1.0.5
  • [new tag] 1.0.6 -> 1.0.6
  • [new tag] 1.0.7 -> 1.0.7
  • [new tag] 1.0.8 -> 1.0.8
  • [new tag] 1.0.9 -> 1.0.9
  • [new tag] p8-platform-2.0.1 -> p8-platform-2.0.1
  • [new tag] p8-platform-2.1.0 -> p8-platform-2.1.0
  • [new tag] platform-2.1.0 -> platform-2.1.0
    git symbolic-ref refs/git-r3/dev-libs/libp8-platform/0/main refs/heads/master
    Initialized empty Git repository in /usr/portage/distfiles/git3-src/[email protected]:Pulse-Eight_libcec-support.git/
  • Fetching [email protected]:Pulse-Eight/libcec-support.git ...
    git fetch [email protected]:Pulse-Eight/libcec-support.git --prune +refs/heads/:refs/heads/ +refs/tags/:refs/tags/ +refs/notes/:refs/notes/ +HEAD:refs/git-r3/HEAD
    Permission denied (publickey).
    fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
`

-DBUILD_SHARED_LIBS=1 should be default

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

Packag conflict with libp8-platform2v4

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)

Create new release

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!

Bug for Timeout microseconds

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.