ms-van3t-devs / ms-van3t

A multi-stack, ETSI compliant, V2X framework for ns-3.
GNU General Public License v2.0
102 stars 33 forks source link

ms-van3t compilation fails on Ubuntu 24.04 LTS #36

Open francescoraves483 opened 1 month ago

francescoraves483 commented 1 month ago

The ms-van3t build process seems to fail on the new Ubuntu 24.04 LTS.

Specifically, after configuring the project with "./ns3 configure", the build fails with the following error due to one of the asn1c-generated header files:

[0/2] Re-checking globbed directories...
[1/3570] Building CXX object src/automotive/CMakeFiles/libautomotive-obj.dir/helper/simpleCAMSender-helper.cc.o
FAILED: src/automotive/CMakeFiles/libautomotive-obj.dir/helper/simpleCAMSender-helper.cc.o 
ccache /usr/bin/c++ ...
/home/_<username>_/ms-van3t/ns-3-dev/build/include/ns3/asn_system.h:147:32: error: missing binary operator before token "0"
  147 | #define SIZE_MAX  ((~((size_t)0)) >> 1)
      |                                  ^
...

Unfortunately, I am unable to test it right now, but we should see if adding a conditional check eventually solves the issues:

#ifndef SIZE_MAX
#define SIZE_MAX ((~((size_t)0)) >> 1)
#endif