CMakeFiles/Makefile2:1429: recipe for target 'caffe2/CMakeFiles/conv_op_cache_cudnn_test.dir/all' failed - caffe2

When I've installed all the prerequisites listed in the install page of caffe2, I type the command make && cd build && sudo make install the compile caffe2, then I got the following error, the 1st part is log file using Cmake.
cama#cama:/home/chaoyang/caffe2-master/build$ cmake ..
-- The CXX compiler identification is GNU 4.9.3
-- The C compiler identification is GNU 4.9.3
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Build type not set - defaulting to Release
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so
-- The BLAS backend of choice:Eigen
-- Could NOT find NNPACK (missing: NNPACK_INCLUDE_DIR NNPACK_LIBRARY)
-- Will try to build NNPACK from source. If anything fails, follow the NNPACK prerequisite installation steps.
CMake Warning at cmake/External/nnpack.cmake:157 (message):
NNPACK is chosen to be installed, but confu and ninja that are needed by it
are not installed. As a result we won't build with NNPACK.
Call Stack (most recent call first):
cmake/Dependencies.cmake:52 (include)
CMakeLists.txt:72 (include)
CMake Warning at cmake/Dependencies.cmake:57 (message):
Not compiling with NNPACK. Suppress this warning with -DUSE_NNPACK=OFF
Call Stack (most recent call first):
CMakeLists.txt:72 (include)
-- Found GFlags: /usr/include
-- Found gflags (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libgflags.so)
-- Found system gflags install.
-- Found Glog: /usr/include
-- Found glog (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libglog.so)
-- Found system glog install.
-- Found PythonInterp: /home/cama/anaconda3/bin/python (found version "3.6")
-- Could NOT find Benchmark (missing: Benchmark_INCLUDE_DIR Benchmark_LIBRARY)
-- Found Git: /usr/bin/git (found version "2.7.4")
-- git Version: v0.0.0
-- Version: 0.0.0
-- Performing Test HAVE_CXX_FLAG_STD_CXX11
-- Performing Test HAVE_CXX_FLAG_STD_CXX11 - Success
-- Performing Test HAVE_CXX_FLAG_WALL
-- Performing Test HAVE_CXX_FLAG_WALL - Success
-- Performing Test HAVE_CXX_FLAG_WEXTRA
-- Performing Test HAVE_CXX_FLAG_WEXTRA - Success
-- Performing Test HAVE_CXX_FLAG_WSHADOW
-- Performing Test HAVE_CXX_FLAG_WSHADOW - Success
-- Performing Test HAVE_CXX_FLAG_WERROR
-- Performing Test HAVE_CXX_FLAG_WERROR - Success
-- Performing Test HAVE_CXX_FLAG_PEDANTIC
-- Performing Test HAVE_CXX_FLAG_PEDANTIC - Success
-- Performing Test HAVE_CXX_FLAG_PEDANTIC_ERRORS
-- Performing Test HAVE_CXX_FLAG_PEDANTIC_ERRORS - Success
-- Performing Test HAVE_CXX_FLAG_WSHORTEN_64_TO_32
-- Performing Test HAVE_CXX_FLAG_WSHORTEN_64_TO_32 - Failed
-- Performing Test HAVE_CXX_FLAG_WFLOAT_EQUAL
-- Performing Test HAVE_CXX_FLAG_WFLOAT_EQUAL - Success
-- Performing Test HAVE_CXX_FLAG_FSTRICT_ALIASING
-- Performing Test HAVE_CXX_FLAG_FSTRICT_ALIASING - Success
-- Performing Test HAVE_CXX_FLAG_WZERO_AS_NULL_POINTER_CONSTANT
-- Performing Test HAVE_CXX_FLAG_WZERO_AS_NULL_POINTER_CONSTANT - Success
-- Performing Test HAVE_CXX_FLAG_WSTRICT_ALIASING
-- Performing Test HAVE_CXX_FLAG_WSTRICT_ALIASING - Success
-- Performing Test HAVE_CXX_FLAG_WTHREAD_SAFETY
-- Performing Test HAVE_CXX_FLAG_WTHREAD_SAFETY - Failed
-- Performing Test HAVE_CXX_FLAG_COVERAGE
-- Performing Test HAVE_CXX_FLAG_COVERAGE - Success
-- Performing Test HAVE_STD_REGEX
-- Performing Test HAVE_STD_REGEX -- success
-- Performing Test HAVE_GNU_POSIX_REGEX
-- Performing Test HAVE_GNU_POSIX_REGEX -- failed to compile
-- Performing Test HAVE_POSIX_REGEX
-- Performing Test HAVE_POSIX_REGEX -- success
-- Performing Test HAVE_STEADY_CLOCK
-- Performing Test HAVE_STEADY_CLOCK -- success
-- Performing Test BENCHMARK_HAS_CXX03_FLAG
-- Performing Test BENCHMARK_HAS_CXX03_FLAG - Success
-- Found LMDB: /usr/include
-- Found lmdb (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/liblmdb.so)
-- Found LevelDB: /usr/include
-- Found LevelDB (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libleveldb.so)
-- Found Snappy: /usr/include
-- Found Snappy (include: /usr/include, library: /usr/lib/libsnappy.so)
-- Could NOT find RocksDB (missing: RocksDB_INCLUDE_DIR RocksDB_LIBRARIES)
CMake Warning at cmake/Dependencies.cmake:138 (message):
Not compiling with RocksDB. Suppress this warning with -DUSE_ROCKSDB=OFF
Call Stack (most recent call first):
CMakeLists.txt:72 (include)
CMake Warning at cmake/Dependencies.cmake:181 (message):
Not compiling with OpenCV. Suppress this warning with -DUSE_OPENCV=OFF
Call Stack (most recent call first):
CMakeLists.txt:72 (include)
CMake Warning at cmake/Dependencies.cmake:201 (find_package):
By not providing "FindEigen3.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Eigen3", but
CMake did not find one.
Could not find a package configuration file provided by "Eigen3" with any
of the following names:
Eigen3Config.cmake
eigen3-config.cmake
Add the installation prefix of "Eigen3" to CMAKE_PREFIX_PATH or set
"Eigen3_DIR" to a directory containing one of the above files. If "Eigen3"
provides a separate development package or SDK, be sure it has been
installed.
Call Stack (most recent call first):
CMakeLists.txt:72 (include)
-- Found PythonInterp: /home/cama/anaconda3/bin/python (found suitable version "3.6", minimum required is "2.7")
-- Found PythonLibs: /home/cama/anaconda3/lib/libpython3.6m.so (found suitable version "3.6.0", minimum required is "2.7")
-- Found NumPy: /home/cama/anaconda3/lib/python3.6/site-packages/numpy/core/include (found version "1.11.3")
-- NumPy ver. 1.11.3 found (include: /home/cama/anaconda3/lib/python3.6/site-packages/numpy/core/include)
-- Could NOT find pybind11 (missing: pybind11_INCLUDE_DIR)
-- Could NOT find MPI_C (missing: MPI_C_LIBRARIES MPI_C_INCLUDE_PATH)
-- Could NOT find MPI_CXX (missing: MPI_CXX_LIBRARIES MPI_CXX_INCLUDE_PATH)
CMake Warning at cmake/Dependencies.cmake:257 (message):
Not compiling with MPI. Suppress this warning with -DUSE_MPI=OFF
Call Stack (most recent call first):
CMakeLists.txt:72 (include)
-- Try OpenMP C flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Try OpenMP CXX flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Found OpenMP: -fopenmp
-- Adding -fopenmp
-- CUDA detected: 8.0
-- Added CUDA NVCC flags for: sm_61
-- Found libcuda: /usr/local/cuda-8.0/lib64/stubs/libcuda.so
-- Found libnvrtc: /usr/local/cuda-8.0/lib64/libnvrtc.so
-- Found CUDNN: /usr/local/cuda-8.0/include
-- Found cuDNN: v5.1.5 (include: /usr/local/cuda-8.0/include, library: /usr/local/cuda-8.0/lib64/libcudnn.so)
-- Could NOT find NCCL (missing: NCCL_INCLUDE_DIR NCCL_LIBRARY)
-- NCCL: /home/chaoyang/caffe2-master/third_party/nccl/build/lib/libnccl_static.a
-- Could NOT find CUB (missing: CUB_INCLUDE_DIR)
-- Could NOT find Gloo (missing: Gloo_INCLUDE_DIR Gloo_LIBRARY)
-- Found CUDA: /usr/local/cuda-8.0 (found suitable version "8.0", minimum required is "7.0")
-- CUDA detected: 8.0
-- Found libcuda: /usr/local/cuda-8.0/lib64/stubs/libcuda.so
-- Found libnvrtc: /usr/local/cuda-8.0/lib64/libnvrtc.so
-- Performing Test CAFFE2_LONG_IS_INT32_OR_64
-- Performing Test CAFFE2_LONG_IS_INT32_OR_64 - Success
-- Does not need to define long separately.
-- Performing Test HAS_BUILTIN_CPU_SUPPORTS
-- Performing Test HAS_BUILTIN_CPU_SUPPORTS - Success
-- This compiler has builtin_cpu_supports feature.
-- Performing Test CAFFE2_NEED_TO_TURN_OFF_DEPRECATION_WARNING
-- Performing Test CAFFE2_NEED_TO_TURN_OFF_DEPRECATION_WARNING - Failed
-- Turning off deprecation warning due to glog.
-- GCC 4.9.3: Adding gcc and gcc_s libs to link line
-- Include NCCL operators
-- Excluding image processing operators due to no opencv
-- Excluding video processing operators due to no opencv
-- Excluding mkl operators as we are not using mkl
-- MPI operators skipped due to no MPI support
-- Automatically generating missing init.py files.
-- ******** Summary ********
-- General:
-- Git version :
-- System : Linux
-- C++ compiler : /usr/bin/c++
-- C++ compiler version : 4.9.3
-- Protobuf compiler : /usr/bin/protoc
-- CXX flags : -fopenmp -Wno-deprecated -std=c++11 -fPIC -Wno-narrowing
-- Build type : Release
-- Compile definitions : CAFFE2_USE_EIGEN_FOR_BLAS;CAFFE2_USE_GOOGLE_GLOG;CAFFE2_USE_GFLAGS;EIGEN_MPL2_ONLY
-- BUILD_SHARED_LIBS : ON
-- BUILD_PYTHON : ON
-- Python version : 3.6.0
-- Python library : /home/cama/anaconda3/lib/libpython3.6m.so
-- USE_CUDA : ON
-- CUDA version : 8.0
-- USE_CNMEM : OFF
-- USE_NERVANA_GPU : OFF
-- USE_GLOG : ON
-- USE_GFLAGS : ON
-- USE_LMDB : ON
-- LMDB version : 0.9.10
-- USE_LEVELDB : ON
-- LevelDB version : 1.15
-- Snappy version : 1.1.0
-- USE_OPENCV : OFF
-- USE_FFMPEG :
-- USE_ZMQ : OFF
-- USE_ROCKSDB : OFF
-- USE_MPI : OFF
-- USE_NCCL : ON
-- USE_NNPACK : OFF
-- USE_OPENMP : ON
-- USE_REDIS : OFF
-- USE_GLOO : ON
-- Configuring done
-- Generating done
-- Build files have been written to: /home/chaoyang/caffe2-master/build
The following is the normal output of make. Please focus on the last lines for the reason that these indicate the errors.
[ 77%] Building CXX object caffe2/CMakeFiles/conv_op_cache_cudnn_test.dir/operators/conv_op_cache_cudnn_test.cc.o
[ 77%] Linking CXX executable binaries/conv_op_cache_cudnn_test
libCaffe2_CPU.so: undefined reference to gflags::SetUsageMessage(std::string const&)'
libCaffe2_CPU.so: undefined reference togoogle::protobuf::internal::WireFormatLite::ReadString(google::protobuf::io::CodedInputStream*, std::string*)'
libCaffe2_CPU.so: undefined reference to google::protobuf::Message::GetTypeName() const'
libCaffe2_CPU.so: undefined reference togoogle::protobuf::internal::StringTypeHandlerBase::Delete(std::string*)'
libCaffe2_GPU.so: undefined reference to google::protobuf::internal::kEmptyString'
libCaffe2_CPU.so: undefined reference togoogle::protobuf::MessageLite::SerializeToString(std::string*) const'
libCaffe2_CPU.so: undefined reference to google::protobuf::MessageFactory::InternalRegisterGeneratedFile(char const*, void (*)(std::string const&))'
libCaffe2_GPU.so: undefined reference togoogle::protobuf::TextFormat::ParseFromString(std::string const&, google::protobuf::Message*)'
libCaffe2_GPU.so: undefined reference to google::base::CheckOpMessageBuilder::NewString()'
libCaffe2_CPU.so: undefined reference togoogle::protobuf::internal::WireFormatLite::WriteBytes(int, std::string const&, google::protobuf::io::CodedOutputStream*)'
libCaffe2_GPU.so: undefined reference to google::protobuf::internal::StringTypeHandlerBase::New()'
libCaffe2_CPU.so: undefined reference togflags::ParseCommandLineFlags(int*, char***, bool)'
libCaffe2_GPU.so: undefined reference to google::protobuf::Message::ShortDebugString() const'
libCaffe2_GPU.so: undefined reference togoogle::protobuf::MessageLite::ParseFromString(std::string const&)'
libCaffe2_GPU.so: undefined reference to gflags::FlagRegisterer::FlagRegisterer(char const*, char const*, char const*, char const*, void*, void*)'
libCaffe2_CPU.so: undefined reference togoogle::protobuf::internal::WireFormatLite::WriteString(int, std::string const&, google::protobuf::io::CodedOutputStream*)'
libCaffe2_GPU.so: undefined reference to google::protobuf::internal::ParseNamedEnum(google::protobuf::EnumDescriptor const*, std::string const&, int*)'
libCaffe2_GPU.so: undefined reference togoogle::protobuf::MessageLite::SerializeAsString() const'
libCaffe2_CPU.so: undefined reference to google::protobuf::DescriptorPool::FindFileByName(std::string const&) const'
libCaffe2_CPU.so: undefined reference togflags::ProgramUsage()'
libCaffe2_CPU.so: undefined reference to google::protobuf::internal::WireFormatLite::ReadBytes(google::protobuf::io::CodedInputStream*, std::string*)'
libCaffe2_CPU.so: undefined reference togoogle::protobuf::Message::InitializationErrorString() const'
collect2: error: ld returned 1 exit status
caffe2/CMakeFiles/conv_op_cache_cudnn_test.dir/build.make:130: recipe for target 'caffe2/binaries/conv_op_cache_cudnn_test' failed
make[3]: * [caffe2/binaries/conv_op_cache_cudnn_test] Error 1
make[3]: Leaving directory '/home/chaoyang/caffe2-master/build'
CMakeFiles/Makefile2:1429: recipe for target 'caffe2/CMakeFiles/conv_op_cache_cudnn_test.dir/all' failed
make[2]: [caffe2/CMakeFiles/conv_op_cache_cudnn_test.dir/all] Error 2
make[2]: Leaving directory '/home/chaoyang/caffe2-master/build'
Makefile:138: recipe for target 'all' failed
make[1]: [all] Error 2
make[1]: Leaving directory '/home/chaoyang/caffe2-master/build'
Makefile:4: recipe for target 'all' failed
make: * [all] Error 2
It seems that cudnn library caused this error, while I've successfully used cudnn-v5.1 and cuda-8.0 in ubuntu, specifically, in matconvnet, which requires cuda and cudnn for accelerating the computation speed. And it seems no one else has got this error before, so any advice will be appreciated!

it's hard for me to follow the log, but your command doesn't seem right.
I suggest you do cd build && cmake .. && sudo make install.

Related

Undefined reference to `mysqlx::abi2::r0::Schema::Schema(mysqlx ::abi2::r0::Session&)'

I had a problem when linking to mysqlcppconn (version 8.0.30) (similar to the issue described here).
Here is my code:
mysqlx::Session sess2("localhost", 33060,
"root", "test",
"postManufDB");
Schema mySchema(sess2);
CMakeLists.txt (used to compile my app):
cmake_minimum_required(VERSION 3.5)
project(PostManuf VERSION 0.1 LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CPP_CON_VERSION_MAJOR 8)
set(CPP_CON_LIB mysqlcppconn${CPP_CON_VERSION_MAJOR})
set(FULL_PATH_TO_MYSQL_CONNECTOR_CPP_DIR "/usr/local/mysql/connector-c++-8.0.30")
set(CPP_CON_LIB_INC ${FULL_PATH_TO_MYSQL_CONNECTOR_CPP_DIR}/include/)
set(CPP_CON_LIB_LINK ${FULL_PATH_TO_MYSQL_CONNECTOR_CPP_DIR}/lib64/debug/)
include_directories(${CPP_CON_LIB_INC})
link_directories(${CPP_CON_LIB_LINK})
set(PROJECT_SOURCES
main.cpp
mainwindow.cpp
mainwindow.h
)
add_executable(PostManuf ${PROJECT_SOURCES})
target_link_libraries(PostManuf PRIVATE ${CPP_CON_LIB})
Error:
mainwindow.cpp:(.text+0x3ab6): undefined reference to `mysqlx::abi2::r0::Schema::Schema(mysqlx
::abi2::r0::Session&)'
collect2: error: ld returned 1 exit status
Steps I've followed:
Download mysqlcppconn binaries and used it for development
Compiled mysqlcppconn binary from source and linked to it
Added add_definitions(-D_GLIBCXX_USE_CXX11_ABI=0) to CMakeLists.txt, but
then I have a lot more errors:
mainwindow.cpp:(.text+0x3bb2): undefined reference to `mysqlx::abi2::r0::Schema::Schema(mysqlx
::abi2::r0::Session&)'
/usr/bin/ld: CMakeFiles/PostManuf.dir/mainwindow.cpp.o: in function `mysqlx::abi2::r0::string:
:traits<char>::from_str(mysqlx::abi2::r0::string&, std::string const&)':
mainwindow.cpp:(.text._ZN6mysqlx4abi22r06string6traitsIcE8from_strERS2_RKSs[_ZN6mysqlx4abi22r0
6string6traitsIcE8from_strERS2_RKSs]+0x23): undefined reference to `mysqlx::abi2::r0::string::
Impl::from_utf8(mysqlx::abi2::r0::string&, std::string const&)'
/usr/bin/ld: CMakeFiles/PostManuf.dir/mainwindow.cpp.o: in function `void mysqlx::abi2::r0::in
ternal::Settings_detail<mysqlx::abi2::r0::internal::Settings_traits>::set<true, mysqlx::abi2::
r0::SessionOption, std::string const&, mysqlx::abi2::r0::SessionOption::Enum, unsigned int&, m
ysqlx::abi2::r0::SessionOption::Enum, mysqlx::abi2::r0::string const&>(mysqlx::abi2::r0::Sessi
onOption, std::string const&, mysqlx::abi2::r0::SessionOption::Enum&&, unsigned int&, mysqlx::
abi2::r0::SessionOption::Enum&&, mysqlx::abi2::r0::string const&)':
mainwindow.cpp:(.text._ZN6mysqlx4abi22r08internal15Settings_detailINS2_15Settings_traitsEE3set
ILb1ENS1_13SessionOptionEJRKSsNS7_4EnumERjSA_RKNS1_6stringEEEEvT0_DpOT1_[_ZN6mysqlx4abi22r08in
ternal15Settings_detailINS2_15Settings_traitsEE3setILb1ENS1_13SessionOptionEJRKSsNS7_4EnumERjS
A_RKNS1_6stringEEEEvT0_DpOT1_]+0xbc): undefined reference to `mysqlx::abi2::r0::internal::Sett
ings_detail<mysqlx::abi2::r0::internal::Settings_traits>::do_set(std::list<std::pair<int, mysq
lx::abi2::r0::Value>, std::allocator<std::pair<int, mysqlx::abi2::r0::Value> > >&&)'
/usr/bin/ld: CMakeFiles/PostManuf.dir/mainwindow.cpp.o: in function `void mysqlx::abi2::r0::in
ternal::Settings_detail<mysqlx::abi2::r0::internal::Settings_traits>::set<true, mysqlx::abi2::
r0::SessionOption, std::string>(mysqlx::abi2::r0::SessionOption, std::string&&)':
mainwindow.cpp:(.text._ZN6mysqlx4abi22r08internal15Settings_detailINS2_15Settings_traitsEE3set
ILb1ENS1_13SessionOptionEJSsEEEvT0_DpOT1_[_ZN6mysqlx4abi22r08internal15Settings_detailINS2_15S
ettings_traitsEE3setILb1ENS1_13SessionOptionEJSsEEEvT0_DpOT1_]+0x56): undefined reference to `
mysqlx::abi2::r0::internal::Settings_detail<mysqlx::abi2::r0::internal::Settings_traits>::do_s
et(std::list<std::pair<int, mysqlx::abi2::r0::Value>, std::allocator<std::pair<int, mysqlx::ab
i2::r0::Value> > >&&)'
/usr/bin/ld: CMakeFiles/PostManuf.dir/mainwindow.cpp.o: in function `void mysqlx::abi2::r0::in
ternal::Settings_detail<mysqlx::abi2::r0::internal::Settings_traits>::set<true, mysqlx::abi2::
r0::SessionOption, mysqlx::abi2::r0::string const&>(mysqlx::abi2::r0::SessionOption, mysqlx::a
bi2::r0::string const&)':
mainwindow.cpp:(.text._ZN6mysqlx4abi22r08internal15Settings_detailINS2_15Settings_traitsEE3set
ILb1ENS1_13SessionOptionEJRKNS1_6stringEEEEvT0_DpOT1_[_ZN6mysqlx4abi22r08internal15Settings_de
tailINS2_15Settings_traitsEE3setILb1ENS1_13SessionOptionEJRKNS1_6stringEEEEvT0_DpOT1_]+0x56):
undefined reference to `mysqlx::abi2::r0::internal::Settings_detail<mysqlx::abi2::r0::internal
::Settings_traits>::do_set(std::list<std::pair<int, mysqlx::abi2::r0::Value>, std::allocator<s
td::pair<int, mysqlx::abi2::r0::Value> > >&&)'
collect2: error: ld returned 1 exit status
I can run the application successfully when using more common classes (e.g. Session).
But when using Schema, I can't link.
CMake configuration to compile mysqlcppconn from source (contains compiler info):
=== Booststrap ===
-- generator: Unix Makefiles
-- build type: Debug
-- ----
-- The C compiler identification is GNU 9.4.0
-- The CXX compiler identification is GNU 9.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check if the system is big endian
-- Searching 16 bit integer
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Using unsigned short
-- Check if the system is big endian - little endian
-- Configuring done
-- Generating done
-- Build files have been written to: /home/zmpl/tmp/mysql-connector-cpp/build/platform-cache
=== Booststrap done ===
-- Check if the system is big endian
-- Searching 16 bit integer
-- Using unsigned short
-- Check if the system is big endian - little endian
-- BIG_ENDIAN: 0
Building version 8.0.30
Building on system: Linux-5.15.0-46-generic (x86_64)
Using cmake generator: Unix Makefiles
Using toolset:
Building 64bit code
Building shared connector library
Configuring CDK as part of MySQL_CONCPP project
-- Looking for SSL library.
-- found OpenSSL headers at: /usr/include
-- OpenSSL library: /usr/lib/x86_64-linux-gnu/libssl.so
-- OpenSSL crypto library: /usr/lib/x86_64-linux-gnu/libcrypto.so
-- Using OpenSSL version: 1.1.1f
-- Looking for SHA512_DIGEST_LENGTH
-- Looking for SHA512_DIGEST_LENGTH - found
-- Looking for X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS
-- Looking for X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS - found
-- Looking for SSL_get0_param
-- Looking for SSL_get0_param - found
-- Looking for X509_VERIFY_PARAM_set_hostflags
-- Looking for X509_VERIFY_PARAM_set_hostflags - found
-- Looking for X509_VERIFY_PARAM_set1_host
-- Looking for X509_VERIFY_PARAM_set1_host - found
-- found required X509 extensions
-- Setting up RapidJSON.
Skipping second declaration of config option: THROW_AS_ASSERT (found in: /home/zmpl/tmp/mysql-
connector-cpp/cdk/CMakeLists.txt)
-- Performing Test HAVE_STATIC_ASSERT
-- Performing Test HAVE_STATIC_ASSERT - Success
-- Performing Test HAVE_IS_SAME
-- Performing Test HAVE_IS_SAME - Failed
-- Performing Test HAVE_SHARED_PTR
-- Performing Test HAVE_SHARED_PTR - Success
-- Performing Test HAVE_SYSTEM_ERROR
-- Performing Test HAVE_SYSTEM_ERROR - Success
-- Check size of wchar_t
-- Check size of wchar_t - done
-- Setting up Protobuf.
== configuring external build of protobuf
-- sources at: /home/zmpl/tmp/mysql-connector-cpp/cdk/extra/protobuf
-- generator: Unix Makefiles
-- option CMAKE_BUILD_TYPE: Debug
-- option CMAKE_SYSTEM_NAME: Linux
-- option CMAKE_SYSTEM_VERSION: 5.15.0-46-generic
-- option CMAKE_SYSTEM_PROCESSOR: x86_64
-- option CMAKE_C_COMPILER: /usr/bin/cc
-- option CMAKE_CXX_COMPILER: /usr/bin/c++
-- ----
Not searching for unused variables given on the command line.
-- Check if the system is big endian
-- Searching 16 bit integer
-- Using unsigned short
-- Check if the system is big endian - little endian
-- BIG_ENDIAN: 0
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Performing Test protobuf_HAVE_BUILTIN_ATOMICS
-- Performing Test protobuf_HAVE_BUILTIN_ATOMICS - Success
-- Configuring done
-- Generating done
-- Build files have been written to: /home/zmpl/tmp/mysql-connector-cpp/build/cdk/protocol/mys
qlx/protobuf
== done configuring external build of protobuf
-- Setting up compression libraries.
== configuring external build of zlib
-- sources at: /home/zmpl/tmp/mysql-connector-cpp/cdk/extra/zlib
-- generator: Unix Makefiles
-- option CMAKE_BUILD_TYPE: Debug
-- option CMAKE_SYSTEM_NAME: Linux
-- option CMAKE_SYSTEM_VERSION: 5.15.0-46-generic
-- option CMAKE_SYSTEM_PROCESSOR: x86_64
-- option CMAKE_C_COMPILER: /usr/bin/cc
-- option CMAKE_CXX_COMPILER: /usr/bin/c++
-- ----
Not searching for unused variables given on the command line.
-- Check if the system is big endian
-- Searching 16 bit integer
-- Using unsigned short
-- Check if the system is big endian - little endian
-- BIG_ENDIAN: 0
-- Check size of off64_t
-- Check size of off64_t - done
-- Looking for fseeko
-- Looking for fseeko - found
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Configuring done
-- Generating done
-- Build files have been written to: /home/zmpl/tmp/mysql-connector-cpp/build/cdk/protocol/mys
qlx/zlib
== done configuring external build of zlib
== configuring external build of lz4
-- sources at: /home/zmpl/tmp/mysql-connector-cpp/cdk/extra/lz4
-- generator: Unix Makefiles
-- option CMAKE_BUILD_TYPE: Debug
-- option CMAKE_SYSTEM_NAME: Linux
-- option CMAKE_SYSTEM_VERSION: 5.15.0-46-generic
-- option CMAKE_SYSTEM_PROCESSOR: x86_64
-- option CMAKE_C_COMPILER: /usr/bin/cc
-- option CMAKE_CXX_COMPILER: /usr/bin/c++
-- ----
Not searching for unused variables given on the command line.
-- Check if the system is big endian
-- Searching 16 bit integer
-- Using unsigned short
-- Check if the system is big endian - little endian
-- BIG_ENDIAN: 0
-- Configuring done
-- Generating done
-- Build files have been written to: /home/zmpl/tmp/mysql-connector-cpp/build/cdk/protocol/mys
qlx/lz4
== done configuring external build of lz4
== configuring external build of zstd
-- sources at: /home/zmpl/tmp/mysql-connector-cpp/cdk/extra/zstd
-- generator: Unix Makefiles
-- option CMAKE_BUILD_TYPE: Debug
-- option CMAKE_SYSTEM_NAME: Linux
-- option CMAKE_SYSTEM_VERSION: 5.15.0-46-generic
-- option CMAKE_SYSTEM_PROCESSOR: x86_64
-- option CMAKE_C_COMPILER: /usr/bin/cc
-- option CMAKE_CXX_COMPILER: /usr/bin/c++
-- ----
Not searching for unused variables given on the command line.
-- Check if the system is big endian
-- Searching 16 bit integer
-- Using unsigned short
-- Check if the system is big endian - little endian
-- BIG_ENDIAN: 0
-- ZSTD_LEGACY_SUPPORT not defined!
-- Configuring done
-- Generating done
-- Build files have been written to: /home/zmpl/tmp/mysql-connector-cpp/build/cdk/protocol/mys
qlx/zstd
== done configuring external build of zstd
-- Looking for sys/endian.h
-- Looking for sys/endian.h - not found
-- Looking for sys/byteorder.h
-- Looking for sys/byteorder.h - not found
Wrote configuration header: /home/zmpl/tmp/mysql-connector-cpp/build/cdk/include/mysql/cdk/con
fig.h
Preparing to merge SHARED library: connector (xapi;devapi)
Connector library name: mysqlcppconn8
Building version 8.0.30
Generating INFO_SRC
Generating INFO_BIN
Install location: /usr/local/mysql/connector-c++-8.0.30
Connector libraries will be installed at: lib64
Project configuration options:
: BUILD_STATIC: OFF
Build static version of connector library
: WITH_SSL: system
Either 'system' to use system-wide OpenSSL library, or custom OpenSSL location. (default : sys
tem)
: WITH_JDBC: OFF
Whether to build a variant of connector library which implements legacy JDBC API
-- Configuring done
-- Generating done

Compile GLFW sources windows

I'm trying to compile GLFW on Win7 using CMake + Makefile with MinGW.
The commands sequence that I follow is generating build files with cmake:
$ cmake . -G "MinGW Makefiles"
-- The C compiler identification is GNU 4.8.1
-- Check for working C compiler: C:/MinGW/bin/gcc.exe
-- Check for working C compiler: C:/MinGW/bin/gcc.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - not found
-- Found Threads: TRUE
-- Found Vulkan: C:/VulkanSDK/1.1.77.0/Lib32/vulkan-1.lib
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Looking for dinput.h
-- Looking for dinput.h - not found
-- Looking for xinput.h
-- Looking for xinput.h - not found
-- Performing Test _GLFW_HAS_DEP
-- Performing Test _GLFW_HAS_DEP - Success
-- Performing Test _GLFW_HAS_ASLR
-- Performing Test _GLFW_HAS_ASLR - Success
-- Performing Test _GLFW_HAS_64ASLR
-- Performing Test _GLFW_HAS_64ASLR - Failed
-- Using Win32 for window creation
-- Configuring done
-- Generating done
-- Build files have been written to: `E:/workspace_opengl/PotatoRenderer_CMAKE_tests/libs/glfw`
Then I compile the sources:
$ mingw32-make.exe
[ 0%] Building C object src/CMakeFiles/glfw.dir/win32_init.c.obj
E:\workspace_opengl\PotatoRenderer_CMAKE_tests\libs\glfw\src\win32_init.c: In function '_glfwUpdateKeyNamesWin32':
E:\workspace_opengl\PotatoRenderer_CMAKE_tests\libs\glfw\src\win32_init.c:482:42: error: 'MAPVK_VSC_TO_VK' undeclared (first use in this function)
vk = MapVirtualKey(scancode, MAPVK_VSC_TO_VK);
^
E:\workspace_opengl\PotatoRenderer_CMAKE_tests\libs\glfw\src\win32_init.c:482:42: note: each undeclared identifier is reported only once for each function it appears in
In file included from c:\mingw\include\windows.h:48:0,
from E:\workspace_opengl\PotatoRenderer_CMAKE_tests\libs\glfw\src\win32_platform.h:65,
from E:\workspace_opengl\PotatoRenderer_CMAKE_tests\libs\glfw\src\internal.h:186,
from E:\workspace_opengl\PotatoRenderer_CMAKE_tests\libs\glfw\src\win32_init.c:28:
E:\workspace_opengl\PotatoRenderer_CMAKE_tests\libs\glfw\src\win32_init.c: In function '_glfwPlatformInit':
E:\workspace_opengl\PotatoRenderer_CMAKE_tests\libs\glfw\src\win32_platform.h:146:38: error: '_WIN32_WINNT_VISTA' undeclared (first use in this function)
IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_VISTA), \
^
E:\workspace_opengl\PotatoRenderer_CMAKE_tests\libs\glfw\src\win32_init.c:528:14: note: in expansion of macro 'IsWindowsVistaOrGreater'
else if (IsWindowsVistaOrGreater())
^
src\CMakeFiles\glfw.dir\build.make:146: recipe for target 'src/CMakeFiles/glfw.dir/win32_init.c.obj' failed
mingw32-make[2]: *** [src/CMakeFiles/glfw.dir/win32_init.c.obj] Error 1
CMakeFiles\Makefile2:121: recipe for target 'src/CMakeFiles/glfw.dir/all' failed
mingw32-make[1]: *** [src/CMakeFiles/glfw.dir/all] Error 2
Makefile:128: recipe for target 'all' failed
mingw32-make: *** [all] Error 2
I tried to google this a bit but I didn't find any similar issue. Also I tried including manually <Windows.h> or <Winuser.h> with no luck. Any ideas what am I doing wrong?
Thanks in advance
Your compiler is outdated. Use MinGW-W64, most easily installed through MSys2 http://www.msys2.org/

Point Cloud Library (PCL) basic tutorial cmake and make errors on Ubuntu 16.04

I've been trying to get PCL (1.8) working properly on my system (Ubuntu 16.04) but I am struggling to get even the basic tutorial to work. I could not install the prebuilt binaries supplied by pointclouds.org so instead followed the answer from this post and used the native repository from Ubuntu to install v1.8.
I then began to run into the same issues raised in this question. I fixed some of them myself using symlinks to correct paths broken by renaming and also installed the missing packages that I could. However I am unable to successfully create a usable makefile.
I am trying to follow this tutorial from pointclouds.org just so I can make sure everything is working.
Output from running cmake:
-- The C compiler identification is GNU 4.9.3
-- The CXX compiler identification is GNU 4.9.3
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Checking for module 'eigen3'
-- Found eigen3, version 3.2.92
-- Found eigen: /usr/include/eigen3
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Boost version: 1.58.0
-- Found the following Boost libraries:
-- system
-- filesystem
-- thread
-- date_time
-- iostreams
-- serialization
-- chrono
-- atomic
-- regex
-- Checking for module 'libopenni'
-- Found libopenni, version 1.5.4.0
-- Found openni: /usr/lib/libOpenNI.so
-- Checking for module 'libopenni2'
-- Found libopenni2, version 2.2.0.3
-- Found OpenNI2: /usr/lib/libOpenNI2.so
** WARNING ** io features related to pcap will be disabled
** WARNING ** io features related to png will be disabled
-- The imported target "vtkRenderingPythonTkWidgets" references the file
"/usr/lib/x86_64-linux-gnu/libvtkRenderingPythonTkWidgets.so"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
"/usr/lib/cmake/vtk-6.2/VTKTargets.cmake"
but not all the files it references.
-- Found libusb-1.0: /usr/include
-- looking for PCL_COMMON
-- Found PCL_COMMON: /usr/lib/x86_64-linux-gnu/libpcl_common.so
-- looking for PCL_OCTREE
-- Found PCL_OCTREE: /usr/lib/x86_64-linux-gnu/libpcl_octree.so
-- looking for PCL_IO
-- Found PCL_IO: /usr/lib/x86_64-linux-gnu/libpcl_io.so
-- Found PCL: /usr/lib/x86_64-linux-gnu/libboost_system.so;/usr/lib/x86_64-linux-gnu/libboost_filesystem.so;/usr/lib/x86_64-linux-gnu/libboost_thread.so;/usr/lib/x86_64-linux-gnu/libboost_date_time.so;/usr/lib/x86_64-linux-gnu/libboost_iostreams.so;/usr/lib/x86_64-linux-gnu/libboost_serialization.so;/usr/lib/x86_64-linux-gnu/libboost_chrono.so;/usr/lib/x86_64-linux-gnu/libboost_atomic.so;/usr/lib/x86_64-linux-gnu/libboost_regex.so;/usr/lib/x86_64-linux-gnu/libpthread.so;optimized;/usr/lib/x86_64-linux-gnu/libpcl_common.so;debug;/usr/lib/x86_64-linux-gnu/libpcl_common.so;optimized;/usr/lib/x86_64-linux-gnu/libpcl_octree.so;debug;/usr/lib/x86_64-linux-gnu/libpcl_octree.so;/usr/lib/libOpenNI.so;/usr/lib/libOpenNI2.so;vtkImagingStencil;vtkCommonComputationalGeometry;vtkCommonDataModel;vtkCommonMath;vtkCommonCore;vtksys;vtkCommonMisc;vtkCommonSystem;vtkCommonTransforms;vtkImagingCore;vtkCommonExecutionModel;vtkFiltersAMR;vtkFiltersGeneral;vtkFiltersCore;vtkParallelCore;vtkIOLegacy;vtkIOCore;/usr/lib/x86_64-linux-gnu/libz.so;vtkInteractionWidgets;vtkFiltersHybrid;vtkImagingSources;vtkRenderingCore;vtkCommonColor;vtkFiltersExtraction;vtkFiltersStatistics;vtkImagingFourier;vtkalglib;vtkFiltersGeometry;vtkFiltersSources;vtkFiltersModeling;vtkImagingGeneral;vtkImagingHybrid;vtkIOImage;vtkDICOMParser;vtkmetaio;/usr/lib/x86_64-linux-gnu/libjpeg.so;/usr/lib/x86_64-linux-gnu/libpng.so;/usr/lib/x86_64-linux-gnu/libtiff.so;vtkInteractionStyle;vtkRenderingAnnotation;vtkImagingColor;vtkRenderingFreeType;/usr/lib/x86_64-linux-gnu/libfreetype.so;vtkftgl;vtkRenderingVolume;vtkIOParallelNetCDF;vtkParallelMPI;/usr/lib/x86_64-linux-gnu/libnetcdf_c++.so;/usr/lib/x86_64-linux-gnu/libnetcdf.so;/usr/lib/x86_64-linux-gnu/hdf5/serial/lib/libhdf5.so;/usr/lib/x86_64-linux-gnu/libsz.so;/usr/lib/x86_64-linux-gnu/libdl.so;/usr/lib/x86_64-linux-gnu/libm.so;/usr/lib/x86_64-linux-gnu/hdf5/serial/lib/libhdf5_hl.so;vtkRenderingOpenGL;vtkIOLSDyna;vtkIOXML;vtkIOGeometry;/usr/lib/x86_64-linux-gnu/libjsoncpp.so;vtkIOXMLParser;/usr/lib/x86_64-linux-gnu/libexpat.so;vtkLocalExample;vtkInfovisCore;vtkGeovisCore;vtkInfovisLayout;vtkViewsCore;vtkproj4;/usr/lib/x86_64-linux-gnu/libpython2.7.so;vtkTestingGenericBridge;/usr/lib/libgl2ps.so;verdict;vtkIOMovie;/usr/lib/x86_64-linux-gnu/libtheoraenc.so;/usr/lib/x86_64-linux-gnu/libtheoradec.so;/usr/lib/x86_64-linux-gnu/libogg.so;vtkFiltersImaging;vtkIOMINC;vtkRenderingLOD;vtkViewsQt;vtkGUISupportQt;vtkViewsInfovis;vtkChartsCore;vtkRenderingContext2D;vtkRenderingLabel;vtkRenderingImage;vtkFiltersFlowPaths;vtkxdmf2;/usr/lib/x86_64-linux-gnu/libxml2.so;vtkFiltersReebGraph;vtkViewsContext2D;vtkIOXdmf2;vtkIOAMR;vtkRenderingContextOpenGL;vtkImagingStatistics;vtkIOParallel;vtkFiltersParallel;vtkIONetCDF;vtkexoIIc;vtkGUISupportQtOpenGL;vtkIOParallelLSDyna;vtkFiltersParallelGeometry;vtkGUISupportQtWebkit;vtkIOPLY;vtkWrappingTools;vtkFiltersHyperTree;vtkRenderingVolumeOpenGL;vtkIOExodus;vtkIOPostgreSQL;vtkIOSQL;sqlite3;vtkWrappingJava;vtkFiltersParallelFlowPaths;vtkFiltersParallelStatistics;vtkFiltersProgrammable;vtkFiltersParallelImaging;vtkRenderingParallelLIC;vtkRenderingLIC;vtkInteractionImage;vtkFiltersPython;vtkWrappingPythonCore;vtkIOParallelExodus;vtkFiltersGeneric;vtkIOVideo;vtkRenderingQt;vtkFiltersTexture;vtkIOInfovis;vtkGUISupportQtSQL;vtkRenderingFreeTypeOpenGL;vtkInfovisBoostGraphAlgorithms;vtkRenderingGL2PS;vtkIOGeoJSON;vtkFiltersVerdict;vtkViewsGeovis;vtkIOImport;vtkTestingIOSQL;vtkPythonInterpreter;vtkIOODBC;vtkIOEnSight;vtkIOMySQL;vtkRenderingMatplotlib;vtkDomainsChemistry;vtkIOExport;vtkFiltersParallelMPI;vtkIOParallelXML;vtkTestingRendering;vtkIOMPIParallel;vtkParallelMPI4Py;vtkFiltersSMP;vtkFiltersSelection;vtkIOVPIC;VPIC;vtkImagingMath;vtkImagingMorphological;vtkRenderingParallel;vtkRenderingFreeTypeFontConfig;vtkIOFFMPEG;vtkIOMPIImage;vtkIOGDAL;optimized;/usr/lib/x86_64-linux-gnu/libpcl_io.so;debug;/usr/lib/x86_64-linux-gnu/libpcl_io.so;/usr/lib/x86_64-linux-gnu/libboost_system.so;/usr/lib/x86_64-linux-gnu/libboost_filesystem.so;/usr/lib/x86_64-linux-gnu/libboost_thread.so;/usr/lib/x86_64-linux-gnu/libboost_date_time.so;/usr/lib/x86_64-linux-gnu/libboost_iostreams.so;/usr/lib/x86_64-linux-gnu/libboost_serialization.so;/usr/lib/x86_64-linux-gnu/libboost_chrono.so;/usr/lib/x86_64-linux-gnu/libboost_atomic.so;/usr/lib/x86_64-linux-gnu/libboost_regex.so;/usr/lib/x86_64-linux-gnu/libpthread.so;/usr/lib/libOpenNI.so;/usr/lib/libOpenNI2.so;vtkImagingStencil;vtkCommonComputationalGeometry;vtkCommonDataModel;vtkCommonMath;vtkCommonCore;vtksys;vtkCommonMisc;vtkCommonSystem;vtkCommonTransforms;vtkImagingCore;vtkCommonExecutionModel;vtkFiltersAMR;vtkFiltersGeneral;vtkFiltersCore;vtkParallelCore;vtkIOLegacy;vtkIOCore;/usr/lib/x86_64-linux-gnu/libz.so;vtkInteractionWidgets;vtkFiltersHybrid;vtkImagingSources;vtkRenderingCore;vtkCommonColor;vtkFiltersExtraction;vtkFiltersStatistics;vtkImagingFourier;vtkalglib;vtkFiltersGeometry;vtkFiltersSources;vtkFiltersModeling;vtkImagingGeneral;vtkImagingHybrid;vtkIOImage;vtkDICOMParser;vtkmetaio;/usr/lib/x86_64-linux-gnu/libjpeg.so;/usr/lib/x86_64-linux-gnu/libpng.so;/usr/lib/x86_64-linux-gnu/libtiff.so;vtkInteractionStyle;vtkRenderingAnnotation;vtkImagingColor;vtkRenderingFreeType;/usr/lib/x86_64-linux-gnu/libfreetype.so;vtkftgl;vtkRenderingVolume;vtkIOParallelNetCDF;vtkParallelMPI;/usr/lib/x86_64-linux-gnu/libnetcdf_c++.so;/usr/lib/x86_64-linux-gnu/libnetcdf.so;/usr/lib/x86_64-linux-gnu/hdf5/serial/lib/libhdf5.so;/usr/lib/x86_64-linux-gnu/libpthread.so;/usr/lib/x86_64-linux-gnu/libsz.so;/usr/lib/x86_64-linux-gnu/libdl.so;/usr/lib/x86_64-linux-gnu/libm.so;/usr/lib/x86_64-linux-gnu/hdf5/serial/lib/libhdf5_hl.so;vtkRenderingOpenGL;vtkIOLSDyna;vtkIOXML;vtkIOGeometry;/usr/lib/x86_64-linux-gnu/libjsoncpp.so;vtkIOXMLParser;/usr/lib/x86_64-linux-gnu/libexpat.so;vtkLocalExample;vtkInfovisCore;vtkGeovisCore;vtkInfovisLayout;vtkViewsCore;vtkproj4;/usr/lib/x86_64-linux-gnu/libpython2.7.so;vtkTestingGenericBridge;/usr/lib/libgl2ps.so;verdict;vtkIOMovie;/usr/lib/x86_64-linux-gnu/libtheoraenc.so;/usr/lib/x86_64-linux-gnu/libtheoradec.so;/usr/lib/x86_64-linux-gnu/libogg.so;vtkFiltersImaging;vtkIOMINC;vtkRenderingLOD;vtkViewsQt;vtkGUISupportQt;vtkViewsInfovis;vtkChartsCore;vtkRenderingContext2D;vtkRenderingLabel;vtkRenderingImage;vtkFiltersFlowPaths;vtkxdmf2;/usr/lib/x86_64-linux-gnu/libxml2.so;vtkFiltersReebGraph;vtkViewsContext2D;vtkIOXdmf2;vtkIOAMR;vtkRenderingContextOpenGL;vtkImagingStatistics;vtkIOParallel;vtkFiltersParallel;vtkIONetCDF;vtkexoIIc;vtkGUISupportQtOpenGL;vtkIOParallelLSDyna;vtkFiltersParallelGeometry;vtkGUISupportQtWebkit;vtkIOPLY;vtkWrappingTools;vtkFiltersHyperTree;vtkRenderingVolumeOpenGL;vtkIOExodus;vtkIOPostgreSQL;vtkIOSQL;sqlite3;vtkWrappingJava;vtkFiltersParallelFlowPaths;vtkFiltersParallelStatistics;vtkFiltersProgrammable;vtkFiltersParallelImaging;vtkRenderingParallelLIC;vtkRenderingLIC;vtkInteractionImage;vtkFiltersPython;vtkWrappingPythonCore;vtkIOParallelExodus;vtkFiltersGeneric;vtkIOVideo;vtkRenderingQt;vtkFiltersTexture;vtkIOInfovis;vtkGUISupportQtSQL;vtkRenderingFreeTypeOpenGL;vtkInfovisBoostGraphAlgorithms;vtkRenderingGL2PS;vtkIOGeoJSON;vtkFiltersVerdict;vtkViewsGeovis;vtkIOImport;vtkTestingIOSQL;vtkPythonInterpreter;vtkIOODBC;vtkIOEnSight;vtkIOMySQL;vtkRenderingMatplotlib;vtkDomainsChemistry;vtkIOExport;vtkFiltersParallelMPI;vtkIOParallelXML;vtkTestingRendering;vtkIOMPIParallel;vtkParallelMPI4Py;vtkFiltersSMP;vtkFiltersSelection;vtkIOVPIC;VPIC;vtkImagingMath;vtkImagingMorphological;vtkRenderingParallel;vtkRenderingFreeTypeFontConfig;vtkIOFFMPEG;vtkIOMPIImage;vtkIOGDAL (Required is at least version "1.3")
-- Configuring done
-- Generating done
-- Build files have been written to: /home/matt/hdd_home/pcl/tutorials/build
As can quite easily been seen, what is outputted is very different to what is shown in the tutorial.
It does create a build file so I can run make which errors and outputs:
[ 50%] Building CXX object CMakeFiles/pcd_write_test.dir/pcd_write.cpp.o
[100%] Linking CXX executable pcd_write_test
/usr/bin/ld: cannot find -lvtkproj4
collect2: error: ld returned 1 exit status
CMakeFiles/pcd_write_test.dir/build.make:330: recipe for target 'pcd_write_test' failed
make[2]: *** [pcd_write_test] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/pcd_write_test.dir/all' failed
make[1]: *** [CMakeFiles/pcd_write_test.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
I've tried what I can but maybe I lack enough experience to get this all sorted and working.
I also manually installed the package libproj-dev but this did not fix the issue.
Any help would be much appreciated!
The installation is missing python-vtk which is available in the Ubuntu repository.
This contains the required libvtkRenderingPythonTkWidgets package.
Installing it should remove the problem:
sudo apt update
sudo apt install python-vtk
It did for me.

compiler seems cannot find boost/shared_ptr.hpp

I am using Mac with OS 10.11.6
I am trying to install OpenGV on my Mac. This is a part of dependencies that will be needed to build the OpenSfM library. So, what I did is:
brew install homebrew/science/ceres-solver
brew install boost-python
brew install eigen
git clone https://github.com/paulinus/opengv.git
cd opengv
mkdir build
cd build
cmake .. -DBUILD_TESTS=OFF -DBUILD_PYTHON=ON
make install
But I got this error:
In file included from /Users/hilman_dayo/opengv/src/relative_pose/modules/main.cpp:47:
/Users/hilman_dayo/opengv/include/opengv/math/Sturm.hpp:43:10: fatal error: 'boost/shared_ptr.hpp' file not found
#include <boost/shared_ptr.hpp>
^
1 error generated.
make[2]: *** [CMakeFiles/opengv.dir/src/relative_pose/modules/main.o] Error 1
make[1]: *** [CMakeFiles/opengv.dir/all] Error 2
make: *** [all] Error 2
How can I solve this? Already checked, and the file is there at /usr/local/include/boost/shared_ptr.hpp.
If it is ever needed, this is the output during cmake:
-- The C compiler identification is AppleClang 7.3.0.7030031
-- The CXX compiler identification is AppleClang 7.3.0.7030031
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Checking for C++11 compiler
-- Checking for C++11 compiler - available
-- Performing Test SUPPORTS_STD_CXX11
-- Performing Test SUPPORTS_STD_CXX11 - Success
-- Performing Test SUPPORTS_STD_CXX01
-- Performing Test SUPPORTS_STD_CXX01 - Success
-- Found Eigen: /usr/local/include/eigen3 (Required is at least version "2.91.0")
CMake Warning at /usr/local/Cellar/cmake/3.6.3/share/cmake/Modules/FindBoost.cmake:743 (message):
Imported targets not available for Boost version 106200
Call Stack (most recent call first):
/usr/local/Cellar/cmake/3.6.3/share/cmake/Modules/FindBoost.cmake:842 (_Boost_COMPONENT_DEPENDENCIES)
/usr/local/Cellar/cmake/3.6.3/share/cmake/Modules/FindBoost.cmake:1395 (_Boost_MISSING_DEPENDENCIES)
python/CMakeLists.txt:2 (find_package)
-- Boost version: 1.62.0
-- Found the following Boost libraries:
-- python
-- Found PythonLibs: /usr/lib/libpython2.7.dylib (found version "2.7.10")
-- Found PythonInterp: /Users/hilman_dayo/.virtualenvs/cv/bin/python2.7 (found version "2.7.12")
-- Found NumPy: version "1.11.1" /Users/hilman_dayo/.virtualenvs/cv/lib/python2.7/site-packages/numpy/core/include
-- Configuring done
CMake Warning (dev):
Policy CMP0042 is not set: MACOSX_RPATH is enabled by default. Run "cmake
--help-policy CMP0042" for policy details. Use the cmake_policy command to
set the policy and suppress this warning.
MACOSX_RPATH is not specified for the following targets:
pyopengv
This warning is for project developers. Use -Wno-dev to suppress it.
-- Generating done
-- Build files have been written to: /Users/hilman_dayo/opengv/build
OK. Comment by #usr1234567 give me a hint to find the answer. After a quick search, all I need to do is just execute this on the command line:
xcode-select --install

Shogun fails to compile. Are these Shogun bugs?

I am trying to compile Shogun on Fedora 23 64bit, but it fails with the errors below. Version 4.0.0 have the same issue.
Can anyone tell me, if there errors are bugs in Shogun or something I have done wrong?
dnf -y install git gcc which gcc-c++ doxygen numpy make cmake wget tar bzip2
cd /tmp
wget http://www.hdfgroup.org/ftp/HDF5/current/src/CMake-hdf5-1.8.16.tar.gz
tar xzf CMake-hdf5-1.8.16.tar.gz
cd CMake-hdf5-1.8.16
./build-unix.sh
cp -a HDF5-1.8.16-Linux/HDF_Group/HDF5/1.8.16/* /usr/local
cd /tmp
wget http://download.mosek.com/stable/7.1.0.41/mosektoolslinux64x86.tar.bz2
tar xjf mosektoolslinux64x86.tar.bz2
mv mosek/7 /root/mosek
export PATH=/root/mosek/tools/platform/linux64x86/bin/:$PATH
cp mosek.lic /root/mosek
cd /root/mosek/tools/platform/linux64x86/python/2/
python setup.py install --user
dnf -y install swig git cmake ccache gdb Pkgconfig NLopt-devel NLopt lpsolve-devel lpsolve ColPack-cli ColPack ColPack-devel arprec-devel arprec libxml2 libxml2-devel bzip2 bzip2-devel snappy-devel snappy protobuf-devel protobuf glpk glpk-devel libcurl-devel libcurl lzo lzo-devel lapack lapack-devel python-devel atlas atlas-devel qd qd-devel
cd /
git clone https://github.com/shogun-toolbox/shogun.git
cd /shogun/ && mkdir build && cd build
cmake -D BUNDLE_EIGEN=ON -D PythonModular=ON ..
make
And here is the output with the errors.
[ 0%] Built target Eigen3
[ 1%] Built target class_list
[ 1%] Built target ChunksProtobuf
[ 2%] Built target HeadersProtobuf
[ 2%] Built target ShogunVersionProtobuf
[ 3%] Generating version header
[ 3%] Built target version
[ 75%] Built target libshogun
[ 75%] Built target shogun
[ 75%] copying SWIG files
[ 75%] Built target python_modular_src
[ 75%] Built target python_doxy2swig
[ 75%] Built target _python_modular
[ 75%] Built target shogun-static
[ 75%] Linking CXX executable balanced_conditional_probability_tree
../../../src/shogun/libshogun.so.17.1: undefined reference to `cblas_dtrsm'
../../../src/shogun/libshogun.so.17.1: undefined reference to `cblas_dgemm'
../../../src/shogun/libshogun.so.17.1: undefined reference to `cblas_sscal'
../../../src/shogun/libshogun.so.17.1: undefined reference to `cblas_dgemv'
../../../src/shogun/libshogun.so.17.1: undefined reference to `cblas_dasum'
../../../src/shogun/libshogun.so.17.1: undefined reference to `SZ_BufftoBuffDecompress'
../../../src/shogun/libshogun.so.17.1: undefined reference to `cblas_dscal'
../../../src/shogun/libshogun.so.17.1: undefined reference to `SZ_encoder_enabled'
../../../src/shogun/libshogun.so.17.1: undefined reference to `cblas_daxpy'
../../../src/shogun/libshogun.so.17.1: undefined reference to `shogun::CPrimalMosekSOSVM::CPrimalMosekSOSVM()'
../../../src/shogun/libshogun.so.17.1: undefined reference to `cblas_saxpy'
../../../src/shogun/libshogun.so.17.1: undefined reference to `cblas_ddot'
../../../src/shogun/libshogun.so.17.1: undefined reference to `cblas_dnrm2'
../../../src/shogun/libshogun.so.17.1: undefined reference to `shogun::CMosek::CMosek()'
../../../src/shogun/libshogun.so.17.1: undefined reference to `SZ_BufftoBuffCompress'
../../../src/shogun/libshogun.so.17.1: undefined reference to `cblas_sasum'
../../../src/shogun/libshogun.so.17.1: undefined reference to `cblas_dger'
collect2: error: ld returned 1 exit status
examples/undocumented/libshogun/CMakeFiles/balanced_conditional_probability_tree.dir/build.make:126: recipe for target 'examples/undocumented/libshogun/balanced_conditional_probability_tree' failed
make[2]: *** [examples/undocumented/libshogun/balanced_conditional_probability_tree] Error 1
CMakeFiles/Makefile2:811: recipe for target 'examples/undocumented/libshogun/CMakeFiles/balanced_conditional_probability_tree.dir/all' failed
make[1]: *** [examples/undocumented/libshogun/CMakeFiles/balanced_conditional_probability_tree.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2
[root#2d55f69e8521 build]#
Update
Here is the output from cmake
-- The C compiler identification is GNU 5.1.1
-- The CXX compiler identification is GNU 5.1.1
-- Check for working C compiler: /usr/lib64/ccache/cc
-- Check for working C compiler: /usr/lib64/ccache/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/lib64/ccache/c++
-- Check for working CXX compiler: /usr/lib64/ccache/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found CCache: /usr/bin/ccache
-- Found SWIG: /usr/lib64/ccache/swig (found suitable version "3.0.7", minimum required is "2.0.4")
-- Performing Test _HAS_CXX11_FLAG
-- Performing Test _HAS_CXX11_FLAG - Success
-- Checking C++11 support for "__func__"
-- Checking C++11 support for "__func__": works
-- Checking C++11 support for "atomic"
-- Checking C++11 support for "atomic": works
-- Checking C++11 support for "auto"
-- Checking C++11 support for "auto": works
-- Checking C++11 support for "auto_ret_type"
-- Checking C++11 support for "auto_ret_type": works
-- Checking C++11 support for "class_override_final"
-- Checking C++11 support for "class_override_final": not supported
-- Checking C++11 support for "constexpr"
-- Checking C++11 support for "constexpr": works
-- Checking C++11 support for "cstdint"
-- Checking C++11 support for "cstdint": works
-- Checking C++11 support for "decltype"
-- Checking C++11 support for "decltype": works
-- Checking C++11 support for "initializer_list"
-- Checking C++11 support for "initializer_list": works
-- Checking C++11 support for "lambda"
-- Checking C++11 support for "lambda": works
-- Checking C++11 support for "long_long"
-- Checking C++11 support for "long_long": works
-- Checking C++11 support for "nullptr"
-- Checking C++11 support for "nullptr": works
-- Checking C++11 support for "regex"
-- Checking C++11 support for "regex": works
-- Checking C++11 support for "rvalue-references"
-- Checking C++11 support for "rvalue-references": works
-- Checking C++11 support for "sizeof_member"
-- Checking C++11 support for "sizeof_member": works
-- Checking C++11 support for "static_assert"
-- Checking C++11 support for "static_assert": works
-- Checking C++11 support for "variadic_templates"
-- Checking C++11 support for "variadic_templates": works
-- Looking for C++ include unordered_map
-- Looking for C++ include unordered_map - found
-- Using system's malloc
-- Looking for isfinite
-- Looking for isfinite - not found
-- Looking for isinf
-- Looking for isinf - found
-- Looking for isnan
-- Looking for isnan - found
-- Looking for signgam
-- Looking for signgam - found
-- Looking for fdopen
-- Looking for fdopen - found
-- Looking for log2
-- Looking for log2 - found
-- Looking for powl
-- Looking for powl - found
-- Looking for lgammal
-- Looking for lgammal - found
-- Looking for sqrtl
-- Looking for sqrtl - found
-- Looking for finite
-- Looking for finite - found
-- Looking for isfinite
-- Looking for isfinite - not found
-- Looking for isinf
-- Looking for isinf - found
-- Looking for isnan
-- Looking for isnan - found
-- Performing Test HAVE_STD_ISINF
-- Performing Test HAVE_STD_ISINF - Success
-- Performing Test HAVE_STD_ISFINITE
-- Performing Test HAVE_STD_ISFINITE - Success
-- Performing Test HAVE_STD_ISNAN
-- Performing Test HAVE_STD_ISNAN - Success
-- Looking for xmmintrin.h
-- Looking for xmmintrin.h - found
-- Looking for emmintrin.h
-- Looking for emmintrin.h - found
-- Looking for arc4random
-- Looking for arc4random - not found
-- Found GDB: /usr/bin/gdb
-- Could NOT find MOSEK (missing: MOSEK_DIR MOSEK_INCLUDE_DIR MOSEK_LIBRARY)
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Try OpenMP C flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Try OpenMP CXX flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Found OpenMP: -fopenmp
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.28")
-- Looking for sgemm_
-- Looking for sgemm_ - found
-- A library with BLAS API found.
-- Looking for cheev_
-- Looking for cheev_ - found
-- A library with LAPACK API found.
-- Looking for clapack_dpotrf in /usr/lib64/liblapack.so
-- Looking for clapack_dpotrf in /usr/lib64/liblapack.so - not found
-- Could NOT find ATLAS (missing: ATLAS_LIBRARIES)
-- Found CBLAS: /lib64/libgslcblas.so
-- Looking for cblas_dsyrk in /lib64/libgslcblas.so
-- Looking for cblas_dsyrk in /lib64/libgslcblas.so - found
-- Found GLPK: /lib64/libglpk.so
-- Could NOT find CPLEX (missing: CPLEX_LIBRARY CPLEX_INCLUDE_DIR)
-- Could NOT find OPENCL (missing: OPENCL_LIBRARY OPENCL_INCLUDE_DIR)
-- Could NOT find ViennaCL (missing: VIENNACL_INCLUDE_DIR OPENCL_INCLUDE_DIRS OPENCL_LIBRARIES) (Required is at least version "1.5.0")
-- checking for one of the modules 'libColPack>=1.0.9;ColPack>=1.0.9'
-- Found NLOPT: /usr/lib64/libnlopt_cxx.so
-- Found LPSOLVE: /usr/lib64/liblpsolve55.so
-- Found ColPack: /lib64/libColPack.so
-- Found ARPREC: /lib64/libarprec.so
-- Found Doxygen: /usr/bin/doxygen (found version "1.8.10")
-- Found PythonInterp: /usr/bin/python (found version "2.7.10")
-- checking for one of the modules 'libjson>=0.11;json>=0.11;json-c>=0.11'
-- Found LibXml2: /usr/lib64/libxml2.so (found version "2.9.2")
-- Found HDF5: /usr/local/lib/libhdf5.a (found version "1.8.16")
-- Found CURL: /usr/lib64/libcurl.so (found version "7.43.0")
-- Found ZLIB: /usr/local/lib/libz.a (found version "1.2.8")
-- Found BZip2: /usr/lib64/libbz2.so (found version "1.0.6")
-- Looking for BZ2_bzCompressInit in /usr/lib64/libbz2.so
-- Looking for BZ2_bzCompressInit in /usr/lib64/libbz2.so - found
-- Looking for lzma_auto_decoder in /usr/lib64/liblzma.so
-- Looking for lzma_auto_decoder in /usr/lib64/liblzma.so - found
-- Looking for lzma_easy_encoder in /usr/lib64/liblzma.so
-- Looking for lzma_easy_encoder in /usr/lib64/liblzma.so - found
-- Looking for lzma_lzma_preset in /usr/lib64/liblzma.so
-- Looking for lzma_lzma_preset in /usr/lib64/liblzma.so - found
-- Found LibLZMA: /usr/include (found version "5.2.1")
-- Found SNAPPY: /usr/lib64/libsnappy.so
-- Lzo Library /usr/lib64/liblzo2.so
-- Lzo Include Found in /usr/include
-- Spinlock support found
-- Found PROTOBUF: /usr/lib64/libprotobuf.so
-- Supported backend(s) for linear algebra NOT FOUND/NOT ENABLED
-- Found PythonLibs: /usr/lib64/libpython2.7.so (found version "2.7.10")
-- Found NumPy: version "1.9.2" /usr/lib64/python2.7/site-packages/numpy/core/include
-- ===================================================================================================================
-- Summary of Configuration Variables
--
-- The following OPTIONAL packages have been found:
* CCache
* GDB
* OpenMP
* BLAS
* LAPACK
* CBLAS
* GLPK
* NLopt
* LpSolve
* ColPack
* ARPREC
* Doxygen
* LibXml2
* HDF5
* CURL
* ZLIB
* BZip2
* LibLZMA
* SNAPPY
* LZO
* Spinlock
* Threads
* Protobuf
-- The following REQUIRED packages have been found:
* SWIG (required version >= 2.0.4)
* PythonLibs
* PythonInterp
* NumPy
-- The following OPTIONAL packages have not been found:
* Mosek
* Atlas
* CPLEX
* ARPACK
* ViennaCL (required version >= 1.5.0)
-- The following REQUIRED packages have not been found:
* OpenCL
-- ===================================================================================================================
-- Enabled Integration
-- OpenCV Integration is OFF - enable with -DOpenCV=ON
-- ===================================================================================================================
-- Enabled Interfaces
-- libshogun is ON
-- python modular is ON
-- octave modular is OFF - enable with -DOctaveModular=ON
-- java modular is OFF - enable with -DJavaModular=ON
-- perl modular is OFF - enable with -DPerlModular=ON
-- ruby modular is OFF - enable with -DRubyModular=ON
-- csharp modular is OFF - enable with -DCSharpModular=ON
-- R modular is OFF - enable with -DRModular=ON
-- lua modular is OFF - enable with -DLuaModular=ON
--
-- Enabled legacy interfaces
-- cmdline static is OFF - enable with -DCmdLineStatic=ON
-- python static is OFF - enable with -DPythonStatic=ON
-- octave static is OFF - enable with -DOctaveStatic=ON
-- matlab static is OFF - enable with -DMatlabStatic=ON
-- R static is OFF - enable with -DRStatic=ON
-- ===================================================================================================================
-- To compile shogun type
-- make
--
-- To install shogun to /usr/local type
-- make install
--
-- or to install to a custom directory
-- make install DESTDIR=/my/special/path
-- (or rerun cmake with -DCMAKE_INSTALL_PREFIX=/my/special/path) to just change the prefix
-- ===================================================================================================================
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/shogun/build
Fedora 23, shogun : # dnf install shogun-devel
Provides version 4.0.1-0.1.git20150808.779c3ad.fc23
If you want a "build experience" : The Fedora 23 source package : shogun-4.0.1-0.1.git20150808.779c3ad.fc23.src.rpm → → includes also "gmock-1.7.0.zip".
Unpacking the source in /home/[name]/ : $ rpm -i shogun-4.0.1-0.1.git20150808.779c3ad.fc23.src.rpm
Building the packages : $ cd rpm*/SPECS/ && rpmbuild -bb shogun.spec
You have to install gsl-devel too, it seems that you didn't.
dnf install gsl-devel