Build fail Error with Omnet v5.7 and Veins 5.2 - build

Below is the debug console output from a Windows Omnet5.7, Veins5.2 project build - can anyone help how to fix these link and build errors . Something wrong in the makemake settings?
\\\**** Incremental Build of configuration debug for project xxxx ****
make MODE=debug all
cd src && /usr/bin/make
make[1]: Entering directory '/xxxx/src'
Creating executable: ../out/gcc-debug/src/xxxx_dbg.exe
lld-link: error: duplicate symbol: non-virtual thunk to inet::MobilityBase::getMaxSpeed() const
>>> defined at ../../inet4/src/inet/mobility/base/MobilityBase.h:181
>>> ../out/gcc-debug/src/veins_inet/VeinsInetMobility.o
>>> defined at libINET_dbg.dll
lld-link: error: duplicate symbol: non-virtual thunk to inet::MobilityBase::getConstraintAreaMax() const
>>> defined at ../../inet4/src/inet/mobility/base/MobilityBase.h:183
>>> ../out/gcc-debug/src/veins_inet/VeinsInetMobility.o
>>> defined at libINET_dbg.dll
lld-link: error: duplicate symbol: non-virtual thunk to inet::MobilityBase::getConstraintAreaMin() const
>>> defined at ../../inet4/src/inet/mobility/base/MobilityBase.h:184
>>> ../out/gcc-debug/src/veins_inet/VeinsInetMobility.o
>>> defined at libINET_dbg.dll
lld-link: error: duplicate symbol: __NULL_IMPORT_DESCRIPTOR
>>> defined at libINET_dbg.dll.a(libINET_dbg.dll)
>>> defined at libveins_dbg.dll.a(libveins_dbg.dll)
collect2.exe: error: ld returned 1 exit status
make[1]: *** [Makefile:111: ../out/gcc-debug/src/xxxxx_dbg.exe] Error 1
make[1]: Leaving directory '/xxxx/src'
make: *** [Makefile:2: all] Error 2
"make MODE=debug all" terminated with exit code 2. Build might be incomplete.
21:09:59 Build Failed. 2 errors, 0 warnings. (took 1s.618ms)```

I'd suggest, according to this page: https://veins.car2x.org/download/#compatibility
to use OMNeT++ version 6pre14 on Windows in order to get things working. I'm also using those versions, on Windows 11. All working*.

Related

Compilation Failing for xalan-c in Ubuntu

I am trying to build xalan-c (version 1.12) with icu in Ubuntu but it fails.
Could anyone help me with this.
Environment : Ubuntu 20.04
Steps to reproduce :
Clone xalan-c
cmake -G "Unix Makefiles" -DCMAKE_PREFIX_PATH="path to vcpkg installed libraries" -DCMAKE_INSTALL_PREFIX=./install/Xalan-c -DCMAKE_BUILD_TYPE=Debug -Dtranscoder=icu "path to source"
make
Error
[ 95%] Linking C executable SimpleXPathCAPI
/usr/bin/ld: /home/minhaaj/app/vcpkg/installed/x64-linux/lib/libicuuc.a(rbbistbl.ao): undefined reference to symbol '_ZTVN10__cxxabiv121__vmi_class_type_infoE##CXXABI_1.3'
/usr/bin/ld: /lib/x86_64-linux-gnu/libstdc++.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [samples/CMakeFiles/SimpleXPathCAPI.dir/build.make:90: samples/SimpleXPathCAPI] Error 1
make[1]: *** [CMakeFiles/Makefile2:842: samples/CMakeFiles/SimpleXPathCAPI.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
Please note I have applied a patch for configuration error as below in src/xalanc/Utils/MsgCreator/CMakeLists.txt
target_link_libraries(MsgCreator ICU::uc ICU::i18n)
changed to
target_link_libraries(MsgCreator ICU::uc ICU::i18n ICU::data)

Building webassembly with opencv

I've been trying to build a piece of code in webassembly that would use OpenCV.
I took https://github.com/mpizenberg/emscripten-opencv to start building, this worked well, but when I try adding cv::resize to be able to resize an image, that's when I have some issues:
make[1]: Entering directory '/code/build'
make[2]: Entering directory '/code/build'
make[3]: Entering directory '/code/build'
Scanning dependencies of target hello
make[3]: Leaving directory '/code/build'
make[3]: Entering directory '/code/build'
[ 50%] Building CXX object CMakeFiles/hello.dir/source/main.cpp.o
[100%] Linking CXX executable hello.js
error: undefined symbol: _Z7cvFloorRKN2cv10softdoubleE
warning: To disable errors for undefined symbols use `-s ERROR_ON_UNDEFINED_SYMBOLS=0`
error: undefined symbol: _Z7cvRoundRKN2cv10softdoubleE
error: undefined symbol: _Z9cvRound64RKN2cv10softdoubleE
error: undefined symbol: _ZN2cv10softdoubleC1Ei
error: undefined symbol: _ZN2cv10softdoubleC1Ex
error: undefined symbol: _ZNK2cv10softdoubledvERKS0_
error: undefined symbol: _ZNK2cv10softdoublemiERKS0_
error: undefined symbol: _ZNK2cv10softdoublemlERKS0_
error: undefined symbol: _ZNK2cv10softdoubleplERKS0_
Error: Aborting compilation due to previous errors
shared:ERROR: '/emsdk_portable/node/bin/node /emsdk_portable/sdk/src/compiler.js /tmp/tmpS6bxjF.txt /emsdk_portable/sdk/src/embind/emval.js /emsdk_portable/sdk/src/embind/embind.js /emsdk_portable/sdk/src/library_pthread_stub.js' failed (1)
CMakeFiles/hello.dir/build.make:95: recipe for target 'hello.js' failed
make[3]: *** [hello.js] Error 1
make[3]: Leaving directory '/code/build'
CMakeFiles/Makefile2:72: recipe for target 'CMakeFiles/hello.dir/all' failed
make[2]: *** [CMakeFiles/hello.dir/all] Error 2
make[2]: Leaving directory '/code/build'
Makefile:83: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/code/build'
Makefile:5: recipe for target 'build' failed
make: *** [build] Error 2
The command '/bin/sh -c make build' returned a non-zero code: 2
make: *** [all] Error 2
I tried wrapping up my problem here https://github.com/jdrouet/opencv-wasm, you can pull it and run make, it'll build with docker.
Do you have any idea of how I could fix my issue?
Ok, looks like I found a way to build it (still here https://github.com/jdrouet/opencv-wasm) but now, when I try to use the resize function, I end up with the following error :
Error: the string "174007712 - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch." was thrown, throw an Error :)
So now, I don't know if I'm not using the function well... Here is the function : https://github.com/jdrouet/opencv-wasm/blob/master/source/resizer.cpp#L23
Do you have any idea of why it's not working?

Undefined reference when compiling library with clang

I'm trying to build the libdepixelize library , but I'm getting the following error:
[100%] Linking CXX executable depixelize-kopf2011
/usr/bin/ld: /usr/local/lib/lib2geom.a(nearest-point.o): undefined reference to symbol '_ZNKSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEE3strEv##GLIBCXX_3.4.21'
//usr/lib/x86_64-linux-gnu/libstdc++.so.6: error adding symbols: DSO missing from command line
clang: error: linker command failed with exit code 1 (use -v to see invocation)
src/depixelize-kopf2011/CMakeFiles/depixelize-kopf2011.dir/build.make:95: recipe for target 'src/depixelize-kopf2011/depixelize-kopf2011' failed
make[2]: *** [src/depixelize-kopf2011/depixelize-kopf2011] Error 1
CMakeFiles/Makefile2:142: recipe for target 'src/depixelize-kopf2011/CMakeFiles/depixelize-kopf2011.dir/all' failed
make[1]: *** [src/depixelize-kopf2011/CMakeFiles/depixelize-kopf2011.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
I'm using clang with libstdc++ as compiler. GCC didn't work either.
EDIT: I used this in the CMakeLists file: set(CMAKE_CXX_FLAGS "-std=c++11 -stdlib=libc++") and then did cmake -DCMAKE_CXX_COMPILER="clang++" .. and make to compile it. The full log is here: https://hastebin.com/axasololuc.js
I have no idea what exactly it means, or even how to fix it.

make "sumo 0.17.1" on ubuntu 13.10

I installed and tested v0.19.1 successfully before, however, I needed to downgrade to 0.17.1 in order to run some example in omnetpp's veins simulator.
Whenever I run the "make" command, I get the following error:
/usr/bin/ld: ./utils/foxtools/libfoxtools.a(MFXMutex.o): undefined reference to symbol 'pthread_mutexattr_settype##GLIBC_2.2.5'
/lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[3]: *** [sumo-gui] Error 1
make[3]: Leaving directory `/home/maamoun/pkgs/sumo-0.17.1/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/maamoun/pkgs/sumo-0.17.1/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/maamoun/pkgs/sumo-0.17.1/src'
make: *** [all-recursive] Error 1
What am I missing?!
Problem solved, had to install libproj-dev and include proj in the ./configure using the --with-proj-includes=DIR
[EDIT] after 15 minutes of making, same error raised again!!!

Cannot find library reference to libmysqlclient_r Angstrom

I downloaded the MySQL Connector / C++ code from dev.mysql.com. I also used opkg to download the libmysqlclient-r-dev package, which gave me libmysqlclient_r.so and .la in my /usr/lib directory.
When I attempt to make the source code for the MySQL connector, I get the following error:
/usr/lib/gcc/arm-angstrom-linux-gnueabi/4.7.3/../../../../arm-angstrom-linux-gnueabi/bin/ld: cannot find -lmysqlclient_r
collect2: error: ld returned 1 exit status
make[2]: *** [driver/libmysqlcppconn.so.1.0.5] Error 1
make[1]: *** [driver/CMakeFiles/mysqlcppconn.dir/all] Error 2
make: *** [all] Error 2
It tells me that the library is missing, eventhough it is present in /usr/lib?
How does that work, and what should I do?