PointCloudLibrary / pcl

Point Cloud Library (PCL)
https://pointclouds.org/
Other
10.04k stars 4.62k forks source link

Build fails in MacOS #4045

Closed hect1995 closed 4 years ago

hect1995 commented 4 years ago

Describe the bug

I am using PCL 1.9.1 in a project and when I build the project I get:

MacBook-Pro-de-Hector-2:build hectoresteban$ cmake ..
-- Eigen found (include: /usr/local/include/eigen3, version: 3.3.7)
-- FLANN found (include: /usr/local/Cellar/flann/1.9.1_9/include, lib: flann;flann_cpp)
-- FLANN found (include: /usr/local/Cellar/flann/1.9.1_9/include, lib: flann;flann_cpp)
** WARNING ** io features related to pcap will be disabled
** WARNING ** io features related to png will be disabled
CMake Warning (dev) at /usr/local/Cellar/cmake/3.17.0/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:272 (message):
  The package name passed to `find_package_handle_standard_args` (libusb-1.0)
  does not match the name of the calling package (PCL).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /usr/local/share/pcl-1.9/PCLConfig.cmake:287 (find_package_handle_standard_args)
  /usr/local/share/pcl-1.9/PCLConfig.cmake:332 (find_libusb)
  /usr/local/share/pcl-1.9/PCLConfig.cmake:542 (find_external_library)
  CMakeLists.txt:10 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

** WARNING ** io features related to libusb-1.0 will be disabled
-- QHULL found (include: /usr/local/include, lib: optimized;/usr/local/lib/libqhull_p.dylib;debug;/usr/local/lib/libqhull_p.dylib)
-- Found Glew: GLEW;-framework Cocoa
-- looking for PCL_COMMON
CMake Warning (dev) at /usr/local/Cellar/cmake/3.17.0/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:272 (message):
  The package name passed to `find_package_handle_standard_args` (PCL_COMMON)
  does not match the name of the calling package (PCL).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /usr/local/share/pcl-1.9/PCLConfig.cmake:610 (find_package_handle_standard_args)
  CMakeLists.txt:10 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- looking for PCL_KDTREE
CMake Warning (dev) at /usr/local/Cellar/cmake/3.17.0/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:272 (message):
  The package name passed to `find_package_handle_standard_args` (PCL_KDTREE)
  does not match the name of the calling package (PCL).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /usr/local/share/pcl-1.9/PCLConfig.cmake:610 (find_package_handle_standard_args)
  CMakeLists.txt:10 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- looking for PCL_OCTREE
CMake Warning (dev) at /usr/local/Cellar/cmake/3.17.0/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:272 (message):
  The package name passed to `find_package_handle_standard_args` (PCL_OCTREE)
  does not match the name of the calling package (PCL).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /usr/local/share/pcl-1.9/PCLConfig.cmake:610 (find_package_handle_standard_args)
  CMakeLists.txt:10 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- looking for PCL_SEARCH
CMake Warning (dev) at /usr/local/Cellar/cmake/3.17.0/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:272 (message):
  The package name passed to `find_package_handle_standard_args` (PCL_SEARCH)
  does not match the name of the calling package (PCL).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /usr/local/share/pcl-1.9/PCLConfig.cmake:610 (find_package_handle_standard_args)
  CMakeLists.txt:10 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- looking for PCL_SAMPLE_CONSENSUS
CMake Warning (dev) at /usr/local/Cellar/cmake/3.17.0/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:272 (message):
  The package name passed to `find_package_handle_standard_args`
  (PCL_SAMPLE_CONSENSUS) does not match the name of the calling package
  (PCL).  This can lead to problems in calling code that expects
  `find_package` result variables (e.g., `_FOUND`) to follow a certain
  pattern.
Call Stack (most recent call first):
  /usr/local/share/pcl-1.9/PCLConfig.cmake:610 (find_package_handle_standard_args)
  CMakeLists.txt:10 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- looking for PCL_FILTERS
CMake Warning (dev) at /usr/local/Cellar/cmake/3.17.0/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:272 (message):
  The package name passed to `find_package_handle_standard_args`
  (PCL_FILTERS) does not match the name of the calling package (PCL).  This
  can lead to problems in calling code that expects `find_package` result
  variables (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /usr/local/share/pcl-1.9/PCLConfig.cmake:610 (find_package_handle_standard_args)
  CMakeLists.txt:10 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- looking for PCL_2D
CMake Warning (dev) at /usr/local/Cellar/cmake/3.17.0/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:272 (message):
  The package name passed to `find_package_handle_standard_args` (PCL_2D)
  does not match the name of the calling package (PCL).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /usr/local/share/pcl-1.9/PCLConfig.cmake:613 (find_package_handle_standard_args)
  CMakeLists.txt:10 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- looking for PCL_GEOMETRY
CMake Warning (dev) at /usr/local/Cellar/cmake/3.17.0/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:272 (message):
  The package name passed to `find_package_handle_standard_args`
  (PCL_GEOMETRY) does not match the name of the calling package (PCL).  This
  can lead to problems in calling code that expects `find_package` result
  variables (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /usr/local/share/pcl-1.9/PCLConfig.cmake:613 (find_package_handle_standard_args)
  CMakeLists.txt:10 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- looking for PCL_IO
CMake Warning (dev) at /usr/local/Cellar/cmake/3.17.0/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:272 (message):
  The package name passed to `find_package_handle_standard_args` (PCL_IO)
  does not match the name of the calling package (PCL).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /usr/local/share/pcl-1.9/PCLConfig.cmake:610 (find_package_handle_standard_args)
  CMakeLists.txt:10 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- looking for PCL_FEATURES
CMake Warning (dev) at /usr/local/Cellar/cmake/3.17.0/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:272 (message):
  The package name passed to `find_package_handle_standard_args`
  (PCL_FEATURES) does not match the name of the calling package (PCL).  This
  can lead to problems in calling code that expects `find_package` result
  variables (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /usr/local/share/pcl-1.9/PCLConfig.cmake:610 (find_package_handle_standard_args)
  CMakeLists.txt:10 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- looking for PCL_ML
CMake Warning (dev) at /usr/local/Cellar/cmake/3.17.0/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:272 (message):
  The package name passed to `find_package_handle_standard_args` (PCL_ML)
  does not match the name of the calling package (PCL).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /usr/local/share/pcl-1.9/PCLConfig.cmake:610 (find_package_handle_standard_args)
  CMakeLists.txt:10 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- looking for PCL_SEGMENTATION
CMake Warning (dev) at /usr/local/Cellar/cmake/3.17.0/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:272 (message):
  The package name passed to `find_package_handle_standard_args`
  (PCL_SEGMENTATION) does not match the name of the calling package (PCL).
  This can lead to problems in calling code that expects `find_package`
  result variables (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /usr/local/share/pcl-1.9/PCLConfig.cmake:610 (find_package_handle_standard_args)
  CMakeLists.txt:10 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- looking for PCL_VISUALIZATION
CMake Warning (dev) at /usr/local/Cellar/cmake/3.17.0/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:272 (message):
  The package name passed to `find_package_handle_standard_args`
  (PCL_VISUALIZATION) does not match the name of the calling package (PCL).
  This can lead to problems in calling code that expects `find_package`
  result variables (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /usr/local/share/pcl-1.9/PCLConfig.cmake:610 (find_package_handle_standard_args)
  CMakeLists.txt:10 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- looking for PCL_SURFACE
CMake Warning (dev) at /usr/local/Cellar/cmake/3.17.0/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:272 (message):
  The package name passed to `find_package_handle_standard_args`
  (PCL_SURFACE) does not match the name of the calling package (PCL).  This
  can lead to problems in calling code that expects `find_package` result
  variables (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /usr/local/share/pcl-1.9/PCLConfig.cmake:610 (find_package_handle_standard_args)
  CMakeLists.txt:10 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- looking for PCL_REGISTRATION
CMake Warning (dev) at /usr/local/Cellar/cmake/3.17.0/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:272 (message):
  The package name passed to `find_package_handle_standard_args`
  (PCL_REGISTRATION) does not match the name of the calling package (PCL).
  This can lead to problems in calling code that expects `find_package`
  result variables (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /usr/local/share/pcl-1.9/PCLConfig.cmake:610 (find_package_handle_standard_args)
  CMakeLists.txt:10 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- looking for PCL_KEYPOINTS
CMake Warning (dev) at /usr/local/Cellar/cmake/3.17.0/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:272 (message):
  The package name passed to `find_package_handle_standard_args`
  (PCL_KEYPOINTS) does not match the name of the calling package (PCL).  This
  can lead to problems in calling code that expects `find_package` result
  variables (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /usr/local/share/pcl-1.9/PCLConfig.cmake:610 (find_package_handle_standard_args)
  CMakeLists.txt:10 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- looking for PCL_TRACKING
CMake Warning (dev) at /usr/local/Cellar/cmake/3.17.0/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:272 (message):
  The package name passed to `find_package_handle_standard_args`
  (PCL_TRACKING) does not match the name of the calling package (PCL).  This
  can lead to problems in calling code that expects `find_package` result
  variables (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /usr/local/share/pcl-1.9/PCLConfig.cmake:610 (find_package_handle_standard_args)
  CMakeLists.txt:10 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- looking for PCL_RECOGNITION
CMake Warning (dev) at /usr/local/Cellar/cmake/3.17.0/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:272 (message):
  The package name passed to `find_package_handle_standard_args`
  (PCL_RECOGNITION) does not match the name of the calling package (PCL).
  This can lead to problems in calling code that expects `find_package`
  result variables (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /usr/local/share/pcl-1.9/PCLConfig.cmake:610 (find_package_handle_standard_args)
  CMakeLists.txt:10 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- looking for PCL_STEREO
CMake Warning (dev) at /usr/local/Cellar/cmake/3.17.0/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:272 (message):
  The package name passed to `find_package_handle_standard_args` (PCL_STEREO)
  does not match the name of the calling package (PCL).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /usr/local/share/pcl-1.9/PCLConfig.cmake:610 (find_package_handle_standard_args)
  CMakeLists.txt:10 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- looking for PCL_APPS
CMake Warning (dev) at /usr/local/Cellar/cmake/3.17.0/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:272 (message):
  The package name passed to `find_package_handle_standard_args` (PCL_APPS)
  does not match the name of the calling package (PCL).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /usr/local/share/pcl-1.9/PCLConfig.cmake:610 (find_package_handle_standard_args)
  CMakeLists.txt:10 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- looking for PCL_OUTOFCORE
CMake Warning (dev) at /usr/local/Cellar/cmake/3.17.0/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:272 (message):
  The package name passed to `find_package_handle_standard_args`
  (PCL_OUTOFCORE) does not match the name of the calling package (PCL).  This
  can lead to problems in calling code that expects `find_package` result
  variables (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /usr/local/share/pcl-1.9/PCLConfig.cmake:610 (find_package_handle_standard_args)
  CMakeLists.txt:10 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- looking for PCL_PEOPLE
CMake Warning (dev) at /usr/local/Cellar/cmake/3.17.0/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:272 (message):
  The package name passed to `find_package_handle_standard_args` (PCL_PEOPLE)
  does not match the name of the calling package (PCL).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /usr/local/share/pcl-1.9/PCLConfig.cmake:610 (find_package_handle_standard_args)
  CMakeLists.txt:10 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- looking for PCL_SIMULATION
CMake Warning (dev) at /usr/local/Cellar/cmake/3.17.0/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:272 (message):
  The package name passed to `find_package_handle_standard_args`
  (PCL_SIMULATION) does not match the name of the calling package (PCL).
  This can lead to problems in calling code that expects `find_package`
  result variables (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /usr/local/share/pcl-1.9/PCLConfig.cmake:610 (find_package_handle_standard_args)
  CMakeLists.txt:10 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found PCL: pcl_common;pcl_kdtree;pcl_octree;pcl_search;pcl_sample_consensus;pcl_filters;pcl_io;pcl_features;pcl_ml;pcl_segmentation;pcl_visualization;pcl_surface;pcl_registration;pcl_keypoints;pcl_tracking;pcl_recognition;pcl_stereo;pcl_apps;pcl_outofcore;pcl_people;pcl_simulation;/usr/local/lib/libboost_system-mt.dylib;/usr/local/lib/libboost_filesystem-mt.dylib;/usr/local/lib/libboost_thread-mt.dylib;/usr/local/lib/libboost_date_time-mt.dylib;/usr/local/lib/libboost_iostreams-mt.dylib;/usr/local/lib/libboost_chrono-mt.dylib;/usr/local/lib/libboost_atomic-mt.dylib;/usr/local/lib/libboost_regex-mt.dylib;optimized;/usr/local/lib/libqhull_p.dylib;debug;/usr/local/lib/libqhull_p.dylib;flann;flann_cpp;vtksys;vtkCommonCore;vtkCommonMath;vtkCommonMisc;vtkCommonSystem;vtkCommonTransforms;vtkCommonDataModel;vtkCommonColor;vtkCommonExecutionModel;vtkCommonComputationalGeometry;vtkFiltersCore;vtkFiltersGeneral;vtkImagingCore;vtkImagingFourier;vtkFiltersStatistics;vtkFiltersExtraction;vtkInfovisCore;vtkFiltersGeometry;vtkFiltersSources;vtkRenderingCore;/usr/lib/libz.dylib;vtkfreetype;vtkRenderingFreeType;vtkRenderingContext2D;vtkChartsCore;vtkDICOMParser;vtkdoubleconversion;vtklz4;vtklzma;vtkIOCore;vtkIOLegacy;/usr/lib/libexpat.dylib;vtkIOXMLParser;vtkDomainsChemistry;vtkglew;vtkRenderingOpenGL2;vtkDomainsChemistryOpenGL2;vtkIOXML;vtkParallelCore;vtkFiltersAMR;vtkFiltersFlowPaths;vtkFiltersGeneric;vtkImagingSources;vtkFiltersHybrid;vtkFiltersHyperTree;vtkImagingGeneral;vtkFiltersImaging;vtkFiltersModeling;vtkFiltersParallel;vtkFiltersParallelImaging;vtkFiltersPoints;vtkFiltersProgrammable;/usr/local/opt/python@3.8/Frameworks/Python.framework/Versions/3.8/lib/libpython3.8.dylib;vtkPythonInterpreter;vtkWrappingTools;vtkWrappingPythonCore;vtkFiltersPython;vtkFiltersSMP;vtkFiltersSelection;vtkFiltersTexture;vtkFiltersTopology;verdict;vtkFiltersVerdict;vtkInteractionStyle;vtkGUISupportQt;vtksqlite;vtkIOSQL;vtkGUISupportQtSQL;vtkmetaio;/usr/local/lib/libjpeg.dylib;/usr/local/lib/libpng.dylib;/usr/local/lib/libtiff.dylib;vtkIOImage;vtkImagingHybrid;vtkInfovisLayout;vtkImagingColor;vtkRenderingAnnotation;vtkRenderingVolume;vtkInteractionWidgets;vtkViewsCore;vtklibproj;vtkGeovisCore;/usr/local/lib/libhdf5.dylib;/usr/local/lib/libsz.dylib;/usr/lib/libdl.dylib;/usr/lib/libm.dylib;/usr/local/lib/libhdf5_hl.dylib;vtkIOAMR;vtkIOAsynchronous;vtkpugixml;vtkIOCityGML;vtkIOEnSight;/usr/local/lib/libnetcdf.dylib;vtkexodusII;vtkIOExodus;vtkgl2ps;vtkRenderingGL2PSOpenGL2;vtkIOExport;vtkIOExportOpenGL2;vtklibharu;vtkIOExportPDF;vtkIOGeometry;vtkIOImport;/usr/lib/libxml2.dylib;vtkIOInfovis;vtkIOLSDyna;vtkIOMINC;vtkogg;vtktheora;vtkIOMovie;vtkIONetCDF;vtkIOPLY;vtkjsoncpp;vtkIOParallel;vtkIOParallelXML;vtkIOSegY;vtkIOTecplotTable;vtkIOVeraOut;vtkIOVideo;vtkImagingMath;vtkImagingMorphological;vtkImagingStatistics;vtkImagingStencil;vtkInfovisBoostGraphAlgorithms;vtkInteractionImage;vtkPythonContext2D;vtkRenderingContextOpenGL2;vtkRenderingFreeTypeFontConfig;vtkRenderingImage;vtkRenderingLOD;vtkRenderingLabel;vtkRenderingQt;vtkRenderingVolumeOpenGL2;vtkViewsContext2D;vtkViewsInfovis;vtkViewsQt (Required is at least version "1.9.1") 
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/hectoresteban/Documents/C++/SensorFusion/SFND_Lidar_Obstacle_Detection/build

Then, if I try to make I get some sort of problems with cmath but the origin of the problems looks like is PCL Context I am using PCL installed from Homebrew

MacBook-Pro-de-Hector-2:build hectoresteban$ brew info pcl
pcl: stable 1.9.1 (bottled), HEAD
Library for 2D/3D image and point cloud processing
http://www.pointclouds.org/
/usr/local/Cellar/pcl/1.9.1_8 (1,173 files, 147.3MB) *
  Poured from bottle on 2020-05-05 at 17:04:44
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/pcl.rb
==> Dependencies
Build: cmake ✘, pkg-config ✘
Required: boost ✔, cminpack ✔, eigen ✔, flann ✔, glew ✔, libusb ✔, qhull ✔, vtk ✔
==> Options
--HEAD
    Install HEAD version
==> Analytics
install: 1,043 (30 days), 2,502 (90 days), 7,735 (365 days)
install-on-request: 899 (30 days), 2,172 (90 days), 6,501 (365 days)
build-error: 0 (30 days)**Expected behavior**

The CMake of my project looks like this:

cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
add_definitions(-std=c++11)
set(CXX_FLAGS "-Wall")
set(CMAKE_CXX_FLAGS, "${CXX_FLAGS}")
project(playback)
find_package(PCL 1.9.1 REQUIRED)
include_directories(${PCL_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})
list(REMOVE_ITEM PCL_LIBRARIES "vtkproj4")
add_executable (environment src/environment.cpp src/render/render.cpp src/processPointClouds.cpp)
target_link_libraries (environment ${PCL_LIBRARIES})

Your Environment (please complete the following information):

SergioRAgostinho commented 4 years ago

Invoking CMake is just producing warnings not errors and our CI builds PCL for Catalina. We also had issues related to cmath in our CI which we fixed by explicitly setting the toolkit.

https://github.com/PointCloudLibrary/pcl/pull/3977/files#diff-b7be7a594043e3523e0518460c01bd50 Notice the we explicitly set CMAKE_OSX_SYSROOT.

hect1995 commented 4 years ago

Thanks a lot @SergioRAgostinho . I added: set(CMAKE_OSX_SYSROOT, "/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk") To my CMake file but still get the same. Do you know what might be happening? My previous and actual error:

MacBook-Pro-de-Hector-2:build hectoresteban$ make
Scanning dependencies of target environment
[ 25%] Building CXX object CMakeFiles/environment.dir/src/environment.cpp.o
In file included from /Users/hectoresteban/Documents/C++/SensorFusion/SFND_Lidar_Obstacle_Detection/src/environment.cpp:5:
In file included from /Users/hectoresteban/Documents/C++/SensorFusion/SFND_Lidar_Obstacle_Detection/src/sensors/lidar.h:3:
In file included from /Users/hectoresteban/Documents/C++/SensorFusion/SFND_Lidar_Obstacle_Detection/src/sensors/../render/render.h:7:
In file included from /usr/local/include/pcl-1.9/pcl/visualization/pcl_visualizer.h:42:
In file included from /usr/local/include/pcl-1.9/pcl/correspondence.h:46:
In file included from /usr/local/include/eigen3/Eigen/StdVector:14:
In file included from /usr/local/include/eigen3/Eigen/Core:96:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/complex:245:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:317:9: error: no member named 'signbit' in the global namespace
using ::signbit;
      ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:318:9: error: no member named 'fpclassify' in the global namespace
using ::fpclassify;
      ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:319:9: error: no member named 'isfinite' in the global namespace; did you mean 'finite'?
using ::isfinite;
      ~~^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/math.h:749:12: note: 'finite' declared here
extern int finite(double)
           ^
In file included from /Users/hectoresteban/Documents/C++/SensorFusion/SFND_Lidar_Obstacle_Detection/src/environment.cpp:5:
In file included from /Users/hectoresteban/Documents/C++/SensorFusion/SFND_Lidar_Obstacle_Detection/src/sensors/lidar.h:3:
In file included from /Users/hectoresteban/Documents/C++/SensorFusion/SFND_Lidar_Obstacle_Detection/src/sensors/../render/render.h:7:
In file included from /usr/local/include/pcl-1.9/pcl/visualization/pcl_visualizer.h:42:
In file included from /usr/local/include/pcl-1.9/pcl/correspondence.h:46:
In file included from /usr/local/include/eigen3/Eigen/StdVector:14:
In file included from /usr/local/include/eigen3/Eigen/Core:96:
hect1995 commented 4 years ago

For the future if people accounts this problem. I solved it doing: Using #include</Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/math.h> instead of <math.h> in /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cmath I got the answer from: https://stackoverflow.com/questions/58628377/catalina-c-using-cmath-headers-yield-error-no-member-named-signbit-in-th

Not the cleanest way and if you have a better way I would be much appreciated it. It looks like there is a conflic between two cmath.h located one in XCode and the other one in global

SergioRAgostinho commented 4 years ago

It really depends on which toolkit you have installed in your system. Notice that before our CI was setting /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk and you appear to be using XCode, so this might be the one for you.