Project-GrADyS / gradys-simulations

Simulations from Project GrADyS on OMNET++ and INET framework
GNU General Public License v3.0
14 stars 10 forks source link

Error generated when the project was build. #29

Open hollywuzh opened 6 months ago

hollywuzh commented 6 months ago

The project is interesting. When I follow the "build the project" step in "2. Local Installation", some errors generated. Can you help me solve it?

In file included from gradys_simulations/protocols/base/CommunicationProtocolPythonBase.cc:16:
./gradys_simulations/protocols/base/CommunicationProtocolPythonBase.h:21:10: fatal error: 'pybind11/embed.h' file not found
#include "pybind11/embed.h"
         ^~~~~~~~~~~~~~~~~~
1 error generated.
make[1]: *** [Makefile:190: ../out/clang-release/src/gradys_simulations/protocols/base/CommunicationProtocolPythonBase.o] Error 1
make[1]: Leaving directory '/f/omnetpp-6.0.1-windows-x86_64/omnetpp-6.0.1/git/gradys-simulations/src'
make: *** [Makefile:67: src_dir] Error 2
"make MODE=release all" terminated with exit code 2. Build might be incomplete.
Kamysek commented 6 months ago

Hello :) Nice that you are interested in the project. Sure I can help.

Have you added the included all directories in the Makemake options of Omnet? As well as added the include directories for pybind in the Paths and Symbols of Omnet?

hollywuzh commented 6 months ago

I followed the steps and found that the file in pybind11 in the directory after downloading via git was empty. I'M NOT FAMILIAR WITH THE OMNET IDE, CAN YOU PROVIDE A SCREENSHOT OF THE SPECIFIC IDE CONFIGURATION? THANKS!

hollywuzh commented 6 months ago

I download and copy the file "pybind11" from the github project into the file "src", the error messages as follows

./pybind11/detail/common.h:274:10: fatal error: 'Python.h' file not found
#include <Python.h>
         ^~~~~~~~~~
1 error generated.
make[1]: Leaving directory '/Users/wupengfei/git/gradys-simulations/src'
make[1]: *** [Makefile:190: ../out/clang-debug/src/gradys_simulations/protocols/base/CommunicationProtocolPythonBase.o] Error 1
make: *** [Makefile:67: src_dir] Error 2
"make MODE=debug all" terminated with exit code 2. Build might be incomplete.
Kamysek commented 6 months ago

When you clone the project please also clone the submodules this can be done by adding --recurse-submodules to the clone command

hollywuzh commented 6 months ago

I have cloned the project via "git clone --recurse-submodules". Now the file "pybind11" is not empty. However, the error messages still appear

In file included from gradys_simulations/protocols/base/CommunicationProtocolPythonBase.cc:16:
./gradys_simulations/protocols/base/CommunicationProtocolPythonBase.h:21:10: fatal error: 'pybind11/embed.h' file not found
#include "pybind11/embed.h"
         ^~~~~~~~~~~~~~~~~~
1 error generated.
make[1]: Leaving directory '/Users/wupengfei/Downloads/gradys-simulations/src'
make[1]: *** [Makefile:190: ../out/clang-debug/src/gradys_simulations/protocols/base/CommunicationProtocolPythonBase.o] Error 1
make: *** [Makefile:67: src_dir] Error 2
"make MODE=debug all" terminated with exit code 2. Build might be incomplete.

I have check the Makemake options of Omnet and the Paths and Symbols. Could You see if there is a problem with this screenshot setting?

image image
Kamysek commented 6 months ago

Great :) I just updated the documentation with pictures and more text so that it should be easier to understand. From those you should be able to get it working.

Another thing: Currently MacOS running on a Apple Silicon is not supported since we use a 3D visualization that does not work for Apple Silicon.

hollywuzh commented 6 months ago

It's amazing how efficient you are. I am very optimistic about the application potential of this project, which can help me to do some more solid research. Anyway, Omnet++ is quite difficult to get started for me.

Kamysek commented 6 months ago

There are two other options I can recommend to have a look at this: Gradys Sim Nextgen and Gradys Sim Python Examples . It's a simplified version we use to try and develop new protocols. It's written in python and very simple to get up and running. Additionally it has the capability to integrate with Omnet and it's super easy to get up and running.

In addition there is a docker container for running Omnet. I recommend to try that out as well. Everything should work out of the box.