Open kamiradi opened 2 years ago
Hi on further investigation, I see that the real problem seems to be that CMake doesn't configure properly. I am using CMake 3.1.0, ROS kinetic, Ubuntu 16. CMake seems to be using cc and c++ compilers. Furthermore, i have also added the following lines to the package CMakeLists.txt
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
target_link_libraries(${PROJECT_NAME} Threads::Threads)
I get the following output in my CMakeError.log
Determining if the pthread_create exist failed with the following output:
Change Dir: /home/panda/Documents/panda_vision_ws/build/visp_ros/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTryCompileExec211407289/fast"
/usr/bin/make -f CMakeFiles/cmTryCompileExec211407289.dir/build.make CMakeFiles/cmTryCompileExec211407289.dir/build
make[1]: Entering directory '/home/panda/Documents/panda_vision_ws/build/visp_ros/CMakeFiles/CMakeTmp'
/opt/cmake/bin/cmake -E cmake_progress_report /home/panda/Documents/panda_vision_ws/build/visp_ros/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec211407289.dir/CheckSymbolExists.c.o
/usr/bin/cc -o CMakeFiles/cmTryCompileExec211407289.dir/CheckSymbolExists.c.o -c /home/panda/Documents/panda_vision_ws/build/visp_ros/CMakeFiles/CMakeTmp/CheckSymbolExists.c
Linking C executable cmTryCompileExec211407289
/opt/cmake/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec211407289.dir/link.txt --verbose=1
/usr/bin/cc CMakeFiles/cmTryCompileExec211407289.dir/CheckSymbolExists.c.o -o cmTryCompileExec211407289 -rdynamic
CMakeFiles/cmTryCompileExec211407289.dir/CheckSymbolExists.c.o: In function `main':
CheckSymbolExists.c:(.text+0x16): undefined reference to `pthread_create'
collect2: error: ld returned 1 exit status
CMakeFiles/cmTryCompileExec211407289.dir/build.make:88: recipe for target 'cmTryCompileExec211407289' failed
make[1]: *** [cmTryCompileExec211407289] Error 1
make[1]: Leaving directory '/home/panda/Documents/panda_vision_ws/build/visp_ros/CMakeFiles/CMakeTmp'
Makefile:118: recipe for target 'cmTryCompileExec211407289/fast' failed
make: *** [cmTryCompileExec211407289/fast] Error 2
File /home/panda/Documents/panda_vision_ws/build/visp_ros/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <pthread.h>
int main(int argc, char** argv)
{
(void)argv;
#ifndef pthread_create
return ((int*)(&pthread_create))[argc];
#else
(void)argc;
return 0;
#endif
}
I have also tried with other versions of CMake, but i get the same error. pthread
does not seem to be linking to a very specific test of cmake. If you look at the CMakeError.log
, the -pthread
flag is not being passed, hence the error. Would you be able to see exactly which version of CMake you were using to build the package?
I suspect that you have ViSP binary packages installed (maybe ros-distro-visp
package installed in /opt/ros/distro/...
or libvisp-dev
package in /usr/lib
) besides ViSP installed from source (in /usr/local/lib
).
If this is the case, keep only ViSP installed from source by removing binary packages.
To check if I'm right:
$ sudo updatedb
$ locate libvisp_core
Hi I have an issue after installing ros_humble_visp and then following the instructions on the main page to install visp_visioon for ros. Here is the error I see:
Can someone help me out? I also run
$ sudo updatedb $ locate libvisp_core
To check and I see:
In this case should I also remove the binaries and try again?
Thanks a lot!
It seems that image_proc
ros2 package is not installed.
$ sudo apt install ros-<distro>-image-proc
Hi, I am having the following build errors when trying to build
visp_ros
. Any suggestions?