Closed hect1995 closed 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
.
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:
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
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.
Describe the bug
I am using PCL 1.9.1 in a project and when I build the project I get:
Then, if I try to
make
I get some sort of problems withcmath
but the origin of the problems looks like is PCL Context I am using PCL installed from HomebrewThe CMake of my project looks like this:
Your Environment (please complete the following information):