riebl / artery

OMNeT++ V2X simulation framework for ETSI ITS-G5
GNU General Public License v2.0
204 stars 132 forks source link

Artery does not build with Boost 1.75 #147

Closed kenog closed 3 years ago

kenog commented 3 years ago

Hi,

using Arch Linux, which comes with Boost 1.75 since 12th of December, I noticed that Artery does not build anymore. I tried building, using a freshly checked out master branch with Omnet++ 5.6.2. When building, I get a lot of errors similar to this one:

[ 94%] Building CXX object src/traci/CMakeFiles/traci.dir/ExtensibleNodeManager.cc.o                                                                                         
In file included from /tmp/artery/src/traci/ExtensibleNodeManager.cc:7:                                                                                                      
In file included from /tmp/artery/src/traci/ExtensibleNodeManager.h:10:                                                                                                      
In file included from /tmp/artery/src/traci/BasicNodeManager.h:4:                                                                                                            
In file included from /tmp/artery/src/traci/Angle.h:4:                                                                                                                       
In file included from /tmp/artery/src/artery/utility/Geometry.h:4:                                                                                                           
In file included from /usr/include/boost/geometry.hpp:17:                                                                                                                    
In file included from /usr/include/boost/geometry/geometry.hpp:34:                                                                                                           
In file included from /usr/include/boost/geometry/core/closure.hpp:24:                                                                                                       
In file included from /usr/include/boost/geometry/core/ring_type.hpp:28:                                                                                                     
In file included from /usr/include/boost/geometry/core/tag.hpp:23:                                                                                                           
/usr/include/boost/geometry/util/type_traits_std.hpp:54:12: error: no template named 'conditional_t' in namespace 'std'; did you mean 'conditional'?                         
    : std::conditional_t<Trait::value, conjunction<Traits...>, Trait>                                                                                                        
      ~~~~~^                                                                                                                                                                 
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../include/c++/10.2.0/type_traits:2200:12: note: 'conditional' declared here                                       
    struct conditional                                                                                                                                                       
           ^

After downgrading boost, everything builds fine again. So this is not really urgent but I would be nice to be able to work with the latest version. Unfortunately, I am not not really familiar with boost and would really appreciate if someone could give me a hint how to proceed from here on. Does this sound like a major issue?

Best regards Keno

riebl commented 3 years ago

Thanks for reporting this "upcoming" issue, my system still ships with Boost 1.74.0. You may try to raise CMAKE_CXX_STANDARD from 11 to 14 because std::conditional_t is part of C++14. According to https://www.boost.org/doc/libs/1_75_0/libs/geometry/doc/html/geometry/release_notes.html, Boost.Geometry requires C++14 from version 1.75.0 on.

kenog commented 3 years ago

Thank you very much for your prompt reply :) Indeed, Artery builds fine with C++14 and Boost 1.75. However, it was necessary to update the Veins submodule first since a related line in veins.h was causing trouble which seems to have been fixed just three days ago in Veins in 333c4f0 :) I thought creating a PR for this was a bit overkill but I am happy to do so if you would like me to.

P.S. (probably not related to this issue): I noticed another issue when doing a quick test. When running the example scenario and using the Run Button in the Omnet GUI, Omnet dies after a while with a segfault after the following assertion error: ASSERT: "length() > 0" in file /usr/include/qt/QtCore/qline.h, line 383. This does not happen with the Express mode in the GUI or in cmdenv. However, this does not sound like an Artery issue to me.

riebl commented 3 years ago

Hm, I guess I simply forgot to close this issue ticket because the fix for this issue is already committed as 21db8e0ef4474b7f7e271add223ae5083a0d230f.

I also assume that the Qt error is not related to Artery itself.