I am trying to build project esp-obd-emulator I always get the following error, maybe someone can help me with that.
I am using esp-idf to build project.
C:\Users\edvar\Desktop\esp-idf-2\examples\emu>idf.py build
Checking Python dependencies...
Python requirements from C:\Users\edvar\Desktop\esp-idf-2\requirements.txt are satisfied.
Executing action: all (aliases: build)
Running ninja in directory c:\users\edvar\desktop\esp-idf-2\examples\emu\build
Executing "ninja all"...
[1/5] Performing build step for 'bootloader'
ninja: no work to do.
[2/3] Linking CXX executable emu.elf
FAILED: emu.elf
cmd.exe /C "cd . && C:\Users\edvar\.espressif\tools\xtensa-esp32-elf\esp-2019r2-8.2.0\xtensa-esp32-elf\bin\xtensa-esp32-elf-g++.exe -mlongcalls -Wno-frame-address -nostdlib #CMakeFiles\emu.elf.rsp -o emu.elf && cd ."
c:/users/edvar/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: esp-idf/esp32/libesp32.a(cpu_start.c.obj):(.literal.main_task+0x18): undefined reference to `app_main'
c:/users/edvar/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: esp-idf/esp32/libesp32.a(cpu_start.c.obj): in function `main_task':
C:/Users/edvar/Desktop/esp-idf-2/components/esp32/cpu_start.c:539: undefined reference to `app_main'
collect2.exe: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
ninja failed with exit code 1
esp-obd-emulator seems to not have been ported to ESP-IDF 2.0; it seems to still be using Make instead of CMake. Either compile this with an old version of ESP-IDF, or ask it to be updated to CMake.
Related
Getting “ld: library not found for -llibopencv_dnn.3.3.1.dylib:
11:27:44: Running steps for project Hello_OpenCV...
11:27:44: Configuration unchanged, skipping qmake step.
11:27:44: Starting: "/usr/bin/make"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -stdlib=libc++ -headerpad_max_install_names -arch x86_64 -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -mmacosx-version-min=10.10 -Wl,-rpath,#executable_path/Frameworks -o Hello_OpenCV main.o -L/usr/local/lib -llibopencv_dnn.3.3.1.dylib -llibopencv_ml.3.3.1.dylib -llibopencv_objdetect.3.3.1.dylib -llibopencv_shape.3.3.1.dylib -llibopencv_stitching.3.3.1.dylib -llibopencv_superres.3.3.1.dylib -llibopencv_videostab.3.3.1.dylib -llibopencv_calib3d.3.3.1.dylib -llibopencv_features2d.3.3.1.dylib -llibopencv_highgui.3.3.1.dylib -llibopencv_videoio.3.3.1.dylib -llibopencv_imgcodecs.3.3.1.dylib -llibopencv_video.3.3.1.dylib -llibopencv_photo.3.3.1.dylib -llibopencv_imgproc.3.3.1.dylib -llibopencv_flann.3.3.1.dylib -llibopencv_core.3.3.1.dylib
ld: library not found for -llibopencv_dnn.3.3.1.dylib
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Hello_OpenCV] Error 1
11:27:44: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project Hello_OpenCV (kit: Desktop Qt 5.9.0 clang 64bit)
When executing step "Make"
11:27:44: Elapsed time: 00:00.
Do you actually have OpenCV installed on your system? If you run the following command, do you get any output?
find / -name "*libopencv*" 2>/dev/null
If not, you probably need to ensure you install it first. Follow instructions such as the ones found here.
If the above does return something (example: /path/to/lib/libopencv_dnn.3.3.1dylib), then try adding -L/path/to/lib into your compile line
It looks like you're including the entire suite of OpenCV modules, some of which are very feature-specific and likely not needed if you have a simple application. The DNN module in particular is not included in binary form with OpenCV (see this page on the matter). If you're sure you need it, you need to compile it yourself.
If you aren't doing any machine learning, you likely don't need the library and you can remove -llibopencv_dnn.3.3.1.dylib from your compile line.
Output for 'make all'
[root#parags-pc caffe]# make all
CXX src/caffe/layers/batch_norm_layer.cpp
CXX src/caffe/layers/sigmoid_layer.cpp
CXX src/caffe/layer.cpp
CXX src/caffe/layer_factory.cpp
CXX src/caffe/data_transformer.cpp
AR -o .build_release/lib/libcaffe.a
LD -o .build_release/lib/libcaffe.so
/usr/bin/ld: cannot find -lcblas
/usr/bin/ld: cannot find -latlas
collect2: error: ld returned 1 exit status
Makefile:544: recipe for target '.build_release/lib/libcaffe.so' failed
make: *** [.build_release/lib/libcaffe.so] Error 1
[root#parags-pc caffe]#
I have been trying to install caffe on fedora 21 with little success. On running the following make command I get the errors as given in the screenshot.
I have tried the following to fix this but have had no success.
[root#parags-pc caffe]# export LDFLAGS=-L/lib64/atlas/
[root#parags-pc caffe]# ld -lcblas --verbose
==================================================
attempt to open /usr/x86_64-redhat-linux/lib64/libcblas.so failed
attempt to open /usr/x86_64-redhat-linux/lib64/libcblas.a failed
attempt to open /usr/local/lib64/libcblas.so failed
attempt to open /usr/local/lib64/libcblas.a failed
attempt to open /lib64/libcblas.so failed
attempt to open /lib64/libcblas.a failed
attempt to open /usr/lib64/libcblas.so failed
attempt to open /usr/lib64/libcblas.a failed
attempt to open /usr/x86_64-redhat-linux/lib/libcblas.so failed
attempt to open /usr/x86_64-redhat-linux/lib/libcblas.a failed
attempt to open /usr/lib64/libcblas.so failed
attempt to open /usr/lib64/libcblas.a failed
attempt to open /usr/local/lib/libcblas.so failed
attempt to open /usr/local/lib/libcblas.a failed
attempt to open /lib/libcblas.so failed
attempt to open /lib/libcblas.a failed
attempt to open /usr/lib/libcblas.so failed
attempt to open /usr/lib/libcblas.a failed
ld: cannot find -lcblas
[root#parags-pc caffe]#
The contents of /lib64/atlas/ are as shown below I am not sure though if these are the required libraries.
[root#parags-pc caffe]# ls /lib64/atlas/
libsatlas.so.3 libsatlas.so.3.10 libtatlas.so.3 libtatlas.so.3.10
Google say's to make use of -L to link command. But I don't know which command should be used, how that command is to be used and which libraries should be linked.
I need help please. Thanks!
cd /lib64/atlas
sudo ln -s libtatlas.so /lib/libatlas.so
sudo ln -s libtatlas.so /lib/libcblas.so
The new Atlas ver3 is bundled with both atlas and cblas. Thus there is no need to include both of them separately.
Either you can follow the above method or remove calling the cblas library in your makefile.
I think the reason is you use make to compile, which makes caffe's python port only find libraries in this catalog. Maybe you use cmaketo compile and it could work.
$make clean
$cd caffe-master
$mkdir build
$cd build
$cmake ..
$make all -j8
I hope I could help you!
I am trying to build a program that relies on wxWidgets to run properly. I have the latest version of Xcode installed. I have tried building wxWidgets (both wxWidgets-3.0.2 and wxWidgets-2.9.4, the version originally used by the main program). However, in both cases, running the makefile for the main program gives the following error:
make: /Users/path to wxWidgets/wxWidgets-2.9.4/build-cocoa-release/utils/wxrc/wxrc: No such file or directory
As I understand it, I need to build wxrc to get my main program to build properly (I have tried this, but apparently some header files are missing). Is there any way to configure wxWidgets before this step that will automatically build wxrc as well? Or is that something I need to build separately? If it is separate, how would that be done?
I've pasted the code I originally used to configure wxWidgets below, with line breaks to make it easier to read:
../configure --with-osx_cocoa --with-macosx-version-min=10.7
--with-macosx-sdk=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk
--prefix="$(pwd)" --with-opengl CC=clang CXX=clang++ CXXFLAGS="-stdlib=libc++ -std=c++11"
OBJCXXFLAGS="-stdlib=libc++ -std=c++11" LDFLAGS=-stdlib=libc++
There is one error while building wxWidgets:
../src/osx/cocoa/utils.mm:250:28: error: cannot initialize a parameter of type 'id' with an lvalue of type
'wxNSAppController *'
[NSApp setDelegate:appcontroller];
When I go into the samples directory and enter "make", I get: ld: library not found for -lwx_osx_cocoau_xrc-2.9 clang: error: linker command failed with exit code 1 (use -v to see invocation) When entering "make" in demos, I get: ld: library not found for -lwx_osx_cocoau_core-2.9 clang: error: linker command failed with exit code 1 (use -v to see invocation)
If I missed any steps I should have taken before these (something with Xcode maybe?) please let me know. Thank you very much in advance.
Similar question. I have sugested a workaround proposed on a forum as follows: you can use --with-macosx-sdk=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/".
When trying to install ROS Groovy in mac osx, following http://www.ros.org/wiki/groovy/Installation/OSX/Homebrew/Source tutorial, I get
[ 60%] Building CXX object src/rviz/CMakeFiles/rviz.dir/moc_widget_geometry_change_detector.cxx.o
Building CXX object src/rviz/CMakeFiles/rviz.dir/moc_selection_panel.cxx.o
[ 61%] Building CXX object src/rviz/CMakeFiles/rviz.dir/moc_tool_properties_panel.cxx.o
Linking CXX shared library /Users/mllofriu/ros_catkin_ws/devel_isolated/rviz/lib/librviz.dylib
ld: library not found for -lOgreMain
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: * [/Users/mllofriu/ros_catkin_ws/devel_isolated/rviz/lib/librviz.dylib] Error 1
make[1]: [src/rviz/CMakeFiles/rviz.dir/all] Error 2
make: ** [all] Error 2
<== Failed to process package 'rviz':
Command '/opt/ros/groovy/env_cached.sh make -j4' returned non-zero exit status 2
Command failed, exiting.
OgreMain seems to be inexistent in OSX. What can I do to get around this issue?
Ogre is a 3D rendering engine and not part of OSX (but supported on that platform). The ROS project uses Ogre for the rendering part in their visualization tools.
According to their website, there currently is an issue with the ROS+Ogre build process, that they are working on, compare this ROS support ticket.
In the meantime, you should try the two other build options listed here until they managed to sort out their build process issues:
Desktop Install (recommended): ROS, rqt, rviz, and robot-generic libraries
ROS-Comm: (Bare Bones) ROS package, build, and communication libraries. No GUI tools.
Another option might be to compile Ogre yourself, if you feel up to the task.
I installed SFML from scratch today so I could work on a game. I downloaded the source, ran sudo make install, tried compiling one of my old projects, and I couldn't get it to link properly. So I tried running a simpler project: one of the samples in the tutorials. I tried to compile this one specifically, but I get these errors:
g++ -o atest test.cpp -lsfml-graphics -lsfml-window -lsfml-system /tmp/ccaa86fR.o: In function `main':
test.cpp:(.text+0x1d2): undefined reference to `gluPerspective'
collect2: ld returned 1 exit status
make: *** [test] Error 1
Trying an even simpler project, the one in the initial tutorial, I don't run into problems compiling. However, when I try to run it, I get this error:
./atest: error while loading shared libraries: libsfml-graphics.so.1.6: cannot open shared object file: No such file or directory
I checked, and the files did install to /usr/local/lib/ which is where they're supposed to go as far as I know. What am I doing wrong here?
-lGLU should fix the first error and for the second one make sure /usr/local/lib/ is in your ldconfig search path (/etc/ld.so.conf and /etc/ld.so.conf.d/* under Ubuntu) and that you ran ldconfig: sudo ldconfig -v then try running again.
see also man ldconfig