riebl / vanetza

Open-source implementation of the ETSI C-ITS protocol stack
Other
204 stars 156 forks source link

After compiling the step make i am getting this error please help me with this error | ubuntu - 16.04 | boost - 1.75 | gcc version - Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609 #120

Closed jai9318 closed 3 years ago

jai9318 commented 3 years ago

In file included from /usr/include/boost/iterator/reverse_iterator.hpp:10:0, from /usr/local/include/boost/range/reverse_iterator.hpp:21, from /usr/local/include/boost/range/rbegin.hpp:19, from /usr/local/include/boost/range/functions.hpp:23, from /usr/local/include/boost/range/iterator_range_core.hpp:38, from /usr/local/include/boost/range/iterator_range.hpp:13, from /home/ak/Desktop/vanetza-master/vanetza/common/byte_buffer_source.hpp:6, from /home/ak/Desktop/vanetza-master/vanetza/common/byte_buffer_source.cpp:1: /usr/local/include/boost/next_prior.hpp:64:1: error: template argument 2 is invalid

^ /usr/local/include/boost/next_prior.hpp: In static member function ‘static T boost::next_prior_detail::prior_advance_impl<T, Distance, true>::call(T, Distance)’: /usr/local/include/boost/next_prior.hpp:167:9: error: ‘reverse_iterator’ is not a member of ‘boost::iterators’ boost::iterators::reverse_iterator< T > rx(x); ^ /usr/local/include/boost/next_prior.hpp:167:9: note: suggested alternative: In file included from /usr/include/c++/5/bits/stl_algobase.h:67:0, from /usr/include/c++/5/vector:60, from /home/ak/Desktop/vanetza-master/vanetza/common/byte_buffer.hpp:6, from /home/ak/Desktop/vanetza-master/vanetza/common/byte_buffer_source.hpp:4, from /home/akDesktop/vanetza-master/vanetza/common/byte_buffer_source.cpp:1: /usr/include/c++/5/bits/stl_iterator.h:97:11: note: ‘std::reverse_iterator’ class reverse_iterator ^ In file included from /usr/include/boost/iterator/reverse_iterator.hpp:10:0, from /usr/local/include/boost/range/reverse_iterator.hpp:21, from /usr/local/include/boost/range/rbegin.hpp:19, from /usr/local/include/boost/range/functions.hpp:23, from /usr/local/include/boost/range/iterator_range_core.hpp:38, from /usr/local/include/boost/range/iterator_range.hpp:13, from /home/ak/Desktop/vanetza-master/vanetza/common/byte_buffer_source.hpp:6, from /home/ak/Desktop/vanetza-master/vanetza/common/byte_buffer_source.cpp:1: /usr/local/include/boost/next_prior.hpp:167:47: error: expected primary-expression before ‘>’ token boost::iterators::reverse_iterator< T > rx(x); ^ /usr/local/include/boost/next_prior.hpp:168:35: error: ‘rx’ was not declared in this scope boost::iterators::advance(rx, n); ^ vanetza/common/CMakeFiles/common.dir/build.make:134: recipe for target 'vanetza/common/CMakeFiles/common.dir/byte_buffer_source.cpp.o' failed make[2]: [vanetza/common/CMakeFiles/common.dir/byte_buffer_source.cpp.o] Error 1 CMakeFiles/Makefile2:413: recipe for target 'vanetza/common/CMakeFiles/common.dir/all' failed make[1]: [vanetza/common/CMakeFiles/common.dir/all] Error 2 Makefile:127: recipe for target 'all' failed make: *** [all] Error 2 HP-Pavilion-x360-Convertible:~/Desktop/vanetza-master/build$ error: ‘reverse_iterator’ is not a member of ‘boost::iterators’ error:: command not found HP-Pavilion-x360-Convertible:~/Desktop/vanetza-master/build$ boost::iterators::reverse_iterator< T > rx(x);

riebl commented 3 years ago

I cannot say what is causing those issues on your system but Vanetza builds fine with Boost 1.75 in general. Please note that your system is comparatively old so you may want to consider upgrading it to a more recent Ubuntu LTS version.

jai9318 commented 3 years ago

Okay sir, Thanks for the response sir, i forgot to mention the version of Cmake
i have been using the cmake - 3.5 Does this version of cmake cause errors? Can the errors can be rectified by updating ubuntu to 20.04 lts ?

riebl commented 3 years ago

Old CMake versions may not support newer Boost releases properly. You can try it with a newer CMake to see if it solves your problem. However, as support of Ubuntu 16.04 ends in a few months, I recommend upgrading to 20.04 LTS.

jai9318 commented 3 years ago

Okay now i am getting confused. Is Cmake 3.5 is older version ?? because in cmake.org in download page the recent release in 3.19?

which is newer cmake version ??

riebl commented 3 years ago

Sorry for this confusion: I mean that CMake 3.5 has been released in 2016 while Boost 1.75 is brand-new from December 2020. Hence, CMake 3.5 may not handle Boost 1.75 correctly. In fact, CMake warns me if it has found a Boost version it does not know about.

jai9318 commented 3 years ago

Okay sir, 1). Now which is newer version of cmake 3.5 or 3.19.4 ? 2). Which boost version can i use ? 3). Which version of boost and cmake i can use according to you ?

riebl commented 3 years ago

1) CMake 3.5 is older than 3.19 2) Any Boost version starting with 1.58 should work. I am using Boost 1.75 on my workstation at the moment. Continuous Integration is running with Boost 1.58. 3) Just make sure that CMake is not much older than Boost.

jai9318 commented 3 years ago

@riebl Sir , now i have updated ubuntu 18.04 lts cmake 3.19.4 boost 1.75.0 gcc 7.4

But still showing error in many files after "make" command

and do i need to install artery now

I have only pasted few of the errors whatever its giving


/usr/local/include/boost/throw_exception.hpp:143:65: error: expected ‘;’ at end of member declaration virtual boost::exception_detail::clone_base const clone() const BOOST_OVERRIDE ^~~~~ /usr/local/include/boost/throw_exception.hpp:143:71: error: ‘BOOST_OVERRIDE’ does not name a type; did you mean ‘BOOST_VERIFY’? virtual boost::exception_detail::clone_base const clone() const BOOST_OVERRIDE ^~~~~~ BOOST_VERIFY /usr/local/include/boost/throw_exception.hpp:154:28: error: expected ‘;’ at end of member declaration virtual void rethrow() const BOOST_OVERRIDE ^~~~~ /usr/local/include/boost/throw_exception.hpp:154:34: error: ‘BOOST_OVERRIDE’ does not name a type; did you mean ‘BOOST_VERIFY’? virtual void rethrow() const BOOST_OVERRIDE


AND SIMILARLY WITH SOME OTHER FILES WHICH I HAVE NOT PASTED BECAUSE OF TOO MANY ERRORS SIMILAR TO THOSE AS I MENTIONED IN THE REQUEST

riebl commented 3 years ago

No, you don't need to invoke the install target. It is perfectly fine to run Artery from the build directory.

The path prefix /usr/local/include/boost tells me that you are not using the Boost headers and libraries shipped by your distribution but a self-compiled version of Boost. Maybe this Boost setup located at /usr/local/ is broken on your system. Have you tried to compile Artery with Boost shipped by Ubuntu?

jai9318 commented 3 years ago

@riebl 1). So do not i need artery(Omnet++) in my laptop ?

2). Boost version i have installed in 1.75 but in boost version.hpp its 1.65. Now main question i am not getting is how to remove that boost 1.75?

3). Shipped by ubuntu in my case is 1.65.1 am i right ?

4). No sir not able move on further after " make " . its giving those errors as i mentioned.

5). And do not getting how to compile artery with Boost shipped by ubuntu .?

please help me sir

riebl commented 3 years ago

1) I am not sure what you mean. You need to have Artery & OMNeT++ on your computer to run it. However, you can run it from the build directory via make run_example etc. and do not install the compiled binaries via make install. 2) Just delete the files at /usr/local/include/boost/ and /usr/local/lib64/libboost_*. 3) I think so. Check your package manager. 4) 5) CMake will pick up the shipped Boost version by default. You can also set a specific location if necessary, please consult the CMake manual for details.

jai9318 commented 3 years ago

1). Presently artery and onmet++ i do not have

2). Not able to delete the files.

3). Not able to understand how to specify the location

riebl commented 3 years ago

Well, your problems seem to be related to using Linux and are not specific to Vanetza. Hence, I will close this issue ticket.