Skip to content

Compiling twitter application in Linux environment #5

@pedropalomo

Description

@pedropalomo

Hi Kirk and everybody,
I am trying to build the twitter application in the Linux environment (Ubuntu 16.04.2 LTS) with gcc 6.3.0, I had no problems installing the environment with cmake files, all the libraries (i.e: rxcpp, range-v3) download, compile and execute their examples without problems, but when I try to compile the twitter app some error are reported by the compiler. I have not modified the compilation flags defined in "shared.cmake". To solve some of the first batch of error I have included "chrono" and "condition_variable", but after this modification two errors are raised. Below, I copy the compiler error dump. What do you think about the error?

Best Regard, and thanks in advance.
Pedro.


$ make twitter                                                                                                                           
Scanning dependencies of target twitter                                                                                                                                               
[ 16%] Building CXX object CMakeFiles/twitter.dir/main.cpp.o                                                                                                                          
In file included from /home/pepp/projects/twitter/main.cpp:55:0:                                                                                                                      
/home/pepp/projects/twitter/tweets.h: In lambda function:                                                                                                                             
/home/pepp/projects/twitter/tweets.h:47:57: warning: ‘tweets::parsetweets(rxcpp::observe_on_one_worker, rxcpp::observe_on_one_worker)::<lambda(rxcpp::observable<std::__cxx11::basic_s
tring<char>, rxcpp::dynamic_observable<std::__cxx11::basic_string<char> > >)>::<lambda(rxcpp::subscriber<tweets::parsedtweets, rxcpp::observer<tweets::parsedtweets, void, void, void,
 void> >)>::<lambda(int)>’ has a field ‘tweets::parsetweets(rxcpp::observe_on_one_worker, rxcpp::observe_on_one_worker)::<lambda(rxcpp::observable<std::__cxx11::basic_string<char>, r
xcpp::dynamic_observable<std::__cxx11::basic_string<char> > >)>::<lambda(rxcpp::subscriber<tweets::parsedtweets, rxcpp::observer<tweets::parsedtweets, void, void, void, void> >)>::<l
ambda(int)>::<closes capture>’ whose type uses the anonymous namespace [-Wsubobject-linkage]                                                                                          
                 window_toggle(closes | start_with(0), [=](int){return closes;});                                                                                                     
                                                         ^                                                                                                                            
In file included from /home/pepp/projects/twitter/build/src/rxcpp/Rx/v2/src/rxcpp/rx-includes.hpp:171:0,                                                                              
                 from /home/pepp/projects/twitter/build/src/rxcpp/Rx/v2/src/rxcpp/rx.hpp:8,                                                                                           
                 from /home/pepp/projects/twitter/main.cpp:35:                                                                                                                        
/home/pepp/projects/twitter/build/src/rxcpp/Rx/v2/src/rxcpp/rx-observer.hpp: In instantiation of ‘typename std::enable_if<rxcpp::detail::is_on_next_of<T, State>::value, rxcpp::observ
er<T, void, void, void, void> >::type rxcpp::make_observer_dynamic(OnNext&&) [with T = nlohmann::basic_json<>; OnNext = rxcpp::notifications::notification<T>::on_next_notification::e
quals(const typename rxcpp::notifications::notification<T>::base::type&) const [with T = nlohmann::basic_json<>; typename rxcpp::notifications::notification<T>::base::type = std::sha
red_ptr<rxcpp::notifications::detail::notification_base<nlohmann::basic_json<> > >]::<lambda(nlohmann::basic_json<>)>; typename std::enable_if<rxcpp::detail::is_on_next_of<T, State>:
:value, rxcpp::observer<T, void, void, void, void> >::type = rxcpp::observer<nlohmann::basic_json<>, void, void, void, void>]’:                                                       
/home/pepp/projects/twitter/build/src/rxcpp/Rx/v2/src/rxcpp/rx-notification.hpp:137:70:   required from ‘bool rxcpp::notifications::notification<T>::on_next_notification::equals(cons
t typename rxcpp::notifications::notification<T>::base::type&) const [with T = nlohmann::basic_json<>; typename rxcpp::notifications::notification<T>::base::type = std::shared_ptr<rx
cpp::notifications::detail::notification_base<nlohmann::basic_json<> > >]’                                                                                                            
/home/pepp/projects/twitter/main.cpp:1617:1:   required from here                                                                                                                     
/home/pepp/projects/twitter/build/src/rxcpp/Rx/v2/src/rxcpp/rx-observer.hpp:595:33: error: call of overloaded ‘make_observer(rxcpp::notifications::notification<T>::on_next_notificati
on::equals(const typename rxcpp::notifications::notification<T>::base::type&) const [with T = nlohmann::basic_json<>; typename rxcpp::notifications::notification<T>::base::type = std
::shared_ptr<rxcpp::notifications::detail::notification_base<nlohmann::basic_json<> > >]::<lambda(nlohmann::basic_json<>)>)’ is ambiguous                                             
                 make_observer<T>(std::forward<OnNext>(on)));                                                                                                                         
                 ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~                                                                                                                           
/home/pepp/projects/twitter/build/src/rxcpp/Rx/v2/src/rxcpp/rx-observer.hpp:488:6: note: candidate: typename std::enable_if<rxcpp::detail::is_on_next_of<T, Observer>::value, rxcpp::o
bserver<T, rxcpp::detail::stateless_observer_tag, OnNext, DefaultOnError> >::type rxcpp::make_observer(OnNext) [with T = nlohmann::basic_json<>; DefaultOnError = rxcpp::detail::OnErr
orEmpty; OnNext = rxcpp::notifications::notification<T>::on_next_notification::equals(const typename rxcpp::notifications::notification<T>::base::type&) const [with T = nlohmann::bas
ic_json<>; typename rxcpp::notifications::notification<T>::base::type = std::shared_ptr<rxcpp::notifications::detail::notification_base<nlohmann::basic_json<> > >]::<lambda(nlohmann:
:basic_json<>)>; typename std::enable_if<rxcpp::detail::is_on_next_of<T, Observer>::value, rxcpp::observer<T, rxcpp::detail::stateless_observer_tag, OnNext, DefaultOnError> >::type =
 rxcpp::observer<nlohmann::basic_json<>, rxcpp::detail::stateless_observer_tag, rxcpp::notifications::notification<T>::on_next_notification::equals(const typename rxcpp::notification
s::notification<T>::base::type&) const [with T = nlohmann::basic_json<>; typename rxcpp::notifications::notification<T>::base::type = std::shared_ptr<rxcpp::notifications::detail::no
tification_base<nlohmann::basic_json<> > >]::<lambda(nlohmann::basic_json<>)>, rxcpp::detail::OnErrorEmpty, void>]                                                                    
 auto make_observer(OnNext on)                                                                                                                                                        
      ^~~~~~~~~~~~~                                                                                                                                                                   
/home/pepp/projects/twitter/build/src/rxcpp/Rx/v2/src/rxcpp/rx-observer.hpp:496:6: note: candidate: typename std::enable_if<rxcpp::detail::is_on_error<Observer>::value, rxcpp::observ
er<T, rxcpp::detail::stateless_observer_tag, rxcpp::detail::OnNextEmpty<T>, OnError> >::type rxcpp::make_observer(OnError) [with T = nlohmann::basic_json<>; DefaultOnError = rxcpp::d
etail::OnErrorEmpty; OnError = rxcpp::notifications::notification<T>::on_next_notification::equals(const typename rxcpp::notifications::notification<T>::base::type&) const [with T = 
nlohmann::basic_json<>; typename rxcpp::notifications::notification<T>::base::type = std::shared_ptr<rxcpp::notifications::detail::notification_base<nlohmann::basic_json<> > >]::<lam
bda(nlohmann::basic_json<>)>; typename std::enable_if<rxcpp::detail::is_on_error<Observer>::value, rxcpp::observer<T, rxcpp::detail::stateless_observer_tag, rxcpp::detail::OnNextEmpt
y<T>, OnError> >::type = rxcpp::observer<nlohmann::basic_json<>, rxcpp::detail::stateless_observer_tag, rxcpp::detail::OnNextEmpty<nlohmann::basic_json<> >, rxcpp::notifications::not
ification<T>::on_next_notification::equals(const typename rxcpp::notifications::notification<T>::base::type&) const [with T = nlohmann::basic_json<>; typename rxcpp::notifications::n
otification<T>::base::type = std::shared_ptr<rxcpp::notifications::detail::notification_base<nlohmann::basic_json<> > >]::<lambda(nlohmann::basic_json<>)>, void>]                    
 auto make_observer(OnError oe)                                                                                                                                                       
      ^~~~~~~~~~~~~                                                                                                                                                                   
CMakeFiles/twitter.dir/build.make:62: recipe for target 'CMakeFiles/twitter.dir/main.cpp.o' failed                                                                                    
make[3]: *** [CMakeFiles/twitter.dir/main.cpp.o] Error 1                                                                                                                              
CMakeFiles/Makefile2:210: recipe for target 'CMakeFiles/twitter.dir/all' failed                                                                                                       
make[2]: *** [CMakeFiles/twitter.dir/all] Error 2                                                                                                                                     
CMakeFiles/Makefile2:222: recipe for target 'CMakeFiles/twitter.dir/rule' failed                                                                                                      
make[1]: *** [CMakeFiles/twitter.dir/rule] Error 2           

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions