Error when building simuLTE with MODE=release - omnet++

In order to run the simulation faster, I am trying to build simuLTE in release mode as can be achieved for veins.
user#user-VirtualBox:~/simulte_veins/simulte$ make MODE=release
make[1]: Entering directory '/home/user/simulte_veins/simulte/src'
Creating shared library: ../out/gcc-release/src/liblte.so
/usr/bin/ld: cannot find -lINET
/usr/bin/ld: cannot find -lveins_inet
collect2: error: ld returned 1 exit status
Makefile:275: recipe for target '../out/gcc-release/src/liblte.so' failed
make[1]: *** [../out/gcc-release/src/liblte.so] Error 1
make[1]: Leaving directory '/home/user/simulte_veins/simulte/src'
Makefile:2: recipe for target 'all' failed
make: *** [all] Error 2
I have tried appending ~/.bashrc with INET and veins_inet paths as observed from the MAKEFILE under lte/src/ in the following manner:
export veins_inet=$HOME/simulte_veins/veins-veins-4.6/subprojects/veins_inet/out/gcc-debug/src:$PATH
export INET=$HOME/inet/out/gcc-debug/src:$PATH
I also tried updating $PATH directly by adding INET and veins_inet paths but to no avail.
Where am I going wrong?
Do I need to build INET and veins_inet in release mode before building lte?
I even tried building INET in MODE=release and I encountered the same error
/usr/bin/ld: cannot find -lINET
I am using OMNeT++ 5.1.1;veins 4.6;sumo 0.30.0;simulte v1.0.1
Similar issue was raised here. However, I am not sure if I should try to link the .so file in their respective directories again to -lINET and -lveins_inet respectively. Can anybody advise me?

If the build works for the debug version, but not for the release version, then you have not compiled release version libraries for INET and VEINS_INET. Go to their respective dirs and build those components, too.

Related

missed files while building veins_inet

I'm using inet4 omnet5.5.1 veins5 I imported veins_inet in the workspace but it doesn't build successfully even though I added the paths to inet and veins src files in project properties I got the following error:
15:29:41 **** Incremental Build of configuration gcc-debug for project veins_inet ****
make MODE=debug all
make[1]: Entering directory '/home/nai/omnetpp-5.5.1/myWorkspace/veins_inet/src'
Creating shared library: ../out/gcc-debug/src/libveins_inet_dbg.so
/usr/bin/ld: cannot find -lINET_dbg
Makefile:141: recipe for target '../out/gcc-debug/src/libveins_inet_dbg.so' failed
make[1]: Leaving directory '/home/nai/omnetpp-5.5.1/myWorkspace/veins_inet/src'
Makefile:36: recipe for target 'all' failed
/usr/bin/ld: cannot find -lveins_dbg
collect2: error: ld returned 1 exit status
make[1]: *** [../out/gcc-debug/src/libveins_inet_dbg.so] Error 1
make: *** [all] Error 2
"make MODE=debug all" terminated with exit code 2. Build might be incomplete.
15:29:43 Build Failed. 6 errors, 0 warnings. (took 1s.693ms)
apparently some required files are missing
how to fix this please
You might be building this project in debug mode, but not building the other projects in debug mode.

Cannot find a link library (lNrrdIO)

I am trying to install NrrdIO on Ubuntu 18.04, to run Marching Cubes to segment medical images. This is the link from which I'm trying to run it.
http://web.cse.ohio-state.edu/research/graphics/isotable/
I'm trying to install ijkmcube-v0-3-3.tar, which requires the ITKNrrdIO.a library. I'm running into this error:
[ 7%] Linking CXX executable ijkmcube
/usr/bin/ld: cannot find -lNrrdIO
collect2: error: ld returned 1 exit status
CMakeFiles/ijkmcube.dir/build.make:406: recipe for target 'ijkmcube' failed
make[2]: *** [ijkmcube] Error 1
CMakeFiles/Makefile2:131: recipe for target 'CMakeFiles/ijkmcube.dir/all' failed
make[1]: *** [CMakeFiles/ijkmcube.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
I've installed NrrdIO 1.11.0, and tried with NrrdIO 1.9.0 as well, but while running
make
I always run into this error, for some reason its not able to find lNrrdIO . Can someone please help?
Thanks
Edit:
I think its a problem with the linking, but when I copied the NrrdIO.a file to /usr/bin and modified the symbolic link to point to it, I got an error as follows:
[ 7%] Linking CXX executable ijkmcube
collect2: fatal error: cannot find 'ld'
compilation terminated.
CMakeFiles/ijkmcube.dir/build.make:406: recipe for target 'ijkmcube'
failed
make[2]: *** [ijkmcube] Error 1
CMakeFiles/Makefile2:131: recipe for target '
CMakeFiles/ijkmcube.dir/all' failed
make[1]: *** [CMakeFiles/ijkmcube.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
Can someone help? Thank you
Edit 2
PROJECT(IJKMCUBE)
#---------------------------------------------------------
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
IF (NOT DEFINED ${IJK_DIR})
GET_FILENAME_COMPONENT(IJK_ABSOLUTE_PATH "../.." ABSOLUTE)
SET(IJK_DIR ${IJK_ABSOLUTE_PATH} CACHE PATH "IJK directory")
ENDIF (NOT DEFINED ${IJK_DIR})
SET(CMAKE_INSTALL_PREFIX "${IJK_DIR}/")
SET(LIBRARY_OUTPUT_PATH ${IJK_DIR}/lib CACHE PATH "Library directory")
SET(IJKMCUBE_DIR "src/ijkmcube")
SET(NRRD_LIBDIR "${IJK_DIR}/lib")
SET(IJK_ISOTABLE_DIR "${IJK_DIR}/isotable" CACHE PATH "Isotable
directory")
#---------------------------------------------------------
IF (NOT CMAKE_BUILD_TYPE)
SET (CMAKE_BUILD_TYPE Release CACHE STRING
"Default build type: Release" FORCE)
ENDIF (NOT CMAKE_BUILD_TYPE)
INCLUDE_DIRECTORIES("${IJK_DIR}/include")
LINK_DIRECTORIES("${NRRD_LIBDIR}")
LINK_LIBRARIES(expat NrrdIO z)
ADD_DEFINITIONS(-DIJK_ISOTABLE_DIR=\"${IJK_ISOTABLE_DIR}\")
ADD_EXECUTABLE(ijkmcube ijkmcube_main.cxx ijkmcubeIO.cxx ijkmcube.cxx
ijkmcube_datastruct.cxx ijkmcube_sub.cxx
ijkmcube_extract.cxx ijkmcube_util.cxx
ijksnapmc.cxx
ijktable.cxx ijktable_poly.cxx ijktable_ambig.cxx
ijkoctree.cxx ijkxitIO.cxx)
ADD_LIBRARY(ijkmcubeL STATIC EXCLUDE_FROM_ALL ijkmcubeIO.cxx
ijkmcube.cxx ijkmcube_datastruct.cxx ijkmcube_sub.cxx
ijkmcube_extract.cxx ijkmcube_util.cxx ijksnapmc.cxx
ijktable.cxx ijkoctree.cxx ijkxitIO.cxx)
SET_TARGET_PROPERTIES(ijkmcubeL PROPERTIES OUTPUT_NAME ijkmcube)
ADD_CUSTOM_TARGET(lib DEPENDS ijkmcubeL)
SET(CMAKE_INSTALL_PREFIX ${IJK_DIR})
INSTALL(TARGETS ijkmcube DESTINATION "bin/linux")
ADD_CUSTOM_TARGET(tar WORKING_DIRECTORY ../.. COMMAND tar cvfh
${IJKMCUBE_DIR}/ijkmcube.tar ${IJKMCUBE_DIR}/README
${IJKMCUBE_DIR}/INSTALL ${IJKMCUBE_DIR}/RELEASE_NOTES
${IJKMCUBE_DIR}/*.cxx ${IJKMCUBE_DIR}/*.h ${IJKMCUBE_DIR}/*.txx
${IJKMCUBE_DIR}/CMakeLists.txt ${IJKMCUBE_DIR}/man/*
${IJKMCUBE_DIR}/ijkmcube_doxygen.config)
ADD_CUSTOM_TARGET(doc COMMAND doxygen ijkmcube_doxygen.config)
SOLVED
Tsyvarev solved it, the libNrrdIO.a file has to be copied to /usr/lib/. Refer to comments for the exact solution
This answer was given by #Tsyvarev:
By making a link named ld you are removing the original linker (ld). Without the linker you definitely cannot build any library. What you need is to make a link named lNrrdIO.a, so it will point to the actual library location: sudo ln -sfn /home/subham/Downloads/NrrdIO-1.9.0-src/lNrrdIO.a lNrrdIO.a (run this command from /usr/lib directory). And restore original /usr/bin/ld file.

Building Artery on Ubuntu fails

When I try to build Artery on Ubuntu 16.04. the following happens after invoking
$ cmake --build /home/hardt/Veins/artery-master/build
[ 23%] Linking CXX shared library libartery.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/artery.dir/build.make:954: recipe for target'src/artery/libartery.so' failed
make[2]: *** [src/artery/libartery.so] Error 1
CMakeFiles/Makefile2:229: recipe for target 'src/artery/CMakeFiles/artery.dir/all' failed
make[1]: *** [src/artery/CMakeFiles/artery.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
As I am not all that familiar with building source on Unix systems I am not quite sure how to deal with this error.
I am using cmake version 3.9.3, boost 1.65.1 and crypto++ 5.6.4 the geographiclib built without error as well.
As one can read in the comments, the problem is solved.
The path to the vanetza directory VANETZA_DIR in the cmake configuration was wrong. Correcting this via ccmake solved the problem.

inetmanet building error in omnet++

I have added inetmanet package by downloading from the below link and importing the project in omnet++.
https://github.com/aarizaq/inetmanet-3.x
While trying to built the project, an error is thrown when it was processing the below step in the built process.
Creating shared library: ../out/gcc-debug/src/libINET.dll
The error thrown on the above step is given below:
g++.exe: error: CreateProcess: No such file or directory
make[1]: * [Makefile:1558: ../out/gcc-debug/src/inet/linklayer/base/MACBase.o] Error 1
make[1]: * Waiting for unfinished jobs....
make[1]: Leaving directory '/c/Users/Rashad/Downloads/inetmanet-3.x-inetmanet-3.5/src'
make: *** [Makefile:6: all] Error 2
Error is thrown while trying to execute any example in inetmanet and they are shown below:
Error: Cannot load library '../../../src//libINET.dll': The specified module could not be found
End.
Can anyone in this group explain me why this error is happening. Thanks in advance.
Note: omnet++ 5.1 is being used and INET examples are working fine.
The issue was solved.
The folder "showcases" and "tutorials" were empty and in the git, they were being pulled from INET.
So in my case, I had to manually copy those 2 folders from INET and then paste into INETMANET and rebuild it.

Compiling GCC 4.7.3 for i386-elf support on Cygwin

I am trying to compile GCC for Cygwin with support for targeting i386-elf so I can compile some simple OSes (search Benu, by l30nard0, on Github). I've successfully compiled the binutils for i386-elf, and compiled all of GCC's floating-point numbers dependencies.
Problem is, it says windows.h can not be found. I do have w32api successfully installed, and tried including each of those one at a time in the include path for GCC, but none of them work. If I try any of them, I get so many errors and warnings that not all will show up in the Cygwin console. The dozens upon dozens of warnings are most if not all unused parameter.
Does anyone know where the problem might lie?
I've wasted the last three entire days of my life trying to get Linux Mint set up with everything I want, but for reasons I shan't go into I gave up on that. I'd love to be able to get just one thing to work so I can enjoy my life again. :) Thanks!
BTW: The configure arguments I used were --target=i386-elf --enable-threads=win32 --enable-languages=c,c++ Was I supposed to use --enable-targets instead?
And here's part of the log:
In file included from ../../../gcc/libgcc/gthr.h:150:0,
from ../../../gcc/libgcc/unwind-dw2.c:38:
./gthr-default.h:541:21: fatal error: windows.h: No such file or directory
compilation terminated.
../../../gcc/libgcc/static-object.mk:17: recipe for target 'unwind-dw2.o' failed
make[2]: *** [unwind-dw2.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from ../../../gcc/libgcc/gthr.h:150:0,
from ../../../gcc/libgcc/unwind-dw2-fde.c:38:
./gthr-default.h:541:21: fatal error: windows.h: No such file or directory
compilation terminated.
../../../gcc/libgcc/static-object.mk:17: recipe for target 'unwind-dw2-fde.o' failed
make[2]: *** [unwind-dw2-fde.o] Error 1
make[2]: Leaving directory '/home/Sean/gccbuild/i386-elf/libgcc'
Makefile:10055: recipe for target 'all-target-libgcc' failed
make[1]: *** [all-target-libgcc] Error 2
make[1]: Leaving directory '/home/Sean/gccbuild'
Makefile:870: recipe for target 'all' failed
make: *** [all] Error 2
Remove the --enable-threads=win32 flag; it is intended to specify thread support on the target system, not the build system.

Resources