FernetMenta / vdr-plugin-vnsiserver

VDR plugin to handle XBMC clients.
GNU General Public License v2.0
17 stars 33 forks source link

vdr 2.2.0 not possible to compile latest vnsiserver #113

Open hoppel118 opened 6 years ago

hoppel118 commented 6 years ago

Hi guys,

I am using debian 9 (openmediavault 4) with latest packages installed. I am using the following configuration for the last half year:

root@omv4:~# vdr -V vdr (2.2.0/2.2.0) - The Video Disk Recorder epgsearchonly (0.0.1) - Direct access to epgsearch's search menu conflictcheckonly (0.0.1) - Direct access to epgsearch's conflict check menu live (0.3.0) - Live Interactive VDR Environment quickepgsearch (0.0.1) - Quick search for broadcasts vnsiserver (1.5.1) - VDR-Network-Streaming-Interface (VNSI) Server epgsearch (1.0.1.beta5) - search the EPG for repeats and more

Now I wanted to build the latest vnsiserver-plugin.

root@omv4:/usr/src# git clone https://github.com/FernetMenta/vdr-plugin-vnsiserver Klone nach 'vdr-plugin-vnsiserver' … remote: Counting objects: 1839, done. remote: Compressing objects: 100% (31/31), done. remote: Total 1839 (delta 12), reused 16 (delta 6), pack-reused 1802 Empfange Objekte: 100% (1839/1839), 687.65 KiB | 0 bytes/s, Fertig. Löse Unterschiede auf: 100% (1306/1306), Fertig.

But it stops with the following error:

root@omv4:/usr/src# cd vdr-plugin-vnsiserver/ root@omv4:/usr/src/vdr-plugin-vnsiserver# make g++ -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -std=c++11 -c -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"vnsiserver"' -DVNSI_SERVER_VERSION='"1.7.0"' -o vnsi.o vnsi.c g++ -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -std=c++11 -c -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"vnsiserver"' -DVNSI_SERVER_VERSION='"1.7.0"' -o bitstream.o bitstream.c g++ -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -std=c++11 -c -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"vnsiserver"' -DVNSI_SERVER_VERSION='"1.7.0"' -o vnsiclient.o vnsiclient.c g++ -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -std=c++11 -c -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"vnsiserver"' -DVNSI_SERVER_VERSION='"1.7.0"' -o channelscancontrol.o channelscancontrol.c g++ -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -std=c++11 -c -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"vnsiserver"' -DVNSI_SERVER_VERSION='"1.7.0"' -o config.o config.c g++ -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -std=c++11 -c -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"vnsiserver"' -DVNSI_SERVER_VERSION='"1.7.0"' -o cxsocket.o cxsocket.c g++ -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -std=c++11 -c -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"vnsiserver"' -DVNSI_SERVER_VERSION='"1.7.0"' -o parser.o parser.c g++ -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -std=c++11 -c -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"vnsiserver"' -DVNSI_SERVER_VERSION='"1.7.0"' -o parser_AAC.o parser_AAC.c g++ -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -std=c++11 -c -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"vnsiserver"' -DVNSI_SERVER_VERSION='"1.7.0"' -o parser_AC3.o parser_AC3.c g++ -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -std=c++11 -c -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"vnsiserver"' -DVNSI_SERVER_VERSION='"1.7.0"' -o parser_DTS.o parser_DTS.c g++ -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -std=c++11 -c -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"vnsiserver"' -DVNSI_SERVER_VERSION='"1.7.0"' -o parser_h264.o parser_h264.c g++ -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -std=c++11 -c -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"vnsiserver"' -DVNSI_SERVER_VERSION='"1.7.0"' -o parser_hevc.o parser_hevc.c g++ -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -std=c++11 -c -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"vnsiserver"' -DVNSI_SERVER_VERSION='"1.7.0"' -o parser_MPEGAudio.o parser_MPEGAudio.c g++ -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -std=c++11 -c -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"vnsiserver"' -DVNSI_SERVER_VERSION='"1.7.0"' -o parser_MPEGVideo.o parser_MPEGVideo.c g++ -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -std=c++11 -c -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"vnsiserver"' -DVNSI_SERVER_VERSION='"1.7.0"' -o parser_Subtitle.o parser_Subtitle.c g++ -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -std=c++11 -c -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"vnsiserver"' -DVNSI_SERVER_VERSION='"1.7.0"' -o parser_Teletext.o parser_Teletext.c g++ -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -std=c++11 -c -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"vnsiserver"' -DVNSI_SERVER_VERSION='"1.7.0"' -o streamer.o streamer.c In file included from /usr/include/c++/6/memory:81:0, from videoinput.h:27, from streamer.h:38, from streamer.c:32: /usr/include/c++/6/bits/unique_ptr.h: In instantiation of ‘void std::unique_ptr<_Tp, _Dp>::reset(std::unique_ptr<_Tp, _Dp>::pointer) [with _Tp = cxSocket; _Dp = std::default_delete; std::unique_ptr<_Tp, _Dp>::pointer = cxSocket]’: streamer.c:908:40: required from here /usr/include/c++/6/bits/unique_ptr.h:345:6: error: call of overloaded ‘swap(cxSocket&, cxSocket*&)’ is ambiguous swap(std::get<0>(_M_t), __p);


In file included from /usr/include/c++/6/bits/stl_pair.h:59:0,
from /usr/include/c++/6/bits/stl_algobase.h:64,
from /usr/include/c++/6/deque:60,
from /usr/include/c++/6/queue:60,
from parser.h:29,
from streamer.h:35,
from streamer.c:32:
/usr/include/c++/6/bits/move.h:179:5: note: candidate: typename std::enable_if<std::__and_<std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> >::value>::type std::swap(_Tp&, _Tp&) [with _Tp = cxSocket*; typename std::enable_if<std::__and_<std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> >::value>::type = void]
swap(_Tp& __a, _Tp& __b)
^~~~
In file included from /usr/include/vdr/i18n.h:14:0,
from /usr/include/vdr/config.h:19,
from /usr/include/vdr/channels.h:13,
from streamer.h:30,
from streamer.c:32:
/usr/include/vdr/tools.h:57:31: note: candidate: void swap(T&, T&) [with T = cxSocket*]
template<class T> inline void swap(T &a, T &b) { T t = a; a = b; b = t; }
^~~~
Makefile:86: die Regel für Ziel „streamer.o“ scheiterte
make: *** [streamer.o] Fehler 1
root@omv4:/usr/src/vdr-plugin-vnsiserver#

I don't want to compile vdr 2.4.0 at the moment, because it's my system for daily use. vdr 2.2.0 is really stable.

Is this a known issue? What shall I do?

Regards Hoppel

[EDIT]

Seemingly it's not possible to use code tags from GitHub. Word wraps were not shown as expected. So I used quotes instead.

FernetMenta commented 6 years ago

What shall I do?

you have those options:

1) upgrade to vdr 2.4 2) stay with vnsiserver 1.6 3) patch sources of vdr 2.2

vdr should not define functions already defined by c++. since version 2.3.7 vdr provides a work around for this issue.

hoppel118 commented 6 years ago

OK, that was fast! ;)

At the moment I don't have the time to check vdr 2.4.0. So "vnsiserver 1.6" is the latest compatible version to vdr 2.2.0?

One last thing. Please tell me the command to git clone vnsiserver 1.6. In the past I always did:

git clone https://github.com/FernetMenta/vdr-plugin-vnsiserver

But with this command I get the latest master code, which isn't compatible.

Thanks and regards Hoppel

FernetMenta commented 6 years ago

vnsiserver 1.6 is the last compatible version to vdr 2.2.0?

no, just for the time being. master is a development branch that can break. I am grateful for posts like this because I can't test all scenarios myself. I hope I find a way make it compile with 2.2 again.

One last thing. Please tell me the command to git clone vnsiserver 1.6.

no need to clone again. just update the clone with git fetch origin

checkout the tag git checkout v1.6.0

if you want to test master again: git checkout master git fetch origin git rebase origin/master

hoppel118 commented 6 years ago

WOW... Thanks for your help. It's much appreciated. I learned something new. The described procedure worked as expected.

I am grateful for posts like this because I can't test all scenarios myself.

Testing all scenarios may be a waste of time and a waste of your capabilities. So it's ok that you test the vnsiserver against the latest stable vdr version only.

I hope I find a way make it compile with 2.2 again.

That would be great. But for the moment I am fine with the situation.

For me the issue is solved and can be closed. But if you want me to test a solution, if you have one, you can leave it open. It's your decision.

Thank you very much! Have a nice evening!

Regards Hoppel

FernetMenta commented 6 years ago

master should work now with 2.2

hoppel118 commented 6 years ago

tried to build latest master, but it stops with the following error:

root@omv4:/usr/src/vdr-plugin-vnsiserver# make g++ -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -std=c++11 -c -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"vnsiserver"' -DVNSI_SERVER_VERSION='"1.7.0"' -o vnsi.o vnsi.c g++ -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -std=c++11 -c -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"vnsiserver"' -DVNSI_SERVER_VERSION='"1.7.0"' -o vnsiclient.o vnsiclient.c g++ -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -std=c++11 -c -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"vnsiserver"' -DVNSI_SERVER_VERSION='"1.7.0"' -o channelscancontrol.o channelscancontrol.c g++ -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -std=c++11 -c -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"vnsiserver"' -DVNSI_SERVER_VERSION='"1.7.0"' -o config.o config.c g++ -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -std=c++11 -c -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"vnsiserver"' -DVNSI_SERVER_VERSION='"1.7.0"' -o cxsocket.o cxsocket.c g++ -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -std=c++11 -c -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"vnsiserver"' -DVNSI_SERVER_VERSION='"1.7.0"' -o parser.o parser.c g++ -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -std=c++11 -c -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"vnsiserver"' -DVNSI_SERVER_VERSION='"1.7.0"' -o parser_AAC.o parser_AAC.c In file included from parser_AAC.h:28:0, from parser_AAC.c:25: parser.h:157:36: error: ‘size_t’ has not been declared int ParsePESHeader(uint8_t buf, size_t len); ^~ parser.h:171:3: error: ‘size_t’ does not name a type size_t m_PesBufferInitialSize; ^~ parser.h:172:3: error: ‘size_t’ does not name a type size_t m_PesParserPtr; ^~ parser.h:173:3: error: ‘size_t’ does not name a type size_t m_PesNextFramePtr; ^~ parser_AAC.c: In constructor ‘cParserAAC::cParserAAC(int, cTSStream, sPtsWrap, bool)’: parser_AAC.c:49:3: error: ‘m_PesBufferInitialSize’ was not declared in this scope m_PesBufferInitialSize = 19202; ^~~~~~ parser_AAC.c: In member function ‘virtual void cParserAAC::Parse(sStreamPacket, sStreamPacket)’: parser_AAC.c:67:11: error: ‘m_PesParserPtr’ was not declared in this scope int p = m_PesParserPtr; ^~~~~~ parser_AAC.c:90:5: error: ‘m_PesNextFramePtr’ was not declared in this scope m_PesNextFramePtr = p + m_FrameSize; ^~~~~ Makefile:86: die Regel für Ziel „parser_AAC.o“ scheiterte make: *** [parser_AAC.o] Fehler 1

Do you need any further information?

Thanks and regards Hoppel

FernetMenta commented 6 years ago

i pushed a fix. could you try again when you get some time?

seahawk1986 commented 6 years ago

The latest version of vdr-plugin-vnsiserver can be build successfully if the change in tools.h introduced in vdr 2.3.7 is backported:

$ diff -Nurp vdr-2.2.0/tools.h vdr-2.2.0_stl_patch/tools.h 
--- vdr-2.2.0/tools.h   2015-02-07 16:12:26.000000000 +0100
+++ vdr-2.2.0_stl_patch/tools.h 2018-07-27 10:35:09.228920486 +0200
@@ -50,12 +50,19 @@ template<class T> inline void DELETENULL
 #define CHECK(s) { if ((s) < 0) LOG_ERROR; } // used for 'ioctl()' calls
 #define FATALERRNO (errno && errno != EAGAIN && errno != EINTR)

-#ifndef __STL_CONFIG_H // in case some plugin needs to use the STL
+// In case some plugin needs to use the STL and gets an error message regarding one
+// of these functions, you can #define DISABLE_TEMPLATES_COLLIDING_WITH_STL before
+// including tools.h.
+#if !defined(__STL_CONFIG_H) // for old versions of the STL
+#if !defined(DISABLE_TEMPLATES_COLLIDING_WITH_STL) && !defined(_STL_ALGOBASE_H)
 template<class T> inline T min(T a, T b) { return a <= b ? a : b; }
 template<class T> inline T max(T a, T b) { return a >= b ? a : b; }
+#endif
 template<class T> inline int sgn(T a) { return a < 0 ? -1 : a > 0 ? 1 : 0; }
+#if !defined(DISABLE_TEMPLATES_COLLIDING_WITH_STL) && !defined(_MOVE_H)
 template<class T> inline void swap(T &a, T &b) { T t = a; a = b; b = t; }
 #endif
+#endif

 template<class T> inline T constrain(T v, T l, T h) { return v < l ? l : v > h ? h : v; }
FernetMenta commented 6 years ago

@seahawk1986 should not be required anymore with my recent changes

seahawk1986 commented 6 years ago

When compiling the plugin against a VDR 2.2.0 on Ubuntu 14.04 without the patch above, the build fails:

g++ -g -O3 -Wall -Werror=overloaded-virtual -Wno-parentheses -fPIC -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -std=c++11 -c -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"vnsiserver"' -DVNSI_SERVER_VERSION='"1.7.0"'  -o streamer.o streamer.c
In file included from /usr/include/c++/4.8/memory:81:0,
                 from videoinput.h:27,
                 from streamer.h:35,
                 from streamer.c:30:
/usr/include/c++/4.8/bits/unique_ptr.h: In instantiation of 'void std::unique_ptr<_Tp, _Dp>::reset(std::unique_ptr<_Tp, _Dp>::pointer) [with _Tp = cxSocket; _Dp = std::default_delete<cxSocket>; std::unique_ptr<_Tp, _Dp>::pointer = cxSocket*]':
streamer.c:911:40:   required from here
/usr/include/c++/4.8/bits/unique_ptr.h:260:29: error: call of overloaded 'swap(cxSocket*&, cxSocket*&)' is ambiguous
  swap(std::get<0>(_M_t), __p);
                             ^
/usr/include/c++/4.8/bits/unique_ptr.h:260:29: note: candidates are:
In file included from /usr/include/c++/4.8/bits/stl_pair.h:59:0,
                 from /usr/include/c++/4.8/bits/stl_algobase.h:64,
                 from /usr/include/c++/4.8/vector:60,
                 from parser.h:27,
                 from streamer.h:32,
                 from streamer.c:30:
/usr/include/c++/4.8/bits/move.h:166:5: note: void std::swap(_Tp&, _Tp&) [with _Tp = cxSocket*]
     swap(_Tp& __a, _Tp& __b)
     ^
In file included from /usr/include/vdr/i18n.h:14:0,
                 from /usr/include/vdr/config.h:19,
                 from /usr/include/vdr/channels.h:13,
                 from demuxer.h:31,
                 from streamer.h:34,
                 from streamer.c:30:
/usr/include/vdr/tools.h:57:31: note: void swap(T&, T&) [with T = cxSocket*]
 template<class T> inline void swap(T &a, T &b) { T t = a; a = b; b = t; }
                               ^
make: *** [streamer.o] Error 1

Instead of patching the VDR, defining __STL_CONFIG_H before including the tools.h, seems to work, too:

$ git diff
diff --git a/streamer.c b/streamer.c
index a2ce208..da96513 100644
--- a/streamer.c
+++ b/streamer.c
@@ -27,6 +27,7 @@
 #include <sys/ioctl.h>
 #include <time.h>

+#define __STL_CONFIG_H 1
 #include "streamer.h"

 #include "config.h"
FernetMenta commented 6 years ago

on Ubuntu 14.04

are you kidding? who cares about stone age.

seahawk1986 commented 6 years ago

The age doesn't really matter in this case - it's the same problem when running Ubuntu 16.04:

g++ -g -O3 -Wall -Werror=overloaded-virtual -Wno-parentheses -fPIC -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -std=c++11 -c -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"vnsiserver"' -DVNSI_SERVER_VERSION='"1.7.0"'  -o streamer.o streamer.c
In file included from /usr/include/c++/5/memory:81:0,
                 from videoinput.h:27,
                 from streamer.h:35,
                 from streamer.c:30:
/usr/include/c++/5/bits/unique_ptr.h: In instantiation of 'void std::unique_ptr<_Tp, _Dp>::reset(std::unique_ptr<_Tp, _Dp>::pointer) [with _Tp = cxSocket; _Dp = std::default_delete<cxSocket>; std::unique_ptr<_Tp, _Dp>::pointer = cxSocket*]':
streamer.c:911:40:   required from here
/usr/include/c++/5/bits/unique_ptr.h:342:6: error: call of overloaded 'swap(cxSocket*&, cxSocket*&)' is ambiguous
  swap(std::get<0>(_M_t), __p);
      ^
In file included from /usr/include/c++/5/bits/stl_pair.h:59:0,
                 from /usr/include/c++/5/bits/stl_algobase.h:64,
                 from /usr/include/c++/5/vector:60,
                 from parser.h:27,
                 from streamer.h:32,
                 from streamer.c:30:
/usr/include/c++/5/bits/move.h:176:5: note: candidate: void std::swap(_Tp&, _Tp&) [with _Tp = cxSocket*]
     swap(_Tp& __a, _Tp& __b)
     ^
In file included from /usr/include/vdr/i18n.h:14:0,
                 from /usr/include/vdr/config.h:19,
                 from /usr/include/vdr/channels.h:13,
                 from demuxer.h:31,
                 from streamer.h:34,
                 from streamer.c:30:
/usr/include/vdr/tools.h:57:31: note: candidate: void swap(T&, T&) [with T = cxSocket*]
 template<class T> inline void swap(T &a, T &b) { T t = a; a = b; b = t; }
                               ^
Makefile:86: recipe for target 'streamer.o' failed
make: *** [streamer.o] Error 1

And with Ubuntu 18.04:

g++ -g -O3 -Wall -Werror=overloaded-virtual -Wno-parentheses -fPIC -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -std=c++11 -c -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"vnsiserver"' -DVNSI_SERVER_VERSION='"1.7.0"' -I/tmp/vdr-2.2.0/include -o streamer.o streamer.c
In file included from /usr/include/c++/7/memory:80:0,
                 from videoinput.h:27,
                 from streamer.h:35,
                 from streamer.c:30:
/usr/include/c++/7/bits/unique_ptr.h: In instantiation of ‘void std::unique_ptr<_Tp, _Dp>::reset(std::unique_ptr<_Tp, _Dp>::pointer) [with _Tp = cxSocket; _Dp = std::default_delete<cxSocket>; std::unique_ptr<_Tp, _Dp>::pointer = cxSocket*]’:
streamer.c:911:40:   required from here
/usr/include/c++/7/bits/unique_ptr.h:374:6: error: call of overloaded ‘swap(cxSocket*&, cxSocket*&)’ is ambiguous
  swap(_M_t._M_ptr(), __p);
  ~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/7/bits/stl_pair.h:59:0,
                 from /usr/include/c++/7/bits/stl_algobase.h:64,
                 from /usr/include/c++/7/vector:60,
                 from parser.h:27,
                 from streamer.h:32,
                 from streamer.c:30:
/usr/include/c++/7/bits/move.h:187:5: note: candidate: typename std::enable_if<std::__and_<std::__not_<std::__is_tuple_like<_Tp> >, std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> >::value>::type std::swap(_Tp&, _Tp&) [with _Tp = cxSocket*; typename std::enable_if<std::__and_<std::__not_<std::__is_tuple_like<_Tp> >, std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> >::value>::type = void]
     swap(_Tp& __a, _Tp& __b)
     ^~~~
In file included from /tmp/vdr-2.2.0/include/vdr/i18n.h:14:0,
                 from /tmp/vdr-2.2.0/include/vdr/config.h:19,
                 from /tmp/vdr-2.2.0/include/vdr/channels.h:13,
                 from demuxer.h:31,
                 from streamer.h:34,
                 from streamer.c:30:
/tmp/vdr-2.2.0/include/vdr/tools.h:57:31: note: candidate: void swap(T&, T&) [with T = cxSocket*]
 template<class T> inline void swap(T &a, T &b) { T t = a; a = b; b = t; }
                               ^~~~
Makefile:86: recipe for target 'streamer.o' failed
make[1]: *** [streamer.o] Error 1

*** failed plugins: vnsiserver

Makefile:210: recipe for target 'plugins' failed
make: *** [plugins] Error 1
FernetMenta commented 6 years ago

@seahawk1986 thanks, I adopted your patch from above. https://github.com/FernetMenta/vdr-plugin-vnsiserver/commit/2ed5d198320cba740aa8dffacb10363be99e260f

hoppel118 commented 6 years ago

TOP! Compiling the latest version works as expected.

root@omv4:/# vdr -V vdr (2.2.0/2.2.0) - The Video Disk Recorder epgsearchonly (0.0.1) - Direct access to epgsearch's search menu conflictcheckonly (0.0.1) - Direct access to epgsearch's conflict check menu live (0.3.0) - Live Interactive VDR Environment quickepgsearch (0.0.1) - Quick search for broadcasts vnsiserver (1.7.0) - VDR-Network-Streaming-Interface (VNSI) Server epgsearch (1.0.1.beta5) - search the EPG for repeats and more

Fantastic! Thank you very much @FernetMenta and @seahawk1986

In my opinion this issue can be closed.

Regards Hoppel