bramp / libcec-daemon

A Linux daemon for connecting libcec to uinput. That is, using your TV to control your PC!
BSD 2-Clause "Simplified" License
65 stars 26 forks source link

boost static assert error is thrown during compilation #18

Closed emericg closed 10 years ago

emericg commented 10 years ago

Hi! I was trying to build libcec-daemon on my Archlinux (using libcec 2.1.4 and boost 1.55) but I face a very weird build error (a boost static assert is thrown):

erreur: static assertion failed: Target type is neither std::istream`able nor std::wistream`able

It has something to do with the HDMI::address type. Any idea where that might come from ? Thanks!

Here is the full log:

[emeric@desktop-emeric: libcec-daemon](git:master*)$ make
make  all-am
make[1]: Entering directory '/home/emeric/Développement/upstream/libcec-daemon'
  CXX      src/hdmi.o
  CXX      src/libcec.o
  CXX      src/main.o
In file included from /usr/include/boost/any.hpp:27:0,
                 from /usr/include/boost/program_options/value_semantic.hpp:12,
                 from /usr/include/boost/program_options/options_description.hpp:13,
                 from /usr/include/boost/program_options.hpp:15,
                 from src/main.cpp:25:
/usr/include/boost/lexical_cast.hpp: In instantiation of ‘struct boost::detail::deduce_target_char_impl<boost::detail::deduce_character_type_later<HDMI::address> >’:
/usr/include/boost/lexical_cast.hpp:415:89:   required from ‘struct boost::detail::deduce_target_char<HDMI::address>’
/usr/include/boost/lexical_cast.hpp:674:92:   required from ‘struct boost::detail::lexical_cast_stream_traits<std::basic_string<char>, HDMI::address>’
/usr/include/boost/lexical_cast.hpp:2363:19:   required from ‘static Target boost::detail::lexical_cast_do_cast<Target, Source>::lexical_cast_impl(const Source&) [with Target = HDMI::address; Source = std::basic_string<char>]’
/usr/include/boost/lexical_cast.hpp:2543:50:   required from ‘Target boost::lexical_cast(const Source&) [with Target = HDMI::address; Source = std::basic_string<char>]’
/usr/include/boost/program_options/detail/value_semantic.hpp:89:38:   required from ‘void boost::program_options::validate(boost::any&, const std::vector<std::basic_string<charT> >&, T*, long int) [with T = HDMI::address; charT = char]’
/usr/include/boost/program_options/detail/value_semantic.hpp:170:55:   required from ‘void boost::program_options::typed_value<T, charT>::xparse(boost::any&, const std::vector<std::basic_string<charT> >&) const [with T = HDMI::address; charT = char]’
src/main.cpp:675:1:   required from here
/usr/include/boost/lexical_cast.hpp:388:13: erreur: static assertion failed: Target type is neither std::istream`able nor std::wistream`able
             BOOST_STATIC_ASSERT_MSG((result_t::value || boost::has_right_shift<std::basic_istream<wchar_t>, T >::value), 
             ^
Makefile:437: recipe for target 'src/main.o' failed
make[1]: *** [src/main.o] Error 1
make[1]: Leaving directory '/home/emeric/Développement/upstream/libcec-daemon'
Makefile:312: recipe for target 'all' failed
make: *** [all] Error 2
reidjr commented 10 years ago

No help here: Same issue compiling on ubuntu 14.04 x86 mythbunbtu

reidjr commented 10 years ago

On 19/04/14 22:33, Andrew Brampton wrote:

Closed #18 https://github.com/bramp/libcec-daemon/issues/18 via e837318 https://github.com/bramp/libcec-daemon/commit/e8373180f24f717007a5de1b18279b3817d888f4.

— Reply to this email directly or view it on GitHub https://github.com/bramp/libcec-daemon/issues/18.

Andrew,

Not sure if you see this email directly. Thank you for the speedy response, now compiles perfectly on Ubuntu 14.04. Took a while to realise that the -p 1 flag was needed or daemon closed down, but got there.

Is there any way to use the daemon to send events TO the TV ? All I want to do is turn on TV and set correct HDMI port on mythfrontend startup. If not do you use cec-client as a single shot ?

best regards,

John

emericg commented 10 years ago

By the way the fix works great, thank you!