I'm trying to create simple lib for the R with statically linked boost.
CMakeLists.txt
cmake_minimum_required(VERSION 3.3)
project(TheRPath)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Werror")
set(Boost_USE_STATIC_LIBS ON)
find_package(Boost 1.50.0 REQUIRED COMPONENTS filesystem)
include_directories(${Boost_INCLUDE_DIRS})
include_directories("/usr/share/R/include")
set(SOURCE_FILES Path.cpp Path.h)
add_library(therpath SHARED ${SOURCE_FILES})
target_link_libraries(therpath ${Boost_LIBRARIES})
Interpreter gives me an error when I'm trying to load shared object.
> dyn.load("libtherpath.so")
Error in dyn.load("libtherpath.so") :
unable to load shared object 'libtherpath.so':
libtherpath.so: undefined symbol: _ZN5boost6system15system_categoryEv
I have the following code:
Path.h
#ifndef PATH_H
#define PATH_H
#include <Rinternals.h>
extern "C" SEXP foo(SEXP snapshotPath);
#endif // PATH_H
Path.cpp
#include <string>
#include <boost/filesystem.hpp>
#include "Path.h"
extern "C" SEXP foo(SEXP snapshotPath) {
std::string path(R_CHAR(STRING_ELT(snapshotPath, 0)));
std::cerr << path << boost::filesystem::path::preferred_separator << "file.txt" << std::endl;
return R_NilValue;
}
Could you tell me what I'm doing wrong?
UPD 1
Output of make VERBOSE=1:
/home/user/Soft/clion-latest/bin/cmake/bin/cmake -H/home/user/Workspace/TheRPath -B/home/user/.CLion12/system/cmake/generated/a69e8583/a69e8583/Debug --check-build-system CMakeFiles/Makefile.cmake 0
/home/user/Soft/clion-latest/bin/cmake/bin/cmake -E cmake_progress_start /home/user/.CLion12/system/cmake/generated/a69e8583/a69e8583/Debug/CMakeFiles /home/user/.CLion12/system/cmake/generated/a69e8583/a69e8583/Debug/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make[1]: Entering directory `/home/user/.CLion12/system/cmake/generated/a69e8583/a69e8583/Debug'
make -f CMakeFiles/therpath.dir/build.make CMakeFiles/therpath.dir/depend
make[2]: Entering directory `/home/user/.CLion12/system/cmake/generated/a69e8583/a69e8583/Debug'
cd /home/user/.CLion12/system/cmake/generated/a69e8583/a69e8583/Debug && /home/user/Soft/clion-latest/bin/cmake/bin/cmake -E cmake_depends "Unix Makefiles" /home/user/Workspace/TheRPath /home/user/Workspace/TheRPath /home/user/.CLion12/system/cmake/generated/a69e8583/a69e8583/Debug /home/user/.CLion12/system/cmake/generated/a69e8583/a69e8583/Debug /home/user/.CLion12/system/cmake/generated/a69e8583/a69e8583/Debug/CMakeFiles/therpath.dir/DependInfo.cmake --color=
make[2]: Leaving directory `/home/user/.CLion12/system/cmake/generated/a69e8583/a69e8583/Debug'
make -f CMakeFiles/therpath.dir/build.make CMakeFiles/therpath.dir/build
make[2]: Entering directory `/home/user/.CLion12/system/cmake/generated/a69e8583/a69e8583/Debug'
[ 50%] Building CXX object CMakeFiles/therpath.dir/Path.cpp.o
/usr/bin/c++ -Dtherpath_EXPORTS -std=c++11 -Wall -Werror -g -fPIC -I/usr/share/R/include -o CMakeFiles/therpath.dir/Path.cpp.o -c /home/user/Workspace/TheRPath/Path.cpp
[100%] Linking CXX shared library libtherpath.so
/home/user/Soft/clion-latest/bin/cmake/bin/cmake -E cmake_link_script CMakeFiles/therpath.dir/link.txt --verbose=1
/usr/bin/c++ -fPIC -std=c++11 -Wall -Werror -g -shared -Wl,-soname,libtherpath.so -o libtherpath.so CMakeFiles/therpath.dir/Path.cpp.o /usr/lib/x86_64-linux-gnu/libboost_filesystem.a
make[2]: Leaving directory `/home/user/.CLion12/system/cmake/generated/a69e8583/a69e8583/Debug'
[100%] Built target therpath
make[1]: Leaving directory `/home/user/.CLion12/system/cmake/generated/a69e8583/a69e8583/Debug'
/home/user/Soft/clion-latest/bin/cmake/bin/cmake -E cmake_progress_start /home/user/.CLion12/system/cmake/generated/a69e8583/a69e8583/Debug/CMakeFiles 0
UPD 2
/home/user/Soft/clion-latest/bin/cmake/bin/cmake -H/home/user/Workspace/TheRPath -B/home/user/.CLion12/system/cmake/generated/a69e8583/a69e8583/Debug --check-build-system CMakeFiles/Makefile.cmake 0
/home/user/Soft/clion-latest/bin/cmake/bin/cmake -E cmake_progress_start /home/user/.CLion12/system/cmake/generated/a69e8583/a69e8583/Debug/CMakeFiles /home/user/.CLion12/system/cmake/generated/a69e8583/a69e8583/Debug/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make[1]: Entering directory `/home/user/.CLion12/system/cmake/generated/a69e8583/a69e8583/Debug'
make -f CMakeFiles/therpath.dir/build.make CMakeFiles/therpath.dir/depend
make[2]: Entering directory `/home/user/.CLion12/system/cmake/generated/a69e8583/a69e8583/Debug'
cd /home/user/.CLion12/system/cmake/generated/a69e8583/a69e8583/Debug && /home/user/Soft/clion-latest/bin/cmake/bin/cmake -E cmake_depends "Unix Makefiles" /home/user/Workspace/TheRPath /home/user/Workspace/TheRPath /home/user/.CLion12/system/cmake/generated/a69e8583/a69e8583/Debug /home/user/.CLion12/system/cmake/generated/a69e8583/a69e8583/Debug /home/user/.CLion12/system/cmake/generated/a69e8583/a69e8583/Debug/CMakeFiles/therpath.dir/DependInfo.cmake --color=
make[2]: Leaving directory `/home/user/.CLion12/system/cmake/generated/a69e8583/a69e8583/Debug'
make -f CMakeFiles/therpath.dir/build.make CMakeFiles/therpath.dir/build
make[2]: Entering directory `/home/user/.CLion12/system/cmake/generated/a69e8583/a69e8583/Debug'
[ 50%] Building CXX object CMakeFiles/therpath.dir/Path.cpp.o
/usr/bin/c++ -Dtherpath_EXPORTS -std=c++11 -Wall -Werror -g -fPIC -I/usr/share/R/include -o CMakeFiles/therpath.dir/Path.cpp.o -c /home/user/Workspace/TheRPath/Path.cpp
[100%] Linking CXX shared library libtherpath.so
/home/user/Soft/clion-latest/bin/cmake/bin/cmake -E cmake_link_script CMakeFiles/therpath.dir/link.txt --verbose=1
/usr/bin/c++ -fPIC -std=c++11 -Wall -Werror -g -shared -Wl,-soname,libtherpath.so -o libtherpath.so CMakeFiles/therpath.dir/Path.cpp.o /usr/lib/x86_64-linux-gnu/libboost_system.a /usr/lib/x86_64-linux-gnu/libboost_filesystem.a
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libboost_system.a(error_code.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/lib/x86_64-linux-gnu/libboost_system.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
make[2]: *** [libtherpath.so] Error 1
make[2]: Leaving directory `/home/user/.CLion12/system/cmake/generated/a69e8583/a69e8583/Debug'
make[1]: *** [CMakeFiles/therpath.dir/all] Error 2
make[1]: Leaving directory `/home/user/.CLion12/system/cmake/generated/a69e8583/a69e8583/Debug'
make: *** [all] Error 2
libboost_filesystem depends on libboost_system. You need to add it to your CMakeLists.txt:
find_package(Boost REQUIRED COMPONENTS filesystem system)
Note I omitted the optional Boost version number, because you probably don't really need or want to specify it. But you can if you feel compelled.
Related
I have made this minimal project to reproduce my link problem using mingw32 in wine32:
CMakeLists.txt
cmake_minimum_required(VERSION 3.13)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
project("tst" VERSION 1.1.0)
add_executable("tst" "main.cpp")
add_library("resource" "text.o")
set_target_properties("resource" PROPERTIES LINKER_LANGUAGE CXX)
add_custom_command(OUTPUT "text.o"
MAIN_DEPENDENCY "text"
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/text" "text"
COMMAND ${CMAKE_LINKER} -r -b binary "text" -o "text.o"
)
set_source_files_properties("text" PROPERTIES GENERATED true EXTERNAL_OBJECT true)
target_link_libraries("tst" "resource")
main.cpp
#include <iostream>
#include <string>
extern char _binary_text_start[];
extern char _binary_text_end[];
int main()
{
std::string text{ _binary_text_start, _binary_text_end };
std::cout << text << std::endl;
}
text
Hello, World!
This project builds and runs using mingw-w64 on Linux; however, when I try to build the project in wine32, I got this output:
Z:\cmake-3.19.1-win32-x86\bin\cmake.exe -SZ:\var\cache\deploy\cpp -BZ:\var\cache\deploy\cpp\build\windows --check-build-system CMakeFiles\Makefile.cmake 0
Z:\cmake-3.19.1-win32-x86\bin\cmake.exe -E cmake_progress_start Z:\var\cache\deploy\cpp\build\windows\CMakeFiles Z:\var\cache\deploy\cpp\build\windows\\CMakeFiles\progress.marks
mingw32-make -f CMakeFiles\Makefile2 all
mingw32-make[1]: Entering directory `Z:/var/cache/deploy/cpp/build/windows'
mingw32-make -f CMakeFiles\resource.dir\build.make CMakeFiles/resource.dir/depend
mingw32-make[2]: Entering directory `Z:/var/cache/deploy/cpp/build/windows'
[ 25%] Generating text.o
Z:\cmake-3.19.1-win32-x86\bin\cmake.exe -E copy Z:/var/cache/deploy/cpp/text text
Z:\mingw32\bin\ld.exe -r -b binary text -o text.o
Z:\cmake-3.19.1-win32-x86\bin\cmake.exe -E cmake_depends "MinGW Makefiles" Z:\var\cache\deploy\cpp Z:\var\cache\deploy\cpp Z:\var\cache\deploy\cpp\build\windows Z:\var\cache\deploy\cpp\build\windows Z:\var\cache\deploy\cpp\build\windows\CMakeFiles\resource.dir\DependInfo.cmake --color=
mingw32-make[2]: Leaving directory `Z:/var/cache/deploy/cpp/build/windows'
mingw32-make -f CMakeFiles\resource.dir\build.make CMakeFiles/resource.dir/build
mingw32-make[2]: Entering directory `Z:/var/cache/deploy/cpp/build/windows'
[ 50%] Linking CXX static library libresource.a
Z:\cmake-3.19.1-win32-x86\bin\cmake.exe -P CMakeFiles\resource.dir\cmake_clean_target.cmake
Z:\cmake-3.19.1-win32-x86\bin\cmake.exe -E cmake_link_script CMakeFiles\resource.dir\link.txt --verbose=1
Z:\mingw32\bin\ar.exe qc libresource.a text.o
Z:\mingw32\bin\ranlib.exe libresource.a
mingw32-make[2]: Leaving directory `Z:/var/cache/deploy/cpp/build/windows'
[ 50%] Built target resource
mingw32-make -f CMakeFiles\tst.dir\build.make CMakeFiles/tst.dir/depend
mingw32-make[2]: Entering directory `Z:/var/cache/deploy/cpp/build/windows'
Z:\cmake-3.19.1-win32-x86\bin\cmake.exe -E cmake_depends "MinGW Makefiles" Z:\var\cache\deploy\cpp Z:\var\cache\deploy\cpp Z:\var\cache\deploy\cpp\build\windows Z:\var\cache\deploy\cpp\build\windows Z:\var\cache\deploy\cpp\build\windows\CMakeFiles\tst.dir\DependInfo.cmake --color=
mingw32-make[2]: Leaving directory `Z:/var/cache/deploy/cpp/build/windows'
mingw32-make -f CMakeFiles\tst.dir\build.make CMakeFiles/tst.dir/build
mingw32-make[2]: Entering directory `Z:/var/cache/deploy/cpp/build/windows'
[ 75%] Building CXX object CMakeFiles/tst.dir/main.cpp.obj
Z:\mingw32\bin\g++.exe -O3 -DNDEBUG -o CMakeFiles\tst.dir\main.cpp.obj -c Z:\var\cache\deploy\cpp\main.cpp
[100%] Linking CXX executable tst.exe
Z:\cmake-3.19.1-win32-x86\bin\cmake.exe -E cmake_link_script CMakeFiles\tst.dir\link.txt --verbose=1
Z:\cmake-3.19.1-win32-x86\bin\cmake.exe -E rm -f CMakeFiles\tst.dir/objects.a
Z:\mingw32\bin\ar.exe cr CMakeFiles\tst.dir/objects.a #CMakeFiles\tst.dir\objects1.rsp
Z:\mingw32\bin\g++.exe -O3 -DNDEBUG -Wl,--whole-archive CMakeFiles\tst.dir/objects.a -Wl,--no-whole-archive -o tst.exe -Wl,--out-implib,libtst.dll.a -Wl,--major-image-version,0,--minor-image-version,0 #CMakeFiles\tst.dir\linklibs.rsp
z:/mingw32/bin/../lib/gcc/i686-w64-mingw32/10.2.0/../../../../i686-w64-mingw32/bin/ld.exe: CMakeFiles\tst.dir/objects.a(main.cpp.obj):main.cpp:(.text.startup+0x43): undefined reference to `_binary_text_end'
z:/mingw32/bin/../lib/gcc/i686-w64-mingw32/10.2.0/../../../../i686-w64-mingw32/bin/ld.exe: CMakeFiles\tst.dir/objects.a(main.cpp.obj):main.cpp:(.text.startup+0x48): undefined reference to `_binary_text_start'
z:/mingw32/bin/../lib/gcc/i686-w64-mingw32/10.2.0/../../../../i686-w64-mingw32/bin/ld.exe: CMakeFiles\tst.dir/objects.a(main.cpp.obj):main.cpp:(.text.startup+0x68): undefined reference to `_binary_text_start'
z:/mingw32/bin/../lib/gcc/i686-w64-mingw32/10.2.0/../../../../i686-w64-mingw32/bin/ld.exe: CMakeFiles\tst.dir/objects.a(main.cpp.obj):main.cpp:(.text.startup+0x16f): undefined reference to `_binary_text_start'
collect2.exe: error: ld returned 1 exit status
mingw32-make[2]: *** [tst.exe] Error 1
mingw32-make[2]: Leaving directory `Z:/var/cache/deploy/cpp/build/windows'
mingw32-make[1]: *** [CMakeFiles/tst.dir/all] Error 2
mingw32-make[1]: Leaving directory `Z:/var/cache/deploy/cpp/build/windows'
mingw32-make: *** [all] Error 2
nm libresource.a
text.o:
0000000d D _binary_text_end
0000000d A _binary_text_size
00000000 D _binary_text_start
objdump -f libresource.a
In archive libresource.a:
text.o: file format pe-i386
architecture: i386, flags 0x00000038:
HAS_DEBUG, HAS_SYMS, HAS_LOCALS
start address 0x00000000
cmake: https://github.com/Kitware/CMake/releases/download/v3.19.1/cmake-3.19.1-win32-x86.zip
mingw: https://pilotfiber.dl.sourceforge.net/project/mingw-w64/Toolchains%20targetting%20Win32/Personal%20Builds/ray_linn/GCC-10.x-with-ada/mingw32-10.2.0-crt-8.0.0-with-ada.7z
mingw-make: https://phoenixnap.dl.sourceforge.net/project/mingw/MinGW/Extension/make/mingw32-make-3.80-3/mingw32-make-3.80.0-3.tar.gz
What would be the general algorithm I should follow to debug issues such as this one?
23:28:12: Running steps for project jumper-qt...
23:28:12: Starting: "/usr/bin/cmake" --build . --target all
/usr/bin/cmake -S/home/skrat/Workspace/jumper-qt -B/home/skrat/Workspace/jumper-qt/build/Debug --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /home/skrat/Workspace/jumper-qt/build/Debug/CMakeFiles /home/skrat/Workspace/jumper-qt/build/Debug/CMakeFiles/progress.marks
/usr/bin/make -f CMakeFiles/Makefile2 all
make[1]: Entering directory '/home/skrat/Workspace/jumper-qt/build/Debug'
/usr/bin/make -f src/CMakeFiles/jumper-qt_autogen.dir/build.make src/CMakeFiles/jumper-qt_autogen.dir/depend
make[2]: Entering directory '/home/skrat/Workspace/jumper-qt/build/Debug'
cd /home/skrat/Workspace/jumper-qt/build/Debug && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/skrat/Workspace/jumper-qt /home/skrat/Workspace/jumper-qt/src /home/skrat/Workspace/jumper-qt/build/Debug /home/skrat/Workspace/jumper-qt/build/Debug/src /home/skrat/Workspace/jumper-qt/build/Debug/src/CMakeFiles/jumper-qt_autogen.dir/DependInfo.cmake --color=
make[2]: Leaving directory '/home/skrat/Workspace/jumper-qt/build/Debug'
/usr/bin/make -f src/CMakeFiles/jumper-qt_autogen.dir/build.make src/CMakeFiles/jumper-qt_autogen.dir/build
make[2]: Entering directory '/home/skrat/Workspace/jumper-qt/build/Debug'
[ 14%] Automatic MOC and UIC for target jumper-qt
cd /home/skrat/Workspace/jumper-qt/build/Debug/src && /usr/bin/cmake -E cmake_autogen /home/skrat/Workspace/jumper-qt/build/Debug/src/CMakeFiles/jumper-qt_autogen.dir/AutogenInfo.json Debug
make[2]: Leaving directory '/home/skrat/Workspace/jumper-qt/build/Debug'
[ 14%] Built target jumper-qt_autogen
/usr/bin/make -f src/CMakeFiles/jumper-qt.dir/build.make src/CMakeFiles/jumper-qt.dir/depend
make[2]: Entering directory '/home/skrat/Workspace/jumper-qt/build/Debug'
cd /home/skrat/Workspace/jumper-qt/build/Debug && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/skrat/Workspace/jumper-qt /home/skrat/Workspace/jumper-qt/src /home/skrat/Workspace/jumper-qt/build/Debug /home/skrat/Workspace/jumper-qt/build/Debug/src /home/skrat/Workspace/jumper-qt/build/Debug/src/CMakeFiles/jumper-qt.dir/DependInfo.cmake --color=
make[2]: Leaving directory '/home/skrat/Workspace/jumper-qt/build/Debug'
/usr/bin/make -f src/CMakeFiles/jumper-qt.dir/build.make src/CMakeFiles/jumper-qt.dir/build
make[2]: Entering directory '/home/skrat/Workspace/jumper-qt/build/Debug'
[ 28%] Building CXX object src/CMakeFiles/jumper-qt.dir/magnum_item.cpp.o
cd /home/skrat/Workspace/jumper-qt/build/Debug/src && /usr/bin/g++ -DCORRADE_IS_DEBUG_BUILD -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_QMLMODELS_LIB -DQT_QML_DEBUG -DQT_QML_LIB -DQT_QUICK_LIB -I/home/skrat/Workspace/jumper-qt/build/Debug/src -I/home/skrat/Workspace/jumper-qt/src -I/home/skrat/Workspace/jumper-qt/build/Debug/src/jumper-qt_autogen/include -isystem /usr/include/MagnumExternal/OpenGL -isystem /usr/include/qt -isystem /usr/include/qt/QtCore -isystem /usr/lib/qt/mkspecs/linux-g++ -isystem /usr/include/qt/QtQuick -isystem /usr/include/qt/QtQmlModels -isystem /usr/include/qt/QtQml -isystem /usr/include/qt/QtNetwork -isystem /usr/include/qt/QtGui -DQT_QML_DEBUG -g -DQT_QML_DEBUG -Wall -Wextra -Wold-style-cast -Winit-self -Werror=return-type -Wmissing-declarations -Wpedantic -fvisibility=hidden -fvisibility-inlines-hidden -Wzero-as-null-pointer-constant -Wdouble-promotion -fPIC -std=gnu++14 -o CMakeFiles/jumper-qt.dir/magnum_item.cpp.o -c /home/skrat/Workspace/jumper-qt/src/magnum_item.cpp
In file included from /home/skrat/Workspace/jumper-qt/src/magnum_item.cpp:4:
/usr/include/Magnum/GL/Renderer.h: In static member function ‘static void Magnum::GL::Renderer::flush()’:
/usr/include/Magnum/GL/Renderer.h:1838:31: error: ‘glFlush’ was not declared in this scope; did you mean ‘flush’?
1838 | static void flush() { glFlush(); }
| ^~~~~~~
| flush
/usr/include/Magnum/GL/Renderer.h: In static member function ‘static void Magnum::GL::Renderer::finish()’:
/usr/include/Magnum/GL/Renderer.h:1846:32: error: ‘glFinish’ was not declared in this scope; did you mean ‘finish’?
1846 | static void finish() { glFinish(); }
| ^~~~~~~~
| finish
In file included from /home/skrat/Workspace/jumper-qt/src/magnum_item.cpp:4:
/usr/include/Magnum/GL/Renderer.h: In static member function ‘static Magnum::GL::Renderer::Error Magnum::GL::Renderer::error()’:
/usr/include/Magnum/GL/Renderer.h:2053:58: error: ‘glGetError’ was not declared in this scope
2053 | static Error error() { return static_cast<Error>(glGetError()); }
| ^~~~~~~~~~
make[2]: *** [src/CMakeFiles/jumper-qt.dir/build.make:122: src/CMakeFiles/jumper-qt.dir/magnum_item.cpp.o] Error 1
make[2]: Leaving directory '/home/skrat/Workspace/jumper-qt/build/Debug'
make[1]: Leaving directory '/home/skrat/Workspace/jumper-qt/build/Debug'
make[1]: *** [CMakeFiles/Makefile2:118: src/CMakeFiles/jumper-qt.dir/all] Error 2
make: *** [Makefile:107: all] Error 2
23:28:15: The process "/usr/bin/cmake" exited with code 2.
Error while building/deploying project jumper-qt (kit: Desktop)
When executing step "CMake Build"
23:28:15: Elapsed time: 00:04.
The example project use both Qt (Quick 2) and Magnum, both of these libraries make extensive use of OpenGL. When I start example projects for them separately, they both work well and build with no error. When I try to marry them, it falls a part.
So what would be a procedure to follow in this case? How do I find out out why these (glFlush) declarations are missing? I tried adding find_package(OpenGL.... to my project, with no success. I'm interested in the process of finding out what's the problem, not in a solution to this particular problem.
Thank you SO
UPDATE: CMake files here https://gist.github.com/skrat/c5b20d6753e6476a4a0d60227cb73cda
Before including Magnum, I had the same project, where I included find_package(OpenGL... and was able to use raw OpenGL calls successfully. In a separate Magnum only project, I don't have to find package OpenGL and all is fine, I assume Magnum's CMake files do the hard work.
Also this might be relevant https://github.com/mosra/magnum-bootstrap/blob/base-qt/modules/FindMagnum.cmake
I'm compiling a CUDA program, which seems confused (Or, perhaps I'm confused) about the namespaces used by cmath and math. When I run make, I get the following output:
innovationcommons#IC-VR1:~/PackageDownloads/warp-ctc/build$ make VERBOSE=1
/usr/bin/cmake -H/home/innovationcommons/PackageDownloads/warp-ctc -B/home/innovationcommons/PackageDownloads/warp-ctc/build --check-build-system CMakeFiles/Makefile.cmake 0
Re-run cmake file: Makefile older than: CMakeFiles/test_gpu.dir/tests/test_gpu_generated_test_gpu.cu.o.depend
-- cuda found TRUE
CMake Warning at CMakeLists.txt:48 (FIND_PACKAGE):
By not providing "FindTorch.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Torch", but
CMake did not find one.
Could not find a package configuration file provided by "Torch" with any of
the following names:
TorchConfig.cmake
torch-config.cmake
Add the installation prefix of "Torch" to CMAKE_PREFIX_PATH or set
"Torch_DIR" to a directory containing one of the above files. If "Torch"
provides a separate development package or SDK, be sure it has been
installed.
-- Torch found Torch_DIR-NOTFOUND
-- Building shared library with GPU support
-- Configuring done
-- Generating done
-- Build files have been written to: /home/innovationcommons/PackageDownloads/warp-ctc/build
/usr/bin/cmake -E cmake_progress_start /home/innovationcommons/PackageDownloads/warp-ctc/build/CMakeFiles /home/innovationcommons/PackageDownloads/warp-ctc/build/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make[1]: Entering directory '/home/innovationcommons/PackageDownloads/warp-ctc/build'
make -f CMakeFiles/warpctc.dir/build.make CMakeFiles/warpctc.dir/depend
make[2]: Entering directory '/home/innovationcommons/PackageDownloads/warp-ctc/build'
cd /home/innovationcommons/PackageDownloads/warp-ctc/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/innovationcommons/PackageDownloads/warp-ctc /home/innovationcommons/PackageDownloads/warp-ctc /home/innovationcommons/PackageDownloads/warp-ctc/build /home/innovationcommons/PackageDownloads/warp-ctc/build /home/innovationcommons/PackageDownloads/warp-ctc/build/CMakeFiles/warpctc.dir/DependInfo.cmake --color=
make[2]: Leaving directory '/home/innovationcommons/PackageDownloads/warp-ctc/build'
make -f CMakeFiles/warpctc.dir/build.make CMakeFiles/warpctc.dir/build
make[2]: Entering directory '/home/innovationcommons/PackageDownloads/warp-ctc/build'
make[2]: Nothing to be done for 'CMakeFiles/warpctc.dir/build'.
make[2]: Leaving directory '/home/innovationcommons/PackageDownloads/warp-ctc/build'
[ 42%] Built target warpctc
make -f CMakeFiles/test_cpu.dir/build.make CMakeFiles/test_cpu.dir/depend
make[2]: Entering directory '/home/innovationcommons/PackageDownloads/warp-ctc/build'
cd /home/innovationcommons/PackageDownloads/warp-ctc/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/innovationcommons/PackageDownloads/warp-ctc /home/innovationcommons/PackageDownloads/warp-ctc /home/innovationcommons/PackageDownloads/warp-ctc/build /home/innovationcommons/PackageDownloads/warp-ctc/build /home/innovationcommons/PackageDownloads/warp-ctc/build/CMakeFiles/test_cpu.dir/DependInfo.cmake --color=
make[2]: Leaving directory '/home/innovationcommons/PackageDownloads/warp-ctc/build'
make -f CMakeFiles/test_cpu.dir/build.make CMakeFiles/test_cpu.dir/build
make[2]: Entering directory '/home/innovationcommons/PackageDownloads/warp-ctc/build'
make[2]: Nothing to be done for 'CMakeFiles/test_cpu.dir/build'.
make[2]: Leaving directory '/home/innovationcommons/PackageDownloads/warp-ctc/build'
[ 71%] Built target test_cpu
make -f CMakeFiles/test_gpu.dir/build.make CMakeFiles/test_gpu.dir/depend
make[2]: Entering directory '/home/innovationcommons/PackageDownloads/warp-ctc/build'
[ 85%] Building NVCC (Device) object CMakeFiles/test_gpu.dir/tests/test_gpu_generated_test_gpu.cu.o
cd /home/innovationcommons/PackageDownloads/warp-ctc/build/CMakeFiles/test_gpu.dir/tests && /usr/bin/cmake -E make_directory /home/innovationcommons/PackageDownloads/warp-ctc/build/CMakeFiles/test_gpu.dir/tests/.
cd /home/innovationcommons/PackageDownloads/warp-ctc/build/CMakeFiles/test_gpu.dir/tests && /usr/bin/cmake -D verbose:BOOL=1 -D build_configuration:STRING= -D generated_file:STRING=/home/innovationcommons/PackageDownloads/warp-ctc/build/CMakeFiles/test_gpu.dir/tests/./test_gpu_generated_test_gpu.cu.o -D generated_cubin_file:STRING=/home/innovationcommons/PackageDownloads/warp-ctc/build/CMakeFiles/test_gpu.dir/tests/./test_gpu_generated_test_gpu.cu.o.cubin.txt -P /home/innovationcommons/PackageDownloads/warp-ctc/build/CMakeFiles/test_gpu.dir/tests/test_gpu_generated_test_gpu.cu.o.cmake
-- Removing /home/innovationcommons/PackageDownloads/warp-ctc/build/CMakeFiles/test_gpu.dir/tests/./test_gpu_generated_test_gpu.cu.o
/usr/bin/cmake -E remove /home/innovationcommons/PackageDownloads/warp-ctc/build/CMakeFiles/test_gpu.dir/tests/./test_gpu_generated_test_gpu.cu.o
-- Generating dependency file: /home/innovationcommons/PackageDownloads/warp-ctc/build/CMakeFiles/test_gpu.dir/tests/test_gpu_generated_test_gpu.cu.o.NVCC-depend
/usr/local/cuda-9.0/bin/nvcc -M -D__CUDACC__ /home/innovationcommons/PackageDownloads/warp-ctc/tests/test_gpu.cu -o /home/innovationcommons/PackageDownloads/warp-ctc/build/CMakeFiles/test_gpu.dir/tests/test_gpu_generated_test_gpu.cu.o.NVCC-depend -ccbin /usr/bin/cc -m64 -Xcompiler ,\"-fopenmp\",\"-O2\",\"-g\" -gencode arch=compute_30,code=sm_30 -O2 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_52,code=sm_52 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_61,code=sm_61 -gencode arch=compute_62,code=sm_62 --std=c++11 -Xcompiler -fopenmp -DNVCC -I/usr/local/cuda-9.0/include -I/home/innovationcommons/PackageDownloads/warp-ctc/include
-- Generating temporary cmake readable file: /home/innovationcommons/PackageDownloads/warp-ctc/build/CMakeFiles/test_gpu.dir/tests/test_gpu_generated_test_gpu.cu.o.depend.tmp
/usr/bin/cmake -D input_file:FILEPATH=/home/innovationcommons/PackageDownloads/warp-ctc/build/CMakeFiles/test_gpu.dir/tests/test_gpu_generated_test_gpu.cu.o.NVCC-depend -D output_file:FILEPATH=/home/innovationcommons/PackageDownloads/warp-ctc/build/CMakeFiles/test_gpu.dir/tests/test_gpu_generated_test_gpu.cu.o.depend.tmp -D verbose=1 -P /usr/share/cmake-3.9/Modules/FindCUDA/make2cmake.cmake
-- Copy if different /home/innovationcommons/PackageDownloads/warp-ctc/build/CMakeFiles/test_gpu.dir/tests/test_gpu_generated_test_gpu.cu.o.depend.tmp to /home/innovationcommons/PackageDownloads/warp-ctc/build/CMakeFiles/test_gpu.dir/tests/test_gpu_generated_test_gpu.cu.o.depend
/usr/bin/cmake -E copy_if_different /home/innovationcommons/PackageDownloads/warp-ctc/build/CMakeFiles/test_gpu.dir/tests/test_gpu_generated_test_gpu.cu.o.depend.tmp /home/innovationcommons/PackageDownloads/warp-ctc/build/CMakeFiles/test_gpu.dir/tests/test_gpu_generated_test_gpu.cu.o.depend
-- Removing /home/innovationcommons/PackageDownloads/warp-ctc/build/CMakeFiles/test_gpu.dir/tests/test_gpu_generated_test_gpu.cu.o.depend.tmp and /home/innovationcommons/PackageDownloads/warp-ctc/build/CMakeFiles/test_gpu.dir/tests/test_gpu_generated_test_gpu.cu.o.NVCC-depend
/usr/bin/cmake -E remove /home/innovationcommons/PackageDownloads/warp-ctc/build/CMakeFiles/test_gpu.dir/tests/test_gpu_generated_test_gpu.cu.o.depend.tmp /home/innovationcommons/PackageDownloads/warp-ctc/build/CMakeFiles/test_gpu.dir/tests/test_gpu_generated_test_gpu.cu.o.NVCC-depend
-- Generating /home/innovationcommons/PackageDownloads/warp-ctc/build/CMakeFiles/test_gpu.dir/tests/./test_gpu_generated_test_gpu.cu.o
/usr/local/cuda-9.0/bin/nvcc /home/innovationcommons/PackageDownloads/warp-ctc/tests/test_gpu.cu -c -o /home/innovationcommons/PackageDownloads/warp-ctc/build/CMakeFiles/test_gpu.dir/tests/./test_gpu_generated_test_gpu.cu.o -ccbin /usr/bin/cc -m64 -Xcompiler ,\"-fopenmp\",\"-O2\",\"-g\" -gencode arch=compute_30,code=sm_30 -O2 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_52,code=sm_52 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_61,code=sm_61 -gencode arch=compute_62,code=sm_62 --std=c++11 -Xcompiler -fopenmp -DNVCC -I/usr/local/cuda-9.0/include -I/home/innovationcommons/PackageDownloads/warp-ctc/include
/home/innovationcommons/PackageDownloads/warp-ctc/tests/test_gpu.cu(301): error: namespace "std" has no member "isinf"
/home/innovationcommons/PackageDownloads/warp-ctc/tests/test_gpu.cu(311): error: namespace "std" has no member "isnan"
2 errors detected in the compilation of "/tmp/tmpxft_00000be9_00000000-12_test_gpu.compute_62.cpp1.ii".
-- Removing /home/innovationcommons/PackageDownloads/warp-ctc/build/CMakeFiles/test_gpu.dir/tests/./test_gpu_generated_test_gpu.cu.o
/usr/bin/cmake -E remove /home/innovationcommons/PackageDownloads/warp-ctc/build/CMakeFiles/test_gpu.dir/tests/./test_gpu_generated_test_gpu.cu.o
CMake Error at test_gpu_generated_test_gpu.cu.o.cmake:282 (message):
Error generating file
/home/innovationcommons/PackageDownloads/warp-ctc/build/CMakeFiles/test_gpu.dir/tests/./test_gpu_generated_test_gpu.cu.o
CMakeFiles/test_gpu.dir/build.make:438: recipe for target 'CMakeFiles/test_gpu.dir/tests/test_gpu_generated_test_gpu.cu.o' failed
make[2]: *** [CMakeFiles/test_gpu.dir/tests/test_gpu_generated_test_gpu.cu.o] Error 1
make[2]: Leaving directory '/home/innovationcommons/PackageDownloads/warp-ctc/build'
CMakeFiles/Makefile2:141: recipe for target 'CMakeFiles/test_gpu.dir/all' failed
make[1]: *** [CMakeFiles/test_gpu.dir/all] Error 2
make[1]: Leaving directory '/home/innovationcommons/PackageDownloads/warp-ctc/build'
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
The errors I get are that isinf and isnan don't belong to the std namespace. My understanding is that this is true if math.h is being imported, but not if cmath.h is being imported. However, I can see in the last compile line that std=c++11, and when I check test_gpu.cu, I see that cmath is being imported:
#include <cmath>
#include <random>
#include <tuple>
#include <vector>
#include <iostream>
At this point, I don't really know how to proceed. Any thoughts or suggestions would really help....
ADDENDUM: For what it's worth, here is my compiler information:
innovationcommons#IC-VR1:~/PackageDownloads/warp-ctc/build$ gcc --version
gcc (Ubuntu 4.8.5-4ubuntu6) 4.8.5
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
innovationcommons#IC-VR1:~/PackageDownloads/warp-ctc/build$ g++ --version
g++ (Ubuntu 4.8.5-4ubuntu6) 4.8.5
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
ADDENDUM 2: More information about my setup and what I'm trying to install:
Ubuntu 17.10
gcc: 4.8.5
g++: 4.8.5
CUDA Version: 9.0
nvcc version: 9.0.176
glibc version: 2.26
I am attempting to install warp-ctc from https://github.com/baidu-research/warp-ctc
I'm working on a project of drone and I'm having an issue with my Raspberry Pi 2 B. When I'm trying to install Fast - Corner Detector I get this on screen
pi#raspberrypi ~/workspace/fast/build $ make
/usr/bin/cmake -H/home/pi/workspace/fast -B/home/pi/workspace/fast/build --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /home/pi/workspace/fast/build/CMakeFiles /home/pi/workspace/fast/build/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make[1]: Entering directory '/home/pi/workspace/fast/build'
make -f CMakeFiles/fast.dir/build.make CMakeFiles/fast.dir/depend
make[2]: Entering directory '/home/pi/workspace/fast/build'
cd /home/pi/workspace/fast/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/pi/workspace/fast /home/pi/workspace/fast /home/pi/workspace/fast/build /home/pi/workspace/fast/build /home/pi/workspace/fast/build/CMakeFiles/fast.dir/DependInfo.cmake --color=
make[2]: Leaving directory '/home/pi/workspace/fast/build'
make -f CMakeFiles/fast.dir/build.make CMakeFiles/fast.dir/build
make[2]: Entering directory '/home/pi/workspace/fast/build'
/usr/bin/cmake -E cmake_progress_report /home/pi/workspace/fast/build/CMakeFiles 1
[ 20%] Building CXX object CMakeFiles/fast.dir/src/fast_10.cpp.o
/usr/bin/c++ -Dfast_EXPORTS -DTEST_DATA_DIR=\"/home/pi/workspace/fast/test/data\" -Wall -Werror -Wno-unused-variable -Wno-unused-but-set-variable -Wno-unknown-pragmas -Wall -Werror -Wno-unused-variable -Wno-unused-but-set-variable -Wno-unknown-pragmas -O3 -mmmx -msse -msse -msse2 -msse3 -mssse3 -fomit-frame-pointer -fPIC -I/home/pi/workspace/fast/include -I/home/pi/workspace/fast/src -I/usr/local/include/opencv -I/usr/local/include -o CMakeFiles/fast.dir/src/fast_10.cpp.o -c /home/pi/workspace/fast/src/fast_10.cpp
cc1plus: error: unrecognized command line option ‘-mmmx’
cc1plus: error: unrecognized command line option ‘-msse’
cc1plus: error: unrecognized command line option ‘-msse’
cc1plus: error: unrecognized command line option ‘-msse2’
cc1plus: error: unrecognized command line option ‘-msse3’
cc1plus: error: unrecognized command line option ‘-mssse3’
CMakeFiles/fast.dir/build.make:60: recipe for target 'CMakeFiles/fast.dir/src/fast_10.cpp.o' failed
make[2]: *** [CMakeFiles/fast.dir/src/fast_10.cpp.o] Error 1
make[2]: Leaving directory '/home/pi/workspace/fast/build'
CMakeFiles/Makefile2:66: recipe for target 'CMakeFiles/fast.dir/all' failed
make[1]: *** [CMakeFiles/fast.dir/all] Error 2
make[1]: Leaving directory '/home/pi/workspace/fast/build'
Makefile:119: recipe for target 'all' failed
make: *** [all] Error 2
I have Cmake installed (sudo apt-get cmake), Gcc (4.6.3) and OpenCV.
How can I solve the problem?
Raspberry Pi is ARM, -msse* does it apply. Based on the CMakeFile, they detect ARM and disabled SSE flags. Maybe it is not working for you, perhaps due to a different cmake version
Try changing this
IF(DEFINED ENV{ARM_ARCHITECTURE})
to
IF(DEFINED $ENV{ARM_ARCHITECTURE})
This is line 34 in CMakeLists.txt
If the fix does not work, then you could manually enable ARM specified flags by editing CMakeLists.txt
Remove this:
IF(DEFINED ENV{ARM_ARCHITECTURE})
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfpu=neon -march=armv7-a")
ELSE()
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmmx -msse -msse -msse2 -msse3 -mssse3")
ENDIF()
and replace with this
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfpu=neon -march=armv7-a")
Maybe report an issue on github and tell the authors about it.
EDIT: you want to do these edits in https://github.com/uzh-rpg/fast/blob/master/CMakeLists.txt
Also try setting export ARM_ARCHITECTURE=1 before compiling
This is my very first post here. I am trying to compile RGBdemo to test its reconstruction capabilities with kinect.
I have followed these instructions
RGBdemo compiling instructions
I was able to follow all the instructions more or less consistently but I stomp at the ending (compiling RGBdemo 0.7). Here is the make code.
[ 48%] Built target XnSensorServer
make -f nestk/deps/openni/Nite/Samples/Players/CMakeFiles/Sample-Players.dir/build.make nestk/deps/openni/Nite/Samples/Players/CMakeFiles/Sample-Players.dir/depend
make[2]: Entering directory `/home/andre/.RGBDemo-0.7.0-Source/build'
cd /home/andre/.RGBDemo-0.7.0-Source/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/andre/.RGBDemo-0.7.0-Source /home/andre/.RGBDemo-0.7.0-Source/nestk/deps/openni/Nite/Samples/Players /home/andre/.RGBDemo-0.7.0-Source/build /home/andre/.RGBDemo-0.7.0-Source/build/nestk/deps/openni/Nite/Samples/Players /home/andre/.RGBDemo-0.7.0-Source/build/nestk/deps/openni/Nite/Samples/Players/CMakeFiles/Sample-Players.dir/DependInfo.cmake --color=
make[2]: Leaving directory `/home/andre/.RGBDemo-0.7.0-Source/build'
make -f nestk/deps/openni/Nite/Samples/Players/CMakeFiles/Sample-Players.dir/build.make nestk/deps/openni/Nite/Samples/Players/CMakeFiles/Sample-Players.dir/build
make[2]: Entering directory `/home/andre/.RGBDemo-0.7.0-Source/build'
Linking CXX executable ../../../../../../bin/Sample-Players
cd /home/andre/.RGBDemo-0.7.0-Source/build/nestk/deps/openni/Nite/Samples/Players && /usr/bin/cmake -E cmake_link_script CMakeFiles/Sample-Players.dir/link.txt --verbose=1
/usr/bin/c++ -fPIC -O2 -g -DNDEBUG CMakeFiles/Sample-Players.dir/signal_catch.cpp.o CMakeFiles/Sample-Players.dir/SceneDrawer.cpp.o CMakeFiles/Sample-Players.dir/main.cpp.o CMakeFiles/Sample-Players.dir/kbhit.cpp.o -o ../../../../../../bin/Sample-Players -L/home/andre/.RGBDemo-0.7.0-Source/nestk/deps/openni/Nite/Lib/Linux64 -rdynamic ../../../../../../lib/libOpenNI.so -lglut -lusb-1.0 -ldl ../../../../../../lib/libTinyXml.a -Wl,-rpath,/home/andre/.RGBDemo-0.7.0-Source/nestk/deps/openni/Nite/Lib/Linux64:/home/andre/.RGBDemo-0.7.0-Source/build/lib
/usr/bin/ld: CMakeFiles/Sample-Players.dir/main.cpp.o: undefined reference to symbol 'glOrtho'
//usr/lib/x86_64-linux-gnu/mesa/libGL.so.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [bin/Sample-Players] Error 1
make[2]: Leaving directory `/home/andre/.RGBDemo-0.7.0-Source/build'
make[1]: *** [nestk/deps/openni/Nite/Samples/Players/CMakeFiles/Sample-Players.dir/all] Error 2
make[1]: Leaving directory `/home/andre/.RGBDemo-0.7.0-Source/build'
make: *** [all] Error 2
I have not much experience in compiling programs although I have some programming skills.
I have searched extensively how to solve this issue searching for the errors
"reference to symbol 'glOrtho'" and "adding symbols: DSO missing from command line" but I can't find a decent solution that helped me.
For example this case
Linker error : undefined reference to symbol 'glOrtho'
states that I should link an OpenGL library to a certain file. In my case I think it should be main.cpp but I am unable to find it :-(.
Any help is much appreciated.
Update
Here is the current progress that I was able to achieve in the make
Scanning dependencies of target nestk
make[2]: Leaving directory `/home/andre/.rgbdemo/build'
make -f nestk/ntk/CMakeFiles/nestk.dir/build.make nestk/ntk/CMakeFiles/nestk.dir/build
make[2]: Entering directory `/home/andre/.rgbdemo/build'
/usr/bin/cmake -E cmake_progress_report /home/andre/.rgbdemo/build/CMakeFiles 56
[ 59%] Building CXX object nestk/ntk/CMakeFiles/nestk.dir/aruco/board.o
cd /home/andre/.rgbdemo/build/nestk/ntk && /usr/bin/c++ -DHAVE_OPENCV_GREATER_THAN_2_2 -DHAVE_OPENCV_GREATER_THAN_2_3_0 -DNESTK_USE_CUSTOM_OPENNI -DNESTK_USE_EIGEN -DNESTK_USE_FREENECT -DNESTK_USE_GLEW -DNESTK_USE_OPENNI -DNESTK_USE_QT -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_SVG_LIB -DQT_XML_LIB -Dnestk_EXPORTS -fPIC -Wall -W -Wno-unused -Wno-sign-compare -O2 -g -DNDEBUG -fPIC -I/home/andre/.rgbdemo/build/nestk/deps -I/home/andre/.rgbdemo/nestk/deps -isystem /usr/include/qt4 -isystem /usr/include/qt4/QtOpenGL -isystem /usr/include/qt4/QtSvg -isystem /usr/include/qt4/QtGui -isystem /usr/include/qt4/QtXml -isystem /usr/include/qt4/QtNetwork -isystem /usr/include/qt4/QtCore -I/home/andre/.rgbdemo/nestk/deps/include -I/home/andre/.rgbdemo/nestk/deps/eigen -I/home/andre/.rgbdemo/nestk/deps/libfreenect/include -I/home/andre/.rgbdemo/nestk/deps/openni/Include -I/home/andre/.rgbdemo/nestk/deps/openni/Nite/Include -I/home/andre/.rgbdemo/nestk/deps/glew/include -I/home/andre/.rgbdemo/nestk -I/home/andre/.rgbdemo/build/nestk -o CMakeFiles/nestk.dir/aruco/board.o -c /home/andre/.rgbdemo/nestk/ntk/aruco/board.cpp
In file included from /home/andre/.rgbdemo/nestk/ntk/geometry/pose_3d.h:23:0,
from /home/andre/.rgbdemo/nestk/ntk/aruco/marker.h:17,
from /home/andre/.rgbdemo/nestk/ntk/aruco/board.h:19,
from /home/andre/.rgbdemo/nestk/ntk/aruco/board.cpp:1:
/home/andre/.rgbdemo/nestk/ntk/core.h:31:38: fatal error: opencv2/legacy/compat.hpp: No such file or directory
# include "opencv2/legacy/compat.hpp"
^
compilation terminated.
make[2]: *** [nestk/ntk/CMakeFiles/nestk.dir/aruco/board.o] Error 1
make[2]: Leaving directory `/home/andre/.rgbdemo/build'
make[1]: *** [nestk/ntk/CMakeFiles/nestk.dir/all] Error 2
make[1]: Leaving directory `/home/andre/.rgbdemo/build'
make: *** [all] Error 2
I will try to find how to correct those directories but I would really apreciate some help on this. Please, I am doing this a bit by trial and error and I know this is not the right way to go. I am not an expert on cmake compilation.
I had to remove and reinstall OpenCV 2.3.1 with these instructions
http://www.ozbotz.org/opencv-installation-2-3-1/
And after some magic...voilá. It works. I hope that this tips can somehow help anyone.