MicroROS build_agent.sh fails - c++

I'm following the tutorial for microROS for teensy found here
https://micro.ros.org/docs/tutorials/core/teensy_with_arduino/
Everything up to the build step works ok, but build fails, error output below, but before we get to that, I wanted to provide some more context:
Building this inside a docker container on Nvidia Jetson Nano 4GB (B01)
/etc/nv_tegra_release
L4T BSP Version: L4T R32.7.1
I tried it with several container images found here:
https://github.com/dusty-nv/jetson-containers
ROS2Foxy:
dustynv/ros:foxy-ros-base-l4t-r32.7.1
dustynv/ros:foxy-pytorch-l4t-r32.7.1
When I launched the docker container in both tests I used either:
./scripts/docker_run.sh -c dustynv/ros:foxy-ros-base-l4t-r32.7.1
./scripts/docker_run.sh -c dustynv/ros:foxy-pytorch-l4t-r32.7.1
once inside the docker container This is the bit where it all goes south:
Build step
ros2 run micro_ros_setup build_agent.sh
Below the parts of the output trace that are relevant:
[Processing: micro_ros_agent]
[Processing: micro_ros_agent]
[Processing: micro_ros_agent]
[Processing: micro_ros_agent]
[Processing: micro_ros_agent]
--- stderr: micro_ros_agent
Cloning into 'xrceagent'...
Switched to a new branch 'ros2'
HEAD is now at 3eb56b5 Release v2.3.0
Cloning into 'spdlog'...
HEAD is now at eb322062 Bump version to 1.9.2
CMake Warning (dev) at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
The package name passed to `find_package_handle_standard_args` (tinyxml2)
does not match the name of the calling package (TinyXML2). This can lead
to problems in calling code that expects `find_package` result variables
(e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
cmake/modules/FindTinyXML2.cmake:40 (find_package_handle_standard_args)
/opt/ros/foxy/install/share/fastrtps/cmake/fastrtps-config.cmake:51 (find_package)
CMakeLists.txt:153 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.
/microros_ws/install/micro_ros_agent/lib/libmicroxrcedds_agent.so.2.3.0: undefined reference to `fmt::v6::internal::basic_data<void>::signs'
/microros_ws/install/micro_ros_agent/lib/libmicroxrcedds_agent.so.2.3.0: undefined reference to `vtable for fmt::v6::format_error'
/microros_ws/install/micro_ros_agent/lib/libmicroxrcedds_agent.so.2.3.0: undefined reference to `int fmt::v6::internal::snprintf_float<double>(double, int, fmt::v6::internal::float_specs, fmt::v6::internal::buffer<char>&)'
/microros_ws/install/micro_ros_agent/lib/libmicroxrcedds_agent.so.2.3.0: undefined reference to `fmt::v6::internal::error_handler::on_error(char const*)'
/microros_ws/install/micro_ros_agent/lib/libmicroxrcedds_agent.so.2.3.0: undefined reference to `char fmt::v6::internal::decimal_point_impl<char>(fmt::v6::internal::locale_ref)'
/microros_ws/install/micro_ros_agent/lib/libmicroxrcedds_agent.so.2.3.0: undefined reference to `fmt::v6::internal::basic_data<void>::zero_or_powers_of_10_32'
/microros_ws/install/micro_ros_agent/lib/libmicroxrcedds_agent.so.2.3.0: undefined reference to `char fmt::v6::internal::thousands_sep_impl<char>(fmt::v6::internal::locale_ref)'
/microros_ws/install/micro_ros_agent/lib/libmicroxrcedds_agent.so.2.3.0: undefined reference to `std::locale fmt::v6::internal::locale_ref::get<std::locale>() const'
/microros_ws/install/micro_ros_agent/lib/libmicroxrcedds_agent.so.2.3.0: undefined reference to `typeinfo for fmt::v6::format_error'
/microros_ws/install/micro_ros_agent/lib/libmicroxrcedds_agent.so.2.3.0: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > fmt::v6::internal::grouping_impl<char>(fmt::v6::internal::locale_ref)'
/microros_ws/install/micro_ros_agent/lib/libmicroxrcedds_agent.so.2.3.0: undefined reference to `int fmt::v6::internal::format_float<long double>(long double, int, fmt::v6::internal::float_specs, fmt::v6::internal::buffer<char>&)'
/microros_ws/install/micro_ros_agent/lib/libmicroxrcedds_agent.so.2.3.0: undefined reference to `spdlog::details::log_msg::log_msg(spdlog::source_loc, fmt::v6::basic_string_view<char>, spdlog::level::level_enum, fmt::v6::basic_string_view<char>)'
/microros_ws/install/micro_ros_agent/lib/libmicroxrcedds_agent.so.2.3.0: undefined reference to `int fmt::v6::internal::snprintf_float<long double>(long double, int, fmt::v6::internal::float_specs, fmt::v6::internal::buffer<char>&)'
/microros_ws/install/micro_ros_agent/lib/libmicroxrcedds_agent.so.2.3.0: undefined reference to `fmt::v6::format_error::~format_error()'
/microros_ws/install/micro_ros_agent/lib/libmicroxrcedds_agent.so.2.3.0: undefined reference to `fmt::v6::internal::basic_data<void>::hex_digits'
/microros_ws/install/micro_ros_agent/lib/libmicroxrcedds_agent.so.2.3.0: undefined reference to `fmt::v6::internal::basic_data<void>::digits'
/microros_ws/install/micro_ros_agent/lib/libmicroxrcedds_agent.so.2.3.0: undefined reference to `int fmt::v6::internal::format_float<double>(double, int, fmt::v6::internal::float_specs, fmt::v6::internal::buffer<char>&)'
/microros_ws/install/micro_ros_agent/lib/libmicroxrcedds_agent.so.2.3.0: undefined reference to `fmt::v6::internal::basic_data<void>::zero_or_powers_of_10_64'
collect2: error: ld returned 1 exit status
make[5]: *** [micro_ros_agent] Error 1
make[4]: *** [CMakeFiles/micro_ros_agent.dir/all] Error 2
make[3]: *** [all] Error 2
make[2]: *** [micro_ros_agent-prefix/src/micro_ros_agent-stamp/micro_ros_agent-build] Error 2
make[1]: *** [CMakeFiles/micro_ros_agent.dir/all] Error 2
make: *** [all] Error 2
---
Failed <<< micro_ros_agent [10min 2s, exited with code 2]
Summary: 1 package finished [10min 48s]
1 package failed: micro_ros_agent
1 package had stderr output: micro_ros_agent
I have also tried to completely reformat the SD card for the Jetson and start fresh. Same problem. So far I have spent 2 fulls days trying to overcome this problem. I think it is time to throw up my arms and ask for some kind soul out there to provide some insight!

Related

Building FLTK Project with CMAKE/CONAN

I'm fairly new to C++ / CMake, but I'd like to create a project with FLTK using CMAKE and CONAN as package manager. I'm using Windows 11, but trying to get it to run under WSL (Ubuntu 20.04). My WSL-version supports GUI applications.
When I install everything without Conan and compile the official "fltk-hello-world" from the command line using fltk-config, everything works okay. However, when I try to set it up using Conan und Cmake I get following errors:
/usr/bin/ld: /home/bfl/.conan/data/fltk/1.3.8/_/_/package/b6898709771003e31b8ea824ee836cf119580bd8/lib/libfltk.a(fl_font.cxx.o): in function `Fl_Font_Descriptor::Fl_Font_Descriptor(char const*, int, int)':
fl_font.cxx:(.text+0x232): undefined reference to `XftFontOpenXlfd'
/usr/bin/ld: fl_font.cxx:(.text+0x47e): undefined reference to `XftFontMatch'
/usr/bin/ld: fl_font.cxx:(.text+0x48f): undefined reference to `XftFontOpenPattern'
/usr/bin/ld: fl_font.cxx:(.text+0x4e1): undefined reference to `XftFontOpen'
/usr/bin/ld: /home/bfl/.conan/data/fltk/1.3.8/_/_/package/b6898709771003e31b8ea824ee836cf119580bd8/lib/libfltk.a(fl_font.cxx.o): in function `Fl_Xlib_Graphics_Driver::width(char const*, int)':
fl_font.cxx:(.text+0x954): undefined reference to `XftTextExtents32'
/usr/bin/ld: /home/bfl/.conan/data/fltk/1.3.8/_/_/package/b6898709771003e31b8ea824ee836cf119580bd8/lib/libfltk.a(fl_font.cxx.o): in function `Fl_Xlib_Graphics_Driver::width(unsigned int)':
fl_font.cxx:(.text+0xa5e): undefined reference to `XftTextExtents32'
/usr/bin/ld: /home/bfl/.conan/data/fltk/1.3.8/_/_/package/b6898709771003e31b8ea824ee836cf119580bd8/lib/libfltk.a(fl_font.cxx.o): in function `Fl_Xlib_Graphics_Driver::text_extents(char const*, int, int&, int&, int&, int&)':
fl_font.cxx:(.text+0xb07): undefined reference to `XftTextExtents32'
/usr/bin/ld: /home/bfl/.conan/data/fltk/1.3.8/_/_/package/b6898709771003e31b8ea824ee836cf119580bd8/lib/libfltk.a(fl_font.cxx.o): in function `Fl_Xlib_Graphics_Driver::draw(char const*, int, int, int)':
fl_font.cxx:(.text+0x1140): undefined reference to `XftDrawChange'
/usr/bin/ld: fl_font.cxx:(.text+0x1176): undefined reference to `XftDrawSetClip'
/usr/bin/ld: fl_font.cxx:(.text+0x1209): undefined reference to `XftDrawString32'
/usr/bin/ld: fl_font.cxx:(.text+0x12d9): undefined reference to `XftDrawCreate'
/usr/bin/ld: /home/bfl/.conan/data/fltk/1.3.8/_/_/package/b6898709771003e31b8ea824ee836cf119580bd8/lib/libfltk.a(fl_font.cxx.o): in function `Fl_Xlib_Graphics_Driver::rtl_draw(char const*, int, int, int)':
fl_font.cxx:(.text+0x149b): undefined reference to `XftTextExtents32'
/usr/bin/ld: fl_font.cxx:(.text+0x14cc): undefined reference to `XftDrawChange'
/usr/bin/ld: fl_font.cxx:(.text+0x1502): undefined reference to `XftDrawSetClip'
/usr/bin/ld: fl_font.cxx:(.text+0x1595): undefined reference to `XftDrawString32'
/usr/bin/ld: fl_font.cxx:(.text+0x15f9): undefined reference to `XftDrawCreate'
/usr/bin/ld: /home/bfl/.conan/data/fltk/1.3.8/_/_/package/b6898709771003e31b8ea824ee836cf119580bd8/lib/libfltk.a(fl_font.cxx.o): in function `fl_destroy_xft_draw(unsigned long)':
fl_font.cxx:(.text+0x10d9): undefined reference to `XftDrawChange'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/hello.dir/build.make:84: bin/hello] Error 1
make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/hello.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
So I assume that i am probably not linking XFT? But I am not sure how to do that, do I need to include the correct name in target-link-libraries? My Cmake-File looks like this:
cmake_minimum_required(VERSION 3.2.3)
project(Hello VERSION 0.1.0)
set(EXECUTABLE_NAME hello)
set(EXE_SOURCES hello.cc)
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup()
add_executable(${EXECUTABLE_NAME} ${EXE_SOURCES})
target_include_directories(hello PUBLIC ${FLTK_INCLUDE_DIRS})
target_link_libraries(hello
${CONAN_LIBS})
I'm grateful for any suggestion.
Thanks,
GB
The conan recipe for fltk does not correctly deal with the cmake system of fltk.
Fltk auto-detects if the system it compiles on has Xft. If it does, then it enables the HAS_XFT variable and compiles some code into the library that uses it.
Conan does not pick up on this and doesn't add Xft to the dependent libraries.
The easiest way around this bug is to manually add the xft dependency.
If you have libXft installed on your system you can simply add an entry of Xft to the target_link_libraries of the target that uses fltk.
Like this:
target_link_libraries(hello ${CONAN_LIBS} Xft)

synergy 1.4.16 fails to compile - undefined reference to `pthread_xxxx'

When attempting to compile synergy 1.4.16 on a Mint 17.1 (Rebecca) I get the following error:
../../../../../lib/libarch.a(CArchMultithreadPosix.o): In function `CArchMultithreadPosix::newMutex()':
CArchMultithreadPosix.cpp:(.text+0x319): undefined reference to `pthread_mutexattr_init'
../../../../../lib/libarch.a(CArchMultithreadPosix.o): In function `CArchMultithreadPosix::raiseSignal(IArchMultithread::ESignal)':
CArchMultithreadPosix.cpp:(.text+0x43b): undefined reference to `pthread_kill'
../../../../../lib/libarch.a(CArchMultithreadPosix.o): In function `CArchMultithreadPosix::threadSignalHandler(void*)':
CArchMultithreadPosix.cpp:(.text+0x490): undefined reference to `pthread_detach'
../../../../../lib/libarch.a(CArchMultithreadPosix.o): In function `CArchMultithreadPosix::closeThread(CArchThreadImpl*)':
CArchMultithreadPosix.cpp:(.text+0x62b): undefined reference to `pthread_detach'
../../../../../lib/libarch.a(CArchMultithreadPosix.o): In function `CArchMultithreadPosix::newThread(void* (*)(void*), void*)':
CArchMultithreadPosix.cpp:(.text+0x8e6): undefined reference to `pthread_sigmask'
CArchMultithreadPosix.cpp:(.text+0x90f): undefined reference to `pthread_sigmask'
CArchMultithreadPosix.cpp:(.text+0x935): undefined reference to `pthread_create'
CArchMultithreadPosix.cpp:(.text+0x9a4): undefined reference to `pthread_create'
../../../../../lib/libarch.a(CArchMultithreadPosix.o): In function `CArchMultithreadPosix::CArchMultithreadPosix()':
CArchMultithreadPosix.cpp:(.text+0xe11): undefined reference to `pthread_mutexattr_init'
CArchMultithreadPosix.cpp:(.text+0xf05): undefined reference to `pthread_sigmask'
CArchMultithreadPosix.cpp:(.text+0xf26): undefined reference to `pthread_sigmask'
../../../../../lib/libarch.a(CArchMultithreadPosix.o): In function `CArchMultithreadPosix::startSignalHandler()':
CArchMultithreadPosix.cpp:(.text+0x10a8): undefined reference to `pthread_sigmask'
CArchMultithreadPosix.cpp:(.text+0x10cd): undefined reference to `pthread_sigmask'
CArchMultithreadPosix.cpp:(.text+0x1104): undefined reference to `pthread_create'
../../../../../lib/libarch.a(CArchMultithreadPosix.o): In function `CArchMultithreadPosix::cancelThread(CArchThreadImpl*)':
CArchMultithreadPosix.cpp:(.text+0x5e3): undefined reference to `pthread_kill'
collect2: error: ld returned 1 exit status
make[2]: *** [../../bin/synergyd] Error 1
make[1]: *** [src/cmd/synergyd/CMakeFiles/synergyd.dir/all] Error 2
make: *** [all] Error 2
Going back to: /home/jussi/Downloads/synergy-1.4.16/synergy-1.4.16-Source
Error: make failed: 512
I already tried the solution to the identical problem here but the solution of adding pthreadto the end of target_link_libraries on src/cmd/synergyd/CMakeLists.txt does not resolve my issue, it remains the same.
The only reason I'm not using pre-compiled packages is that I need to use synergy with my Raspberry Pi 3 and the packages available through the packge repos have incompatible synergy protocols - 1.4.16 on Pi vs 1.4.12 on Mint 17.1 so an alternative solution to have compatible protocols on each of the machines will also be sufficient.
Setting CMAKE_CXX_FLAGS after project definition in CMakeList.txt made it to work for me:
First, declare project (important for prerequisite checks).
project(synergy C CXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++03 -pthread")
Identified an alternative solution: I worked my way around this by (ab?)using the fact that the synergy server with higher protocol version seems to be backwards-compatible with older protocol versions, so I compiled the version 1.8.something and the client on my Pi with 1.4.16 is happy to connect and I can now share the keyboard and mouse connected to my Mint with the Pi.

Including c++ libraries (opencv) on remote build raspberry pi

I'm stuck trying to get some openCV code working on my raspberry pi. I'm almost certain the problem is caused by the linker not knowing where the openCV library files are but I'm unfamiliar with both Linux and Netbeans so I'm in a bit of a pickle!
So, in short, my set-up is: attempting to build my code to my raspberryPi via remote C++ build host (G++). I am writing my code in Netbeans.
The builds worked fine up until the point I wrote two new classes using the "opencv2/core/core.hpp"
Now, when I attempt to build, I get the following error/s:
Copying project files to /home/pi/.netbeans/remote/192.168.1.99/desktop-g6lev01-Windows-x86_64 at pi#192.168.1.99
Building project files list...
Checking directory structure...
Checking previously uploaded files...
Checking links...
Uploading changed files:
Zipping 1 changed files...
Uploading zip to pi#192.168.1.99...
Unzipping changed files...
Checking exec permissions...
Uploading changed files finished successfully.
cd '/home/pi/.netbeans/remote/192.168.1.99/desktop-g6lev01-Windows-x86_64/E/Work/RasberryPi/Code/Raspberrypi_Test'
/usr/bin/make -f Makefile CONF=Release
"/usr/bin/make" -f nbproject/Makefile-Release.mk QMAKE= SUBPROJECTS= .build-conf
make[1]: Entering directory '/home/pi/.netbeans/remote/192.168.1.99/desktop-g6lev01-Windows-x86_64/E/Work/RasberryPi/Code/Raspberrypi_Test'
"/usr/bin/make" -f nbproject/Makefile-Release.mk IOTestBuild
make[2]: Entering directory '/home/pi/.netbeans/remote/192.168.1.99/desktop-g6lev01-Windows-x86_64/E/Work/RasberryPi/Code/Raspberrypi_Test'
g++ -o IOTestBuild build/Release/GNU-Linux/CommsManager.o build/Release/GNU-Linux/ImageManager.o build/Release/GNU-Linux/Server.o build/Release/GNU-Linux/main.o -L../../opencv- -lwiringPi -opencv
build/Release/GNU-Linux/ImageManager.o: In function `ImageManager::getStoredImg()':
ImageManager.cpp:(.text+0xcc): undefined reference to `cv::Mat::copySize(cv::Mat const&)'
build/Release/GNU-Linux/ImageManager.o: In function `ImageManager::ImageManager()':
ImageManager.cpp:(.text+0x134): undefined reference to `cv::VideoCapture::VideoCapture()'
ImageManager.cpp:(.text+0x1c0): undefined reference to `cv::Mat::deallocate()'
ImageManager.cpp:(.text+0x288): undefined reference to `cv::Mat::deallocate()'
ImageManager.cpp:(.text+0x2b8): undefined reference to `cv::fastFree(void*)'
ImageManager.cpp:(.text+0x2c0): undefined reference to `cv::VideoCapture::VideoCapture()'
ImageManager.cpp:(.text+0x32c): undefined reference to `cv::VideoCapture::~VideoCapture()'
ImageManager.cpp:(.text+0x344): undefined reference to `cv::Mat::copySize(cv::Mat const&)'
ImageManager.cpp:(.text+0x350): undefined reference to `cv::Ptr<CvCapture>::delete_obj()'
ImageManager.cpp:(.text+0x358): undefined reference to `cv::fastFree(void*)'
ImageManager.cpp:(.text+0x36c): undefined reference to `cv::VideoCapture::~VideoCapture()'
ImageManager.cpp:(.text+0x388): undefined reference to `cv::VideoCapture::~VideoCapture()'
build/Release/GNU-Linux/ImageManager.o: In function `ImageManager::~ImageManager()':
ImageManager.cpp:(.text+0x3a0): undefined reference to `cv::VideoCapture::~VideoCapture()'
ImageManager.cpp:(.text+0x404): undefined reference to `cv::fastFree(void*)'
ImageManager.cpp:(.text+0x414): undefined reference to `cv::Mat::deallocate()'
build/Release/GNU-Linux/ImageManager.o: In function `ImageManager::getRawImg(cv::Mat*)':
ImageManager.cpp:(.text+0x43c): undefined reference to `cv::VideoCapture::open(int)'
ImageManager.cpp:(.text+0x450): undefined reference to `cv::VideoCapture::operator>>(cv::Mat&)'
ImageManager.cpp:(.text+0x494): undefined reference to `cv::VideoCapture::release()'
build/Release/GNU-Linux/ImageManager.o: In function `ImageManager::updateFrame()':
ImageManager.cpp:(.text+0x5f0): undefined reference to `cv::Mat::copySize(cv::Mat const&)'
ImageManager.cpp:(.text+0x67c): undefined reference to `cv::fastFree(void*)'
ImageManager.cpp:(.text+0x6b8): undefined reference to `cv::Mat::deallocate()'
ImageManager.cpp:(.text+0x6c4): undefined reference to `cv::Mat::deallocate()'
build/Release/GNU-Linux/ImageManager.o: In function `cv::Mat::~Mat()':
ImageManager.cpp:(.text._ZN2cv3MatD2Ev[_ZN2cv3MatD5Ev]+0x68): undefined reference to `cv::fastFree(void*)'
ImageManager.cpp:(.text._ZN2cv3MatD2Ev[_ZN2cv3MatD5Ev]+0x74): undefined reference to `cv::Mat::deallocate()'
collect2: error: ld returned 1 exit status
nbproject/Makefile-Release.mk:65: recipe for target 'IOTestBuild' failed
make[2]: *** [IOTestBuild] Error 1
make[2]: Leaving directory '/home/pi/.netbeans/remote/192.168.1.99/desktop-g6lev01-Windows-x86_64/E/Work/RasberryPi/Code/Raspberrypi_Test'
nbproject/Makefile-Release.mk:62: recipe for target '.build-conf' failed
make[1]: *** [.build-conf] Error 2
make[1]: Leaving directory '/home/pi/.netbeans/remote/192.168.1.99/desktop-g6lev01-Windows-x86_64/E/Work/RasberryPi/Code/Raspberrypi_Test'
nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed
make: *** [.build-impl] Error 2
BUILD FAILED (exit value 2, total time: 701ms)
Any ideas?
I'm sure I just need to point the linker to the appropriate libs but I've no idea how to specify that relative path when using a build host.
Regards
Guy

Errors Compiling OpenCV on Debian

I installed OpenCV from the repos on my Debian Wheezy (64bits). I was able to compile the source file of an example but when it goes to the build step this happens:
g++ -o dist/Debug/GNU-Linux-x86/opencvtestapp build/Debug/GNU-Linux-x86/main.o
build/Debug/GNU-Linux-x86/main.o: In function `main':
/home/ ... /main.cpp:9: undefined reference to `cv::VideoCapture::VideoCapture(int)'
/home/ ... /main.cpp:11: undefined reference to `cv::VideoCapture::isOpened() const'
/home/ ... /main.cpp:16: undefined reference to `cv::VideoCapture::get(int)'
/home/ ... /main.cpp:17: undefined reference to `cv::VideoCapture::get(int)'
/home/ ... /main.cpp:21: undefined reference to `cv::namedWindow(std::string const&, int)'
/home/ ... /main.cpp:26: undefined reference to `cv::VideoCapture::read(cv::Mat&)'
/home/ ... /main.cpp:33: undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&)'
/home/ ... /main.cpp:33: undefined reference to `cv::imshow(std::string const&, cv::_InputArray const&)'
/home/ ... /main.cpp:35: undefined reference to `cv::waitKey(int)'
/home/ ... /main.cpp:40: undefined reference to `cv::VideoCapture::~VideoCapture()'
/home/ ... /main.cpp:40: undefined reference to `cv::VideoCapture::~VideoCapture()'
build/Debug/GNU-Linux-x86/main.o: In function `cv::Mat::~Mat()':
/usr/include/opencv2/core/mat.hpp:297: undefined reference to `cv::fastFree(void*)'
build/Debug/GNU-Linux-x86/main.o: In function `cv::Mat::release()':
/usr/include/opencv2/core/mat.hpp:382: undefined reference to `cv::Mat::deallocate()'
collect2: error: ld returned 1 exit status
make[2]: *** [dist/Debug/GNU-Linux-x86/opencvtestapp] Error 1
make[2]: Leaving directory `/home/work/OpenCVTestApp'
make[1]: *** [.build-conf] Error 2
make[1]: Leaving directory `/home/work/OpenCVTestApp'
make: *** [.build-impl] Error 2
I am using NetBeans 8.0 and OpenCV2.3 (from the repo).
Any suggestions on what I could be missing?
Thanks!
#berak is totally right on his comment, for that was the problem.
I forgot to add the libraries to the linker configuration. :P
As for 2.3 in 2014: I agree. I am planning to use 3.o alpha but this is what the repo had and I didn't want to compile the whole thing just to run some samples.
Thank you #berac! I hope the question is still useful for someone out there.

synergy won't compile -- undefined reference to `pthread_xxxx

When following the build instructions for Synergy, I get the following errors.
Is there an already-developed solution to get Synergy to build?
If not, how do I get Synergy to compile on Ubuntu 13.10?
../../../../../lib/libarch.a(CArchMultithreadPosix.o): In function `CArchMultithreadPosix::newMutex()':
CArchMultithreadPosix.cpp:(.text+0x319): undefined reference to `pthread_mutexattr_init'
../../../../../lib/libarch.a(CArchMultithreadPosix.o): In function `CArchMultithreadPosix::raiseSignal(IArchMultithread::ESignal)':
CArchMultithreadPosix.cpp:(.text+0x43b): undefined reference to `pthread_kill'
../../../../../lib/libarch.a(CArchMultithreadPosix.o): In function `CArchMultithreadPosix::threadSignalHandler(void*)':
CArchMultithreadPosix.cpp:(.text+0x490): undefined reference to `pthread_detach'
../../../../../lib/libarch.a(CArchMultithreadPosix.o): In function `CArchMultithreadPosix::closeThread(CArchThreadImpl*)':
CArchMultithreadPosix.cpp:(.text+0x62b): undefined reference to `pthread_detach'
../../../../../lib/libarch.a(CArchMultithreadPosix.o): In function `CArchMultithreadPosix::newThread(void* (*)(void*), void*)':
CArchMultithreadPosix.cpp:(.text+0x8e6): undefined reference to `pthread_sigmask'
CArchMultithreadPosix.cpp:(.text+0x90f): undefined reference to `pthread_sigmask'
CArchMultithreadPosix.cpp:(.text+0x935): undefined reference to `pthread_create'
CArchMultithreadPosix.cpp:(.text+0x9a4): undefined reference to `pthread_create'
../../../../../lib/libarch.a(CArchMultithreadPosix.o): In function `CArchMultithreadPosix::CArchMultithreadPosix()':
CArchMultithreadPosix.cpp:(.text+0xe11): undefined reference to `pthread_mutexattr_init'
CArchMultithreadPosix.cpp:(.text+0xf05): undefined reference to `pthread_sigmask'
CArchMultithreadPosix.cpp:(.text+0xf26): undefined reference to `pthread_sigmask'
../../../../../lib/libarch.a(CArchMultithreadPosix.o): In function `CArchMultithreadPosix::startSignalHandler()':
CArchMultithreadPosix.cpp:(.text+0x10a8): undefined reference to `pthread_sigmask'
CArchMultithreadPosix.cpp:(.text+0x10cd): undefined reference to `pthread_sigmask'
CArchMultithreadPosix.cpp:(.text+0x1104): undefined reference to `pthread_create'
../../../../../lib/libarch.a(CArchMultithreadPosix.o): In function `CArchMultithreadPosix::cancelThread(CArchThreadImpl*)':
CArchMultithreadPosix.cpp:(.text+0x5e3): undefined reference to `pthread_kill'
collect2: error: ld returned 1 exit status
make[2]: *** [../../bin/synergyd] Error 1
make[1]: *** [src/cmd/synergyd/CMakeFiles/synergyd.dir/all] Error 2
make: *** [all] Error 2
Going back to: /usr/local/src/synergy-1.4.15-Source
Error: make failed: 512
SOLUTION: manually change the order of the contents of /synergy-1.4.15-Source/src/cmd/synergyd/CMakeFiles/synergyd.dir/link.txt to put -lpthread contents last.
You'd rather edit the CMakelists.txt file to add pthread at the end of the target_link_libraries command.
You may also add link_libraries(pthread).