PCL 1.8 on MAC OS errors in CMake generated Makefile - macos

I'm trying to get PCL 1.8 (The point cloud library) working on Mac OS 10.9.5, I installed all the dependencies and pcl using brew. My brew list indicates:
$ brew list
autoconf libebml pcl
automake libmatroska pcre
boost libogg pkg-config
cmake libpng qhull
cminpack libtiff qt
eigen libtool readline
expat libusb scons
flann libvorbis sip
fontconfig makedepend sqlite
freetype mkvtoolnix subversion
gettext openni szip
glew openni2 vtk
hdf5 openni2-freenectdriver wxmac
jpeg openssl xz
My cpp and CMakeLists.txt are the same at. After executing the 'cmake ..' command I get several warnings indicating an inclomplete configuration
-- The C compiler identification is Clang 6.0.0
-- The CXX compiler identification is Clang 6.0.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
-- 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
-- checking for module 'eigen3'
-- found eigen3, version 3.2.10
-- Found eigen: /usr/local/Cellar/eigen/3.2.10/include/eigen3
-- Boost version: 1.62.0
-- Found the following Boost libraries:
-- system
-- filesystem
-- thread
-- date_time
-- iostreams
-- serialization
-- checking for module 'libopenni'
-- found libopenni, version 1.5.7.10
-- Found openni: /usr/local/Cellar/openni/1.5.7.10/lib/libOpenNI.dylib
-- checking for module 'libopenni2'
-- package 'libopenni2' not found
-- Found OpenNI2: /usr/local/lib/ni2/libOpenNI2.dylib
-- Could NOT find ensenso (missing: ENSENSO_LIBRARY ENSENSO_INCLUDE_DIR)
** WARNING ** io features related to ensenso will be disabled
-- Could NOT find DAVIDSDK (missing: DAVIDSDK_LIBRARY DAVIDSDK_INCLUDE_DIR)
** WARNING ** io features related to davidSDK will be disabled
-- Could NOT find DSSDK (missing: _DSSDK_LIBRARIES)
** WARNING ** io features related to dssdk will be disabled
** WARNING ** io features related to pcap will be disabled
** WARNING ** io features related to png will be disabled
CMake Error at /usr/local/lib/cmake/vtk-7.0/VTKTargets.cmake:1361 (message):
This file relies on consumers using CMake 2.8.12 or greater.
Call Stack (most recent call first):
/usr/local/lib/cmake/vtk-7.0/VTKConfig.cmake:68 (include)
/Applications/CMake 2.8-11.app/Contents/share/cmake- 2.8/Modules/FindVTK.cmake:73 (find_package)
/usr/local/share/pcl-1.8/PCLConfig.cmake:501 (find_package)
/usr/local/share/pcl-1.8/PCLConfig.cmake:659 (find_VTK)
/usr/local/share/pcl-1.8/PCLConfig.cmake:849 (find_external_library)
CMakeLists.txt:3 (find_package)
-- Configuring incomplete, errors occurred!
Im probably doing something dumb, but I'm stumped. Ideas are welcome.
thanks in advance.

Related

Impossible to link SDL2 library to my cmake compiler on Windows

I'm actualy trying to compile a project on windows with the CMakeList.txt that I used to compile the project on linux.
Unfortunatly when I try to compile with windows powershell, cmake is saying :
cmake . -G "MinGW Makefiles"
-- The C compiler identification is GNU 12.2.0
-- The CXX compiler identification is GNU 12.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/msys64/mingw64/bin/gcc.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/msys64/mingw64/bin/g++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at C:/Program Files/CMake/share/cmake-3.26/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find SDL2_image (missing: SDL2_IMAGE_LIBRARIES)
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.26/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
cmake/FindSDL2_image.cmake:91 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:12 (find_package)
-- Configuring incomplete, errors occurred!
At the first time it didn't scared me cause I know that I have to download every library and link them to the cmake.
After I download every library like this : screenshot of the files
I tried to link them into my cmake,
firstly adding them to my Environment Variables :screenshot
but that didn't work, he always says "impossible to find SDL2_image when its perfectly working on linux with the cmakeFound...
W/E if someone knows how to compile or add a library to cmake on windows it could be insane for me.

How can I make homebrew's cmake to use system clang

OS: MacOS 12.4
Installed cmake with
brew install cmake
cmake version 3.23.3
Installed clang with
xcode-select --install
clang++ version is 13.1.6
Trying to build ccls:
git clone https://github.com/MaskRay/ccls.git
mkdir build && cd build
cmake ..
And getting following output
-- The CXX compiler identification is AppleClang 13.1.6.13160021
-- The C compiler identification is AppleClang 13.1.6.13160021
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Setting build type to 'Release' as none was specified.
CMake Error at CMakeLists.txt:72 (find_package):
By not providing "FindClang.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Clang", but
CMake did not find one.
Could not find a package configuration file provided by "Clang" with any of
the following names:
ClangConfig.cmake
clang-config.cmake
Add the installation prefix of "Clang" to CMAKE_PREFIX_PATH or set
"Clang_DIR" to a directory containing one of the above files. If "Clang"
provides a separate development package or SDK, be sure it has been
installed.
-- Configuring incomplete, errors occurred!
See also "/Users/umed/projects/MaskRay/ccls/build/CMakeFiles/CMakeOutput.log".
See also "/Users/umed/projects/MaskRay/ccls/build/CMakeFiles/CMakeError.log".
Is there anyway to make brew's cmake work with system clang?
The question is not correct. CMake uses the system clang successfully, but it can't find clang libraries required by the project.
The Build manual lists the requirements, one of them is
Clang+LLVM headers and libraries, version >= 7
You get errors because you have not provided that dependency.
brew install llvm#13

CMake cannot find Boost on OS X with brew

I'm trying to use CMake to compile another library and it requires Boost.
I have installed both CMake and Boost using brew on OS X 10.10 Yosemite, but CMake refuses to find it. Boost is located in /usr/local/Cellar/boost/1.55.0_2
I've tried the following:
Setting -DBoost_DIR and -DBOOST_ROOT with the above path
Setting -DBoost_INCLUDE_DIR and -DBOOST_INCLUDEDIR with the above path + /include
Setting any and all of these options in the CMakeLists.txt file
Compiling Boost myself, and pointing the above vars to my own build
Trying out similar solutions to the same problem here, here, and here. The only answer that I found that mentioned brew on OS X was this one, and the same solution did not work for me.
Why is CMake blatantly ignoring my instructions? :(
Edit: CMake output from -DBoost_DEBUG=ON
I found a separate homebrew package of boost-python. With it installed, CMake does find Boost:
brew install boost-python
gives me
> mkdir build ; ( cd build ; cmake .. )
-- The C compiler identification is AppleClang 6.0.0.6000056
-- The CXX compiler identification is AppleClang 6.0.0.6000056
-- 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
-- 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
-- Found PythonInterp: /usr/local/bin/python (found version "2.7.9")
-- Found PythonLibs: /usr/lib/libpython2.7.dylib (found version "2.7.5")
-- Boost version: 1.56.0
-- Found the following Boost libraries:
-- python
-- Configuring done
-- Generating done
(I have problems linking, but that's another story)
I was also having trouble compiling something with C++/Python/Boost/CMake (Specifically, I was trying to build https://github.com/mapillary/OpenSfM).
I was getting an error like this
Linking CXX shared library .../OpenSfM/opensfm/csfm.so
Undefined symbols for architecture x86_64:
"boost::python::instance_holder::deallocate(_object*, void*)", referenced from:
Undefined symbols for architecture x86_64:
"boost::python::instance_holder::deallocate(_object*, void*)", referenced from:
...
Inspired by the above comment, I tried to find this mythical "boost-python", but it didn't exist. Instead, I wound up using homebrew to reinstall normal boost with python.
brew install boost --with-python
That worked. CMake could now find boost and whatever python boost things it needed, and the compilation succeeded.
In my case upgrading both cmake and boost to their newest version solved the problem
brew upgrade boost cmake

Building ( Cmake ) QtGStreamer on Mac OS X

I have a problem with Qt binding for Gstreamer. Im using procedure from README from QtGStreamer package but I get some error while executing cmake command.
Basic info:
Mac OS X v. 10.6.8
GStreamer v. 0.10.36 + dependencies (installed through MacPorts)
Cmake v. 2.8.10 + dependencies (installed through MacPorts)
Boost v. 1.52.0 + dependencies (installed through MacPorts)
Qt v 4.8 (installed through SDK installer)
Sugested build procedure:
$ mkdir build && cd build
$ cmake .. -DCMAKE_INSTALL_PREFIX=/path/to/installation/prefix
$ make
$ make install
Result of cmake:
$ cmake .. -DCMAKE_INSTALL_PREFIX=/tmp1/install
-- The C compiler identification is GNU 4.2.1
-- The CXX compiler identification is GNU 4.2.1
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - yes
-- 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
-- Checking whether CXX compiler has -isysroot
-- Checking whether CXX compiler has -isysroot - yes
-- Checking whether CXX compiler supports OSX deployment target flag
-- Checking whether CXX compiler supports OSX deployment target flag - yes
-- 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
-- Looking for Q_WS_X11
-- Looking for Q_WS_X11 - not found
-- Looking for Q_WS_WIN
-- Looking for Q_WS_WIN - not found
-- Looking for Q_WS_QWS
-- Looking for Q_WS_QWS - not found
-- Looking for Q_WS_MAC
-- Looking for Q_WS_MAC - found
-- Looking for QT_MAC_USE_COCOA
-- Looking for QT_MAC_USE_COCOA - found
-- Found Qt4: /opt/local/bin/qmake (found version "4.8.4")
-- Boost version: 1.52.0
-- Found PkgConfig: /opt/local/bin/pkg-config (found version "0.27.1")
-- checking for module 'gstreamer-0.10'
-- found gstreamer-0.10, version 0.10.36
-- checking for module 'gstreamer-base-0.10'
-- found gstreamer-base-0.10, version 0.10.36
-- Found GSTREAMER_BASE_LIBRARY: /opt/local/lib/libgstbase-0.10.dylib
-- Found GSTREAMER_BASE_INCLUDE_DIR: /Library/Frameworks/GStreamer.framework/Headers/gst/base
-- Found GStreamer: /opt/local/lib/libgstreamer-0.10.dylib (Required is at least version "0.10.33")
-- checking for module 'gstreamer-plugins-base-0.10'
-- package 'gstreamer-plugins-base-0.10' not found
-- checking for module 'gstreamer-app-0.10'
-- package 'gstreamer-app-0.10' not found
-- Could NOT find GSTREAMER_APP_LIBRARY
-- Found GSTREAMER_APP_INCLUDE_DIR: /Library/Frameworks/GStreamer.framework/Headers/gst/app
-- checking for module 'gstreamer-interfaces-0.10'
-- package 'gstreamer-interfaces-0.10' not found
-- Could NOT find GSTREAMER_INTERFACES_LIBRARY
-- Found GSTREAMER_INTERFACES_INCLUDE_DIR: /Library/Frameworks/GStreamer.framework/Headers/gst/interfaces
-- checking for module 'gstreamer-video-0.10'
-- package 'gstreamer-video-0.10' not found
-- Could NOT find GSTREAMER_VIDEO_LIBRARY
-- Found GSTREAMER_VIDEO_INCLUDE_DIR: /Library/Frameworks/GStreamer.framework/Headers/gst/video
-- Could NOT find GStreamerPluginsBase (missing: GSTREAMER_APP_LIBRARY GSTREAMER_INTERFACES_LIBRARY GSTREAMER_VIDEO_LIBRARY) (Required is at least version "0.10.33")
-- checking for module 'glib-2.0'
-- found glib-2.0, version 2.34.3
-- Found GLIB2: /opt/local/lib/libglib-2.0.dylib
-- checking for module 'gobject-2.0'
-- found gobject-2.0, version 2.34.3
-- Found GObject: /Library/Frameworks/GStreamer.framework/Headers/gobject
-- Found OpenGL: /System/Library/Frameworks/OpenGL.framework
-- Could NOT find OpenGLES2 (missing: OPENGLES2_INCLUDE_DIR OPENGLES2_LIBRARY)
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-----------------------------------------------------------------------------
-- The following external packages were located on your system.
-- This installation will have the extra features provided by these packages.
----------------------------------------------------------------------------- * Qt 4 - Required for building everything * QtOpenGL - Required for OpenGL acceleration in qtvideosink and QtGStreamerUi * QtDeclarative - Required for building QML support * Boost - Required for building QtGLib * GStreamer - Required to build QtGStreamer * GStreamer base library - Used for building the qwidgetvideosink element * GLib - Required to build QtGLib * GObject - Required to build QtGLib * OpenGL - Required for OpenGL rendering support in qtvideosink (desktop only)
-----------------------------------------------------------------------------
-- The following OPTIONAL packages could NOT be located on your system.
-- Consider installing them to enable more features from this software.
----------------------------------------------------------------------------- * GStreamer video library (0.10.33 or higher)
Used for building the qwidgetvideosink element * OpenGLES (2.0 or higher)
Required for OpenGLES rendering support in qtvideosink (embedded only) * Doxygen
Used to generate the API documentation
-----------------------------------------------------------------------------
-- The following REQUIRED packages could NOT be located on your system.
-- You must install these packages before continuing.
----------------------------------------------------------------------------- * GStreamer app library (0.10.33 or higher)
Required to build QtGStreamerUtils * GStreamer interfaces library (0.10.33 or higher)
Required to build QtGStreamer
-----------------------------------------------------------------------------
CMake Error at cmake/modules/MacroLogFeature.cmake:141 (MESSAGE): Exiting: Missing Requirements Call Stack (most recent call first): CMakeLists.txt:152 (macro_display_feature_log)
CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: GSTREAMER_APP_LIBRARY (ADVANCED)
linked by target "QtGStreamerUtils" in directory /Users/madman/Downloads/RELEASE-0.10.2/src/QGst GSTREAMER_INTERFACES_LIBRARY (ADVANCED)
linked by target "QtGStreamer" in directory /Users/madman/Downloads/RELEASE-0.10.2/src/QGst
-- Configuring incomplete, errors occurred!
I need this binding to develop an app for playing MJPEG/ASF streams from CCTV cameras. I have tried libvlc already but there is no easy way to capture streams while they are already displayed... GStreamer is the only alternative because it's gonna be cross platform application
I'm fairly new to C++/Qt programming and whole build/compile magic is still little bit confusing for me...
I know there is no simple answer how to build QtGstreamer binding but I'm gonna be very grateful for any help

MAC: missing: ZLIB_INCLUDE_DIR && OPENGL_INCLUDE_DIR

Zlib is supposed to be installed on all mac's by default I'm pretty sure.. But when I run cmake for SFML I get the following errors:
The C compiler identification is Clang 4.1.0
The CXX compiler identification is Clang 4.1.0
Check for working C compiler using: Xcode
Check for working C compiler using: Xcode -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Check for working CXX compiler using: Xcode
Check for working CXX compiler using: Xcode -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Found OpenGL: /System/Library/Frameworks/OpenGL.framework
Found Freetype: /usr/X11R6/lib/libfreetype.dylib (found version "2.4.4")
Found GLEW: /Users/falconmick/Documents/SFML2 src/extlibs/libs-osx/lib/libGLEW.a
Found JPEG: /Users/falconmick/Documents/SFML2 src/extlibs/libs-osx/lib/libjpeg.a
CMake Error at /Applications/CMake 2.8-10.app/Contents/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:97 (message):
Could NOT find ZLIB (missing: ZLIB_INCLUDE_DIR)
Call Stack (most recent call first):
/Applications/CMake 2.8-10.app/Contents/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:291 (_FPHSA_FAILURE_MESSAGE)
/Applications/CMake 2.8-10.app/Contents/share/cmake-2.8/Modules/FindZLIB.cmake:85 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
src/SFML/Graphics/CMakeLists.txt:85 (find_package)
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
OPENGL_INCLUDE_DIR (ADVANCED)
used as include directory in directory /Users/falconmick/Documents/SFML2 src/src/SFML/Window
Configuring incomplete, errors occurred!
Help CMake to locate it by setting ZLIB_INCLUDE_DIR variable. Either run this:
cmake -D ZLIB_INCLUDE_DIR=/path/to/zlib/include .
in your build directory, or set it via GUI.

Resources