I am running Xubuntu 17.04 and trying to compile CRRCSIM 0.9.13.
./autogen.sh and ./configure complete OK, but make fails with the following errors:
/usr/include/c++/6/ostream:569:5: note: template argument deduction/substitution failed:
src/mod_video/crrc_animation.cpp:87:43: note: cannot convert ‘std::cerr’ (type ‘std::ostream {aka std::basic_ostream<char>}’) to type ‘const signed char’
<< type << "\'" << std::cerr;
^~~~
In file included from /usr/include/c++/6/iostream:39:0,
from src/mod_video/../mod_main/EventDispatcher.h:36,
from src/mod_video/crrc_animation.h:35,
from src/mod_video/crrc_animation.cpp:29:
/usr/include/c++/6/ostream:556:5: note: candidate: template<class _Traits=""> std::basic_ostream<char, _Traits="">& std::operator<<(std::basic_ostream<char, _Traits="">&, const char)
operator<<(basic_ostream<char, _Traits="">& out, const char* s)
^~~~~~~~
/usr/include/c++/6/ostream:556:5: note: template argument deduction/substitution failed:
src/mod_video/crrc_animation.cpp:87:43: note: cannot convert ‘std::cerr’ (type ‘std::ostream {aka std::basic_ostream<char>}’) to type ‘const char’
<< type << "\'" << std::cerr;
^~~~
In file included from /usr/include/c++/6/ostream:638:0,
from /usr/include/c++/6/iostream:39,
from src/mod_video/../mod_main/EventDispatcher.h:36,
from src/mod_video/crrc_animation.h:35,
from src/mod_video/crrc_animation.cpp:29:
/usr/include/c++/6/bits/ostream.tcc:321:5: note: candidate: template<class _CharT,="" class="" _Traits=""> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const char)
operator<<(basic_ostream<_CharT, _Traits>& out, const char* s)
^~~~~~~~
/usr/include/c++/6/bits/ostream.tcc:321:5: note: template argument deduction/substitution failed:
src/mod_video/crrc_animation.cpp:87:43: note: cannot convert ‘std::cerr’ (type ‘std::ostream {aka std::basic_ostream<char>}’) to type ‘const char’
<< type << "\'" << std::cerr;
^~~~
In file included from /usr/include/c++/6/iostream:39:0,
from src/mod_video/../mod_main/EventDispatcher.h:36,
from src/mod_video/crrc_animation.h:35,
from src/mod_video/crrc_animation.cpp:29:
/usr/include/c++/6/ostream:539:5: note: candidate: template<class _CharT,="" class="" _Traits=""> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const _CharT)
operator<<(basic_ostream<_CharT, _Traits>& out, const _CharT* s)
^~~~~~~~
/usr/include/c++/6/ostream:539:5: note: template argument deduction/substitution failed:
src/mod_video/crrc_animation.cpp:87:43: note: mismatched types ‘const _CharT’ and ‘std::basic_ostream<char>’
<< type << "\'" << std::cerr;
^~~~
In file included from /usr/include/c++/6/iostream:39:0,
from src/mod_video/../mod_main/EventDispatcher.h:36,
from src/mod_video/crrc_animation.h:35,
from src/mod_video/crrc_animation.cpp:29:
/usr/include/c++/6/ostream:519:5: note: candidate: template<class _Traits=""> std::basic_ostream<char, _Traits="">& std::operator<<(std::basic_ostream<char, _Traits="">&, unsigned char)
operator<<(basic_ostream<char, _Traits="">& out, unsigned char c)
^~~~~~~~
/usr/include/c++/6/ostream:519:5: note: template argument deduction/substitution failed:
src/mod_video/crrc_animation.cpp:87:43: note: cannot convert ‘std::cerr’ (type ‘std::ostream {aka std::basic_ostream<char>}’) to type ‘unsigned char’
<< type << "\'" << std::cerr;
^~~~
In file included from /usr/include/c++/6/iostream:39:0,
from src/mod_video/../mod_main/EventDispatcher.h:36,
from src/mod_video/crrc_animation.h:35,
from src/mod_video/crrc_animation.cpp:29:
/usr/include/c++/6/ostream:514:5: note: candidate: template<class _Traits=""> std::basic_ostream<char, _Traits="">& std::operator<<(std::basic_ostream<char, _Traits="">&, signed char)
operator<<(basic_ostream<char, _Traits="">& out, signed char c)
^~~~~~~~
/usr/include/c++/6/ostream:514:5: note: template argument deduction/substitution failed:
src/mod_video/crrc_animation.cpp:87:43: note: cannot convert ‘std::cerr’ (type ‘std::ostream {aka std::basic_ostream<char>}’) to type ‘signed char’
<< type << "\'" << std::cerr;
^~~~
In file included from /usr/include/c++/6/iostream:39:0,
from src/mod_video/../mod_main/EventDispatcher.h:36,
from src/mod_video/crrc_animation.h:35,
from src/mod_video/crrc_animation.cpp:29:
/usr/include/c++/6/ostream:508:5: note: candidate: template<class _Traits=""> std::basic_ostream<char, _Traits="">& std::operator<<(std::basic_ostream<char, _Traits="">&, char)
operator<<(basic_ostream<char, _Traits="">& out, char c)
^~~~~~~~
/usr/include/c++/6/ostream:508:5: note: template argument deduction/substitution failed:
src/mod_video/crrc_animation.cpp:87:43: note: cannot convert ‘std::cerr’ (type ‘std::ostream {aka std::basic_ostream<char>}’) to type ‘char’
<< type << "\'" << std::cerr;
^~~~
In file included from /usr/include/c++/6/iostream:39:0,
from src/mod_video/../mod_main/EventDispatcher.h:36,
from src/mod_video/crrc_animation.h:35,
from src/mod_video/crrc_animation.cpp:29:
/usr/include/c++/6/ostream:502:5: note: candidate: template<class _CharT,="" class="" _Traits=""> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, char)
operator<<(basic_ostream<_CharT, _Traits>& out, char c)
^~~~~~~~
/usr/include/c++/6/ostream:502:5: note: template argument deduction/substitution failed:
src/mod_video/crrc_animation.cpp:87:43: note: cannot convert ‘std::cerr’ (type ‘std::ostream {aka std::basic_ostream<char>}’) to type ‘char’
<< type << "\'" << std::cerr;
^~~~
In file included from /usr/include/c++/6/iostream:39:0,
from src/mod_video/../mod_main/EventDispatcher.h:36,
from src/mod_video/crrc_animation.h:35,
from src/mod_video/crrc_animation.cpp:29:
/usr/include/c++/6/ostream:497:5: note: candidate: template<class _CharT,="" class="" _Traits=""> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, _CharT)
operator<<(basic_ostream<_CharT, _Traits>& out, _CharT c)
^~~~~~~~
/usr/include/c++/6/ostream:497:5: note: template argument deduction/substitution failed:
src/mod_video/crrc_animation.cpp:87:43: note: deduced conflicting types for parameter ‘_CharT’ (‘char’ and ‘std::basic_ostream<char>’)
<< type << "\'" << std::cerr;
^~~~
In file included from /usr/include/c++/6/bits/ios_base.h:46:0,
from /usr/include/c++/6/ios:42,
from /usr/include/c++/6/ostream:38,
from /usr/include/c++/6/iostream:39,
from src/mod_video/../mod_main/EventDispatcher.h:36,
from src/mod_video/crrc_animation.h:35,
from src/mod_video/crrc_animation.cpp:29:
/usr/include/c++/6/system_error:209:5: note: candidate: template<class _CharT,="" class="" _Traits=""> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::error_code&)
operator<<(basic_ostream<_CharT, _Traits>& os, const error_code& e)
^~~~~~~~
/usr/include/c++/6/system_error:209:5: note: template argument deduction/substitution failed:
src/mod_video/crrc_animation.cpp:87:43: note: cannot convert ‘std::cerr’ (type ‘std::ostream {aka std::basic_ostream<char>}’) to type ‘const std::error_code&’
<< type << "\'" << std::cerr;
^~~~
In file included from /usr/include/c++/6/string:52:0,
from /usr/include/c++/6/bits/locale_classes.h:40,
from /usr/include/c++/6/bits/ios_base.h:41,
from /usr/include/c++/6/ios:42,
from /usr/include/c++/6/ostream:38,
from /usr/include/c++/6/iostream:39,
from src/mod_video/../mod_main/EventDispatcher.h:36,
from src/mod_video/crrc_animation.h:35,
from src/mod_video/crrc_animation.cpp:29:
/usr/include/c++/6/bits/basic_string.h:5340:5: note: candidate: template<class _CharT,="" class="" _Traits,="" class="" _Alloc=""> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::cxx11::basic_string<_CharT, _Traits, _Alloc>&)
operator<<(basic_ostream<_CharT, _Traits>& os,
^~~~~~~~
/usr/include/c++/6/bits/basic_string.h:5340:5: note: template argument deduction/substitution failed:
src/mod_video/crrc_animation.cpp:87:43: note: ‘std::ostream {aka std::basic_ostream<char>}’ is not derived from ‘const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>’
<< type << "\'" << std::cerr;
^~~~
Makefile:2637: recipe for target 'crrcsim-crrc_animation.o' failed
make[2]: [crrcsim-crrc_animation.o] Error 1
make[2]: Leaving directory '/home/roland/Downloads/crrcsim-0.9.13'
Makefile:3119: recipe for target 'all-recursive' failed
make[1]: [all-recursive] Error 1
make[1]: Leaving directory '/home/roland/Downloads/crrcsim-0.9.13'
Makefile:817: recipe for target 'all' failed
make: ** [all] Error 2
Due to all the /c++/6 errors, I supected that CRRCSIM 0.9.13 may have been written to an earlier version of c++. My errors above were on Xubuntu 17.04 which uses g++ 6.3.
I created a Virtualbox install of Ubuntu 16.04, which uses g++ 5.4 and compile completes without errors and I am able to run CRRCSIM.
Next I will see if I can make my Xubuntu 17.04 use g++ 5. I see it is installed but not sure how to switch compiler.
CRRCsim started as a C program compiled with gcc 3. Later it was restructured into a C++ application using gcc 4. Some fixes were made for gcc 5 compatibility. So far noone has contributed fixes for gcc 6.
I guess it's not too big of a problem, but as I don't have gcc 6 on my machine, I can't help you with this issue.
Yay, I have compiling success on Xubuntu 17.04!
I first installed g++-5, and already had gcc-5 installed.
Then I followed this as a guide:
https://codeyarns.com/2015/02/26/how-to-switch-gcc-version-using-update-alternatives/
My exact code:
$ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 100 --slave /usr/bin/g++ g++ /usr/bin/g++-6
$ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 50 --slave /usr/bin/g++ g++ /usr/bin/g++-5
$ sudo update-alternatives --config gcc
gives choices now:
There are 2 choices for the alternative gcc (providing /usr/bin/gcc).
Selection Path Priority Status
0 /usr/bin/gcc-6 100 auto mode
* 1 /usr/bin/gcc-5 50 manual mode
2 /usr/bin/gcc-6 100 manual mode
and select "1"
To revert run "sudo update-alternatives --config gcc" again and select "0"