riebl / artery

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

Compilation issue with new INET #85

Closed ShilpiPhadnis closed 5 years ago

ShilpiPhadnis commented 5 years ago

I want to use ExtEthernetSocket to create connection to an ethernet socket. As of now artery is not using latest code of inet. So we are not able to compile code of latest inet in artery environment.

Do we need to change the code present in src/artery/inet to comply with latest inet code ? or Do we have any other way to do socket programming in source code of artery inet?

riebl commented 5 years ago

Have you tried the inet4 branch of Artery already?

ShilpiPhadnis commented 5 years ago

I checked the inet4 branch of Artery but emulation folder itself is not present in this branch. ExtEthernetSocket is present in emulation folder of inet. https://github.com/riebl/inet/tree/576b2dc4c74bc8a6885ea2b788b8387bc70ea5c4/src/inet

Please check below link for reference: https://github.com/inet-framework/inet/tree/master/src/inet/emulation/linklayer/ethernet

riebl commented 5 years ago

INET 4.0 has also emulation features included, see its src/inet/linklayer/ext directory. You may also use the inet4 branch as a starting point and update its extern/inet git submodule to INET 4.1. I assume only minor adjustments are required.

ShilpiPhadnis commented 5 years ago

Thanks Riebl. I will check that code. Can you please also confirm that EtherSocket also enable sending packets over raw socket?

ShilpiPhadnis commented 5 years ago

I am getting compilation error after using lNET4 branch source code. I have taken INET4 source code of artery, inet, veins, vanetza, simulte, and pybind11.

[ 64%] Building CXX object src/artery/CMakeFiles/core.dir/inet/VanetRx.cc.o [ 65%] Linking CXX shared library libartery_core.so /usr/bin/ld: /usr/local/lib/libvanetza_btp.a(data_request.cpp.o): relocation R_X86_64_32 against `.bss' can not be used when making a shared object; recompile with -fPIC /usr/local/lib/libvanetza_btp.a: error adding symbols: Bad value collect2: error: ld returned 1 exit status src/artery/CMakeFiles/core.dir/build.make:1000: recipe for target 'src/artery/libartery_core.so' failed make[2]: [src/artery/libartery_core.so] Error 1 CMakeFiles/Makefile2:190: 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

riebl commented 5 years ago

It seems you have installed a static version of Vanetza system-wide in /usr/local/ and CMake has picked up this location instead of the one in Artery's extern/vanetza/build sub-directory. Please check the Vanetza_DIR variable in your build directory to point to /path/to/artery/extern/vanetza/build.

ShilpiPhadnis commented 5 years ago

Thanks Riebl. I tried to comment the static version of vanetza and able to build the application but facing issue in execution of storyboard application. <!> Error: Cannot load library '/home/shilpip/Desktop/ShilpiPhadnis/Artery/artery_inet4/artery/build/src/artery/storyboard/libartery_storyboard.so': /home/shilpip/Desktop/ShilpiPhadnis/Artery/artery_inet4/artery/build/src/artery/storyboard/libartery_storyboard.so: undefined symbol: _Py_FalseStruct

End.

riebl commented 5 years ago

Please make sure that you do not mix Python2 and Python3, i.e. PYTHON_INCLUDE_DIR and PYTHON_LIBRARY point to the same Python version. For example, on my systems these point to /usr/include/python3.7m and /usr/lib64/libpython3.7m.so respectively.

ShilpiPhadnis commented 5 years ago

Thanks Riebl for your help. Issue is fixed and I am able to run application. As of now I am checking to implement ExtEtherSocket with Artery INET4 environment. My requirement is to send raw packet over ethernet socket?

riebl commented 5 years ago

I have not used this feature of INET yet since we are using software-defined radios for our hardware-in-the-loop setups. Presumably, the INET community can answer your questions related to INET's support for external devices better.