Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problem in running "cmake --build build --target run_example" #48

Closed
marcy05 opened this issue Nov 21, 2018 · 8 comments
Closed

problem in running "cmake --build build --target run_example" #48

marcy05 opened this issue Nov 21, 2018 · 8 comments

Comments

@marcy05
Copy link

marcy05 commented Nov 21, 2018

I have the following problem while I run the "cmake --build build --target run_example" command as written:

marcello@marcello-GE62-6QL:~/artery$ cmake --build build --target run_example
[  1%] Building Veins (external dependency)
[  1%] Built target build_veins
[ 19%] Built target traci
[ 20%] Building Vanetza (external dependency)
CMake Warning at /usr/share/cmake-3.5/Modules/FindBoost.cmake:725 (message):
  Imported targets not available for Boost version 106600
Call Stack (most recent call first):
  /usr/share/cmake-3.5/Modules/FindBoost.cmake:763 (_Boost_COMPONENT_DEPENDENCIES)
  /usr/share/cmake-3.5/Modules/FindBoost.cmake:1332 (_Boost_MISSING_DEPENDENCIES)
  CMakeLists.txt:42 (find_package)


-- Boost version: 1.66.0
-- Found the following Boost libraries:
--   date_time
CMake Warning at /usr/share/cmake-3.5/Modules/FindBoost.cmake:725 (message):
  Imported targets not available for Boost version 106600
Call Stack (most recent call first):
  /usr/share/cmake-3.5/Modules/FindBoost.cmake:763 (_Boost_COMPONENT_DEPENDENCIES)
  /usr/share/cmake-3.5/Modules/FindBoost.cmake:1332 (_Boost_MISSING_DEPENDENCIES)
  CMakeLists.txt:45 (find_package)


CMake Warning at /usr/share/cmake-3.5/Modules/FindBoost.cmake:725 (message):
  Imported targets not available for Boost version 106600
Call Stack (most recent call first):
  /usr/share/cmake-3.5/Modules/FindBoost.cmake:763 (_Boost_COMPONENT_DEPENDENCIES)
  /usr/share/cmake-3.5/Modules/FindBoost.cmake:1332 (_Boost_MISSING_DEPENDENCIES)
  CMakeLists.txt:45 (find_package)


-- Cohda SDK not found (missing:  COHDA_ROOT) 
-- Configuring done
-- Generating done
-- Build files have been written to: /home/marcello/artery/extern/vanetza/build
[  0%] Built target access
[ 63%] Built target asn1
[ 66%] Built target common
[ 70%] Built target net
[ 82%] Built target security
[ 87%] Built target dcc
[ 98%] Built target geonet
[ 99%] Built target btp
[100%] Built target facilities
[100%] Built target gnss
[100%] Built target proxy_fake_feed
[ 20%] Built target build_vanetza
[ 20%] Building INET (external dependency)
*** COMPILING with:
g++ -c -std=c++11 -g -Wall -MMD -MP -MF .d  -fPIC  -fno-stack-protector -DHAVE_SWAPCONTEXT -DWITH_MPI -DXMLPARSER=libxml -DWITH_PARSIM -DWITH_NETBUILDER -DWITH_OSG -DWITH_OSGEARTH -Wno-overloaded-virtual -include inet/common/precompiled_debug.h  -DINET_EXPORT -I. -I/home/marcello/omnetpp-5.4.1/include
*** LINKING with:
g++ -shared -fPIC -o ../out/gcc-debug/src/libINET_dbg.so -Wl,--no-as-needed -Wl,--whole-archive  -Wl,--no-whole-archive -loppenvir_dbg -loppsim_dbg -ldl -lstdc++  -lOpenThreads -losg -losgText -losgDB -losgEarth -losgEarthUtil -Wl,-rpath,/home/marcello/omnetpp-5.4.1/lib -Wl,-rpath,/lib -Wl,-rpath,.  -L/home/marcello/omnetpp-5.4.1/lib
Building...
[ 20%] Built target build_inet
[ 69%] Built target core
[ 86%] Built target storyboard
[100%] Built target envmod
Scanning dependencies of target run_example
OMNeT++ Discrete Event Simulation  (C) 1992-2018 Andras Varga, OpenSim Ltd.
Version: 5.4.1, build: 180629-5e28390, edition: Academic Public License -- NOT FOR COMMERCIAL USE
See the license for distribution terms and warranty disclaimer

Setting up Cmdenv...

Loading NED files from /home/marcello/artery/src/artery:  75
Loading NED files from /home/marcello/artery/src/traci:  16
Loading NED files from /home/marcello/artery/extern/veins/examples/veins:  1
Loading NED files from /home/marcello/artery/extern/veins/src/veins:  38
Loading NED files from /home/marcello/artery/extern/inet/src:  666
Loading NED files from /home/marcello/artery/extern/inet/examples:  174
Loading NED files from /home/marcello/artery/extern/inet/tutorials:  19
Loading NED files from /home/marcello/artery/extern/inet/showcases:  33

Preparing for running configuration General, run #0...
Assigned runID=General-0-20181121-10:25:11-4032

RUNTIME ERROR. A cRuntimeError exception is about to be thrown, and you
requested (by setting debug-on-errors=true in the ini file) that errors
abort execution and break into the debugger.

You should now probably be running the simulation under gdb or another
debugger. The simulation kernel will now raise a SIGINT signal which will
get you into the debugger. If you are not running under a debugger, you can
still use the core dump for post-mortem debugging. Once in the debugger,
view the call stack (in gdb: "bt" command) to see the context of the
runtime error.

<!> Network '' not found, check .ini and .ned files

TRAPPING on the exception above, due to a debug-on-errors=true configuration option. Is your debugger ready?
Trace/breakpoint trap (core dumped)
scenarios/artery/CMakeFiles/run_example.dir/build.make:57: recipe for target 'scenarios/artery/CMakeFiles/run_example' failed
make[3]: *** [scenarios/artery/CMakeFiles/run_example] Error 133
CMakeFiles/Makefile2:653: recipe for target 'scenarios/artery/CMakeFiles/run_example.dir/all' failed
make[2]: *** [scenarios/artery/CMakeFiles/run_example.dir/all] Error 2
CMakeFiles/Makefile2:660: recipe for target 'scenarios/artery/CMakeFiles/run_example.dir/rule' failed
make[1]: *** [scenarios/artery/CMakeFiles/run_example.dir/rule] Error 2
Makefile:285: recipe for target 'run_example' failed
make: *** [run_example] Error 2

This problem happened after that I try to run it in debug (to solve another problem presented).
To have all in debug mode I did as follow:
Omnet:

$ cd omnetpp-5.4.1
$ gedit configure.user
WITH_TKENV=no 
WITH_QTENV=no
$ ./configure
$ make MODE=debug

Sumo:

$ cd sumo-0.32.0
$ ./configure
$ make MODE=debug
$ sudo make install

Artery:

$ git clone --recurse-submodule https://github.com/riebl/artery.git
$ cd artery
$ make all MODE=debug
$ mkdir build
$ cd build
$ cmake ..
$ ccmake --build .
CMAKE_BUILD_TYPE Debug
$ cmake --build .

Now I read that my problem could be some interconnection problem with sumo, but I'm not finding a solution. Can you give me some indication?

@riebl
Copy link
Owner

riebl commented Nov 21, 2018

The "General" configuration does not have any network defined because you have to decide for either an INET or a Veins based network. Simply choose a specific configuration of scenarios/artery/omnetpp.ini, e.g. by adding "-c inet" to the RUN_FLAGS CMake variable. This is only required for Cmdenv, Qtenv would ask you about the intended configuration to run.

@ruisonghan
Copy link

May I know the version of your Linux?

@marcy05
Copy link
Author

marcy05 commented Nov 22, 2018

Thanks a lot, now the simulation start, but it start with no graphical interface as the omnet++'s one. How can I lunch the simulation in this way? Is there the possibility to use the project importing it in omnet?
My Linux version is Ubuntu 16.04

@m-wegner
Copy link
Contributor

@marcy05 cmake --build build --target run_example should launch a OMNeT++ GUI if you compiled your OMNeT with WITH_QTENV=yes or WITH_TKENV=yes in configure.user

@marcy05
Copy link
Author

marcy05 commented Nov 23, 2018

enabling QTENV now it start with omnet++.
thanks for support me!

@marcy05 marcy05 closed this as completed Nov 23, 2018
@rtobi rtobi mentioned this issue Nov 26, 2018
@anunga
Copy link

anunga commented Apr 21, 2020

The "General" configuration does not have any network defined because you have to decide for either an INET or a Veins based network. Simply choose a specific configuration of scenarios/artery/omnetpp.ini, e.g. by adding "-c inet" to the RUN_FLAGS CMake variable. This is only required for Cmdenv, Qtenv would ask you about the intended configuration to run.

Actually I am facing the same problem here, can you explain what do you mean by adding "-c inet" to the RUN_FLAGS CMake variable ?
Thank you..

@riebl
Copy link
Owner

riebl commented Apr 21, 2020

Open the build directory configuration with ccmake or cmake-gui and set the value of the RUN_FLAGS variable accordingly.

@anunga
Copy link

anunga commented Apr 21, 2020

Thanks a lot... its work !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants