rofafor / vdr-plugin-iptv

IPTV plugin for the Video Disk Recorder (VDR)
http://www.saunalahti.fi/~rahrenbe/vdr/iptv/
GNU General Public License v2.0
6 stars 7 forks source link

compiling iptv with gcc6 on upcoming Fedora 24 #3

Closed martinkg closed 8 years ago

martinkg commented 8 years ago

the compilation fails with following error message:

In file included from live.cpp:10:0: live.h:36:7: warning: 'template class std::auto_ptr' is deprecated [-Wdeprecated-declarations] std::auto_ptr< ServerThread > m_thread; ^~~~ In file included from /usr/include/c++/6.0.0/memory:81:0, from live.h:4, from live.cpp:10: /usr/include/c++/6.0.0/bits/unique_ptr.h:49:28: note: declared here template class auto_ptr; ^~~~

  1. - --- thread.h.orig 2016-02-06 20:52:26.251099585 +0100
  2. - +++ thread.h 2016-02-06 20:53:01.987127117 +0100
  3. - @@ -19,7 +19,7 @@
  4. - virtual void Action();
  5. -
  6. - private:
  7. - - std::auto_ptr< tnt::Tntnet > m_server;
  8. - + std::unique_ptr< tnt::Tntnet > m_server;
  9. - };
  10. -
  11. - } // namespace vdrlive
  12. - --- live.h.orig 2016-02-06 23:37:29.210156633 +0100
  13. - +++ live.h 2016-02-06 23:38:25.185089114 +0100
  14. - @@ -33,7 +33,7 @@
  15. - static std::string m_configDirectory;
  16. - static std::string m_resourceDirectory;
  17. -
  18. - - std::auto_ptr< ServerThread > m_thread;
  19. - + std::unique_ptr< ServerThread > m_thread;
  20. - };
  21. -
  22. - } // namespace vdrlive

but then the next error message appears:

In file included from /usr/include/c++/6.0.0/memory:81:0, from live.h:4, from live.cpp:10: /usr/include/c++/6.0.0/bits/unique_ptr.h: In instantiation of 'void std::unique_ptr<_Tp, _Dp>::reset(std::unique_ptr<_Tp, _Dp>::pointer) [with _Tp = vdrlive::ServerThread; _Dp = std::default_deletevdrlive::ServerThread; std::unique_ptr<_Tp, Dp>::pointer = vdrlive::ServerThread]': live.cpp:60:35: required from here /usr/include/c++/6.0.0/bits/uniqueptr.h:342:6: error: call of overloaded 'swap(vdrlive::ServerThread&, vdrlive::ServerThread*&)' is ambiguous swap(std::get<0>(_M_t), __p);

In file included from /usr/include/c++/6.0.0/bits/stl_pair.h:59:0,
                 from /usr/include/c++/6.0.0/bits/stl_algobase.h:64,
                 from /usr/include/c++/6.0.0/bits/char_traits.h:39,
                 from /usr/include/c++/6.0.0/string:40,
                 from i18n.h:4,
                 from live.cpp:9:
/usr/include/c++/6.0.0/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 = vdrlive::ServerThread*; 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 live.cpp:7:
/usr/include/vdr/tools.h:57:31: note: candidate: void swap(T&, T&) [with T = vdrlive::ServerThread*]
 template<class T> inline void swap(T &a, T &b) { T t = a; a = b; b = t; }
rofafor commented 8 years ago

You must have mistaken something as the iptv plugin doesn't have live.cpp, live.h, or thread.h, that you mentioned about compatibility issues.

martinkg commented 8 years ago

oh, yes that's my fault, i ment this error messages: (complete build.log: https://kojipkgs.fedoraproject.org//work/tasks/9574/12889574/build.log)

ommon.c: In function 'int select_single_desc(int, int, bool)': common.h:39:34: error: unable to find string literal operator 'operator""errstr' with 'const char [14]', 'unsigned int' arguments esyslog("[%s,%d]: "errstr": %s", FILE, LINE, \ ^ common.h:47:40: note: in expansion of macro 'ERROR_IF_FUNC'

define ERROR_IF_RET(exp, errstr, ret) ERROR_IF_FUNC(exp, errstr, ,ret);

                                    ^~~~~~~~~~~~~

common.c:61:3: note: in expansion of macro 'ERROR_IF_RET' ERROR_IF_RET(retval < 0, "select()", return retval); ^~~~ Makefile:90: recipe for target 'common.o' failed make: * [common.o] Error 1 make: * Waiting for unfinished jobs....

rofafor commented 8 years ago

Should be fixed now. If not, please, reopen the issue.