I am getting the following error in Simu5g make on Terminal.
libsimu5g.so file is not build at the end.
Creating shared library: ../out/clang-release/src/libsimu5g.so
ld.lld: error: unable to find library -lINET
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [Makefile:407: ../out/clang-release/src/libsimu5g.so] Error 1
make[1]: Leaving directory '/home/ash/simu5g/omnetpp-6.0/myworkspace/simu5g-master/simu5g/src'
make: *** [Makefile:2: all] Error 2
Veins 5.2 is being build properly, however, there is no libveins.so file after build.
How should I solve this issue?
Found the Answer:
Ensure that Build Configuration is constant all along.
Inet should be build with debug and release options.
Select Inet -> select Project Features -> C/C++ Build -> In configuration, select [All Configurations] in dropdown -> Apply and close
Then right click on Inet -> Build Configuration -> Build Selected -> select debug and release -> ok
Repeat the build procedure with Veins and Simu5g
Related
I'm working on a cmake project which linked to boost libraries. I want to link to shared boost_unit_test_framework and static the others. A part of cmakelists.txt as below:
set(Boost_USE_STATIC_LIBS on)
add_definitions(-DBOOST_TEST_DYN_LINK)
find_package (Boost REQUIRED COMPONENTS timer system OPTIONAL_COMPONENTS chrono)
find_library(boost_test boost_unit_test_framework /opt/boost/lib)
set (TEST test-suite)
add_executable (${TEST} ${Test_SRC})
message(STATUS "##########################${boost_test}")
target_link_libraries (${TEST} ${boost_test})
target_link_libraries (${TEST} ${Boost_LIBRARIES})
I tried to build it in a docker container, link errors reported:
/usr/bin/ld: cannot find -lboost_unit_test_framework
collect2: error: ld returned 1 exit status
make[2]: *** [QuantLib/test-suite/CMakeFiles/quantlib-test-suite.dir/build.make:1574: QuantLib/test-suite/quantlib-test-suite] Error 1
make[1]: *** [CMakeFiles/Makefile2:1267: QuantLib/test-suite/CMakeFiles/quantlib-test-suite.dir/all] Error 2
make: *** [Makefile:163: all] Error 2
Some information:
1.My cmake version is 3.11.4; boost version is 1.74, installed under /opt/boost.
2.If I build it on a linux server, there is no error; If I build it in a docker continer, errors emited. The docker continer has almose same settings with the linux server: centos8.1/cmake3.11/boost1.74
3.${boost_test} message in cmakelists.txt show a full path: /opt/boost/lib/libboost_unit_test_framework.so
4.Make a soft link to libboost_unit_test_framework.so under /usr/lib can fix the error, but I don't want to change the container environment. I want to fix it in CMake.
5.Shared libs:
Any idea?
I try to build drake1.0.0 from source using bazel. However I encounter the following error:
ERROR: /home/chenwang/drake-build/_bazel_chenwang/bcff9e14963ec4b6ed21d9b7e9e180fc/external/net_sf_jchart2d/jar/BUILD.bazel:2:12: Extracting interface #net_sf_jchart2d//jar:jar failed: missing input file 'external/net_sf_jchart2d/jar/jchart2d.jar', owner: '#net_sf_jchart2d//jar:jchart2d.jar'
ERROR: /home/chenwang/drake-build/_bazel_chenwang/bcff9e14963ec4b6ed21d9b7e9e180fc/external/net_sf_jchart2d/jar/BUILD.bazel:2:12: Extracting interface #net_sf_jchart2d//jar:jar failed: 1 input file(s) do not exist
Target //:install failed to build
Use --verbose_failures to see the command lines of failed build steps.
ERROR: /home/chenwang/drake-build/_bazel_chenwang/bcff9e14963ec4b6ed21d9b7e9e180fc/external/net_sf_jchart2d/jar/BUILD.bazel:2:12 Extracting interface #net_sf_jchart2d//jar:jar failed: 1 input file(s) do not exist
INFO: Elapsed time: 23.087s, Critical Path: 8.22s
INFO: 2890 processes: 2584 internal, 306 linux-sandbox.
FAILED: Build did NOT complete successfully
CMakeFiles/drake_cxx_python.dir/build.make:110: recipe for target 'drake_cxx_python-prefix/src/drake_cxx_python-stamp/drake_cxx_python-build' failed
make[2]: *** [drake_cxx_python-prefix/src/drake_cxx_python-stamp/drake_cxx_python-build] Error 1
CMakeFiles/Makefile2:931: recipe for target 'CMakeFiles/drake_cxx_python.dir/all' failed
make[1]: *** [CMakeFiles/drake_cxx_python.dir/all] Error 2
Makefile:162: recipe for target 'all' failed
make: *** [all] Error 2
I have built older version drake from source successfully. It seems that I miss some third-party library for building the new version drake. Thank you for your help!
It turns out that the install_repreqs.sh has been updated and I forget to rerun it. After installing the prerequisite by rerunning install_repreqs.sh, I can build drake from source successfully.
i tried to build android Kernel msm-3.18 with Clang along with aosp 10 and im getting build error related to Linker
CHK include/generated/uapi/linux/version.h
HOSTCC scripts/basic/fixdep
clang-9: error: unable to execute command: Executable "ld" doesn't exist!
clang-9: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [scripts/Makefile.host:91: scripts/basic/fixdep] Error 1
attaching the snapshot and make command
https://user-images.githubusercontent.com/82863729/115356430-473bab00-a1d9-11eb-962d-3f157d022c20.jpeg
[Error LOG] (https://pastebin.com/K5kXM606)logs
please suggest how to fix this error
Take a look in this error, and find out where the ld command path define.
make[1]: *** [/data/home/prdn273053/aosp_10/kernel/msm-3.18/Makefile:462: scripts_basic] Error 2
I think it will be help.
I've created a simple project to get myself accustomed to meson, but the build keeps failing.
This is what I did (to set up the environment, and to build):
set CC=clang
set CC_LD=lld
set CFLAGS="--target x86_64-pc-windows-msvc"
meson build
cd build
ninja
My meson.build is as follows:
project('EtaClient', 'c')
src = ['src/main.c', 'src/linkedlist.c']
executable('EtaClient', src)
target = 'x86_64-pc-windows-msvc'
While building, I get the following errors (the obj files are built successfully, but they're not linked and thus the exe isn't built):
LINK : warning LNK4044: unrecognized option '/-subsystem'; ignored
LINK : fatal error LNK1181: cannot open input file 'console.obj'
clang: error: linker command failed with exit code 1181 (use -v to see invocation)
When I look in my build.ninja to see what's going on, I find:
build EtaClient.exe | EtaClient.pdb: c_LINKER EtaClient.exe.p/src_main.c.obj EtaClient.exe.p/src_linkedlist.c.obj
LINK_ARGS = "-Wl,/nologo" "-Wl,/release" "-Wl,/nologo" "-Wl,/DEBUG" "-Wl,/PDB:EtaClient.pdb" "-Wl,--subsystem,console" "-lkernel32" "-luser32" "-lgdi32" "-lwinspool" "-lshell32" "-lole32" "-loleaut32" "-luuid" "-lcomdlg32" "-ladvapi32"
I replace "-Wl,--subsystem,console" with "-Wl,/subsystem:console", and the build compiles successfully, but I have to manually make this edit each time I modify my meson.build.
Could someone tell me why this happens, and how to set up meson to generate the correct flag?
Thanks in advance.
use clang-cl instead of clang and leave out the defintion of the linker when you are on windows
set CC=clang-cl
set CFLAGS="--target x86_64-pc-windows-msvc"
meson build
cd build
ninja
see
https://github.com/mesonbuild/meson/issues/4232
I just develop MOIP with ready-made components, but received the error after running.
Showed an error message:
"ld: file not found: /Users/teste/Library/Developer/Xcode/DerivedData/Moip_Store-fakuiehavrpkaeggjvvtbovybkyh/Build/Products/Debug-iphoneos/Moip Store.app/Moip Store
clang: error: linker command failed with exit code 1 (use -v to see invocation)"
site: https://github.com/moip/ios-sdk-sample
Someone solve this problem?
how?
Select your Project and choose your "Moip Store Test" - Target, go to "General" and set your Application as Host Application.