riebl / artery

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

Missing directory when building artery #51

Closed m-wegner closed 5 years ago

m-wegner commented 5 years ago

When building artery from scratch, we get the following error about a missing directory:

$ git clone --recursive https://github.com/riebl/artery.git
$ cd artery
$ make -j10 vanetza
$ make -j10 veins MODE=release
$ make -j10 inet MODE=release
$ mkdir build
$ cd build
$ cmake --build .
[...]
[ 12%] Built target build_vanetza
[ 12%] Building CXX object src/traci/CMakeFiles/traci.dir/PosixLauncher.cc.o
[ 13%] Building CXX object src/traci/CMakeFiles/traci.dir/TestbedModuleMapper.cc.o
[ 14%] Building CXX object src/traci/CMakeFiles/traci.dir/TestbedNodeManager.cc.o
[ 15%] Building CXX object src/traci/CMakeFiles/traci.dir/ValueUtils.cc.o
[ 15%] Building CXX object src/traci/CMakeFiles/traci.dir/VariableCache.cc.o
[ 16%] Building CXX object src/traci/CMakeFiles/traci.dir/sumo/foreign/tcpip/socket.cpp.o
[ 17%] Building CXX object src/traci/CMakeFiles/traci.dir/sumo/foreign/tcpip/storage.cpp.o
[ 18%] Building CXX object src/traci/CMakeFiles/traci.dir/sumo/utils/traci/TraCIAPI.cpp.o
[ 19%] Linking CXX shared library libtraci.so
[ 19%] Built target traci
[ 20%] Generating artery/utility/AsioData
/bin/sh: 1: cd: can't cd to /path/to/artery/build/opp_messages/artery/utility
src/artery/CMakeFiles/core.dir/build.make:62: recipe for target 'opp_messages/artery/utility/AsioData_m.cc' failed
make[2]: *** [opp_messages/artery/utility/AsioData_m.cc] Error 2
CMakeFiles/Makefile2:221: recipe for target 'src/artery/CMakeFiles/core.dir/all' failed
make[1]: *** [src/artery/CMakeFiles/core.dir/all] Error 2
Makefile:94: recipe for target 'all' failed
make: *** [all] Error 2

Plainly creating the directory and re-running build solves this:

$ mkdir -p /path/to/artery/build/opp_messages/artery/utility
$ cmake --build .
[...]
# Success
riebl commented 5 years ago

Hm, for some reason file(MAKE_DIRECTORY ...) is not executed by CMake in some cases. I have changed the generate_opp_message macro to depend on the output directory explicitly in f0aadd50ab48384ce483d0dfed0199edc8abd990.

m-wegner commented 5 years ago

Once again: Thank you very much for the quick fix!