quic / vasp

VASP is a framework to simulate attacks on V2X networks. It works on top of the VEINS simulator.
MIT License
19 stars 8 forks source link

Error: no template named 'make_unique' in namespace 'std' while Building vasp #2

Closed shahriar0651 closed 1 year ago

shahriar0651 commented 1 year ago

Summary

While building vasp (See step 2 in Build: ./configure && make [-j6]), there comes an error vasp/driver/CarApp.cc:258:19: error: no template named 'make_unique' in namespace 'std'; did you mean 'veins::make_unique'?

After searching for the error, it appears that make_unique is a C++14 feature and thus might not be available on my compiler with the following c++ --version.

c++ (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
Copyright (C) 2019 Free Software Foundation, Inc.

To Reproduce (for bugs)

Steps to reproduce the behavior:

  1. Follow the installation guidelines until the section Build
  2. Try building using ./configure && make [-j6]
  3. See error while dealing with vasp

Expected behavior

The building process should go smoothly as did for veins without an error (missing nameplate)

Screenshots

issu_With_make_unique

System Information (please complete the following information):

Additional context

Here are the PATH variables while I was building:

bash: /home/hasan/Desktop/InstalledApps/v2x-sim/vasp/bin:
/home/hasan/Desktop/InstalledApps/v2x-sim/veins/bin:
/home/hasan/Desktop/InstalledApps/v2x-sim/omnetpp/bin:
/home/hasan/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:
/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin: No such file or directory
raash1d commented 1 year ago

@shahriar0651 Please modify your "configure.user" file for OMNET++ Please modify the line with CXXFLAGS (probably line 36) to CXXFLAGS=-std=c++14 Clean and recompile OMNET++, then try compiling VASP again.

shahriar0651 commented 1 year ago

Thanks. After updating CXXFLAGS I see the following error:

clang: error: clang frontend command failed due to signal (use -v to see invocation)

next_error

Here are the versions of my compilers:

gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
g++ (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
c++ (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
clang version 10.0.0-4ubuntu1 

Do I need to update anything to make them compatible?

raash1d commented 1 year ago

@shahriar0651 I tried to rebuild everything in an Ubuntu 20.04 instance. I did encounter your earlier error with make_unique. However, after changing CXXFLAGS as suggested:

image

... everything built right on the OMNET++ front

image

... and on the VEINS-VASP front

image

I have the same compiler versions as you:

image

Are you sure you used make clean or make cleanall in both OMNET++ and VEINS directories before recompiling? Have you configured your paths correctly in your ".bashrc" file?

shahriar0651 commented 1 year ago

Hi @raash1d, Thanks for your response. Rebuilding OMNet++ along with updating CXXFLAGS helped! Now there is no issue with the building. However, I am facing the following issue while running the simulation with ./run [-u Cmdenv]

third_error

Any suggestion would be highly appreciated. Thanks!

raash1d commented 1 year ago

This is common convention of usage instructions, anything inside a [] is optional.

If you want to use those options, you need to use them without the []. e.g., ./run -u Cmdenv.

P.S.: Thanks for raising this issue, I have updated the instructions regarding CXXFLAGS in the README.

shahriar0651 commented 1 year ago

Got it. Now the simulation is working perfectly and generating the trace file. Thanks for your help!