Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pcl 1.11.1 #59146

Closed
wants to merge 2 commits into from
Closed

Pcl 1.11.1 #59146

wants to merge 2 commits into from

Conversation

dtrodrigues
Copy link
Member

@dtrodrigues dtrodrigues commented Aug 4, 2020

  • Have you followed the guidelines for contributing?
  • Have you checked that there aren't other open pull requests for the same formula update/change?
  • Have you built your formula locally with brew install --build-from-source <formula>, where <formula> is the name of the formula you're submitting?
  • Is your test running fine brew test <formula>, where <formula> is the name of the formula you're submitting?
  • Does your build pass brew audit --strict <formula> (after doing brew install <formula>)?

cc @SergioRAgostinho, previous attempt at #54706
Shim issue should be resolved by #56273
Should resolve Boost 1.73 issue in #59064

@SMillerDev
Copy link
Member

Please also update the test to catch the boost issues.

@dtrodrigues dtrodrigues force-pushed the pcl-1.11.0 branch 2 times, most recently from 63ee8cc to 73b22b4 Compare August 5, 2020 15:00
@dtrodrigues
Copy link
Member Author

Errors building test program on 10.14 and 10.15:

[ 50%] Building CXX object CMakeFiles/pcd_write.dir/pcd_write.cpp.o
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -DDISABLE_LIBUSB_1_0 -DDISABLE_PCAP -DDISABLE_PNG -Dqh_QHpointer -DvtkRenderingContext2D_AUTOINIT="1(vtkRenderingContextOpenGL2)" -DvtkRenderingCore_AUTOINIT="3(vtkInteractionStyle,vtkRenderingFreeType,vtkRenderingOpenGL2)" -isystem /usr/local/Cellar/vtk/8.2.0_10/include/vtk-8.2 -isystem /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include -isystem /usr/local/include -isystem /usr/local/include/pcl-1.11 -isystem /usr/local/include/eigen3 -Os -w -pipe -march=nehalem -mmacosx-version-min=10.15 -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk  -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -std=gnu++14 -o CMakeFiles/pcd_write.dir/pcd_write.cpp.o -c /tmp/pcl-test-20200805-22232-1lnfre8/pcd_write.cpp
In file included from /tmp/pcl-test-20200805-22232-1lnfre8/pcd_write.cpp:2:
In file included from /usr/local/include/pcl-1.11/pcl/io/pcd_io.h:42:
In file included from /usr/local/include/pcl-1.11/pcl/memory.h:48:
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 /tmp/pcl-test-20200805-22232-1lnfre8/pcd_write.cpp:2:
In file included from /usr/local/include/pcl-1.11/pcl/io/pcd_io.h:42:
In file included from /usr/local/include/pcl-1.11/pcl/memory.h:48:
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:320:9: error: no member named 'isinf' in the global namespace
using ::isinf;
      ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:321:9: error: no member named 'isnan' in the global namespace
using ::isnan;
      ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:322:9: error: no member named 'isnormal' in the global namespace
using ::isnormal;
      ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:323:7: error: no member named 'isgreater' in the global namespace; did you mean '::std::greater'?
using ::isgreater;
      ^~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/functional:731:29: note: '::std::greater' declared here
struct _LIBCPP_TEMPLATE_VIS greater : binary_function<_Tp, _Tp, bool>
                            ^
In file included from /tmp/pcl-test-20200805-22232-1lnfre8/pcd_write.cpp:2:
In file included from /usr/local/include/pcl-1.11/pcl/io/pcd_io.h:42:
In file included from /usr/local/include/pcl-1.11/pcl/memory.h:48:
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:324:7: error: no member named 'isgreaterequal' in the global namespace; did you mean '::std::greater_equal'?
using ::isgreaterequal;
      ^~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/functional:760:29: note: '::std::greater_equal' declared here
struct _LIBCPP_TEMPLATE_VIS greater_equal : binary_function<_Tp, _Tp, bool>
                            ^
In file included from /tmp/pcl-test-20200805-22232-1lnfre8/pcd_write.cpp:2:
In file included from /usr/local/include/pcl-1.11/pcl/io/pcd_io.h:42:
In file included from /usr/local/include/pcl-1.11/pcl/memory.h:48:
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:325:9: error: no member named 'isless' in the global namespace
using ::isless;
      ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:326:9: error: no member named 'islessequal' in the global namespace
using ::islessequal;
      ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:327:9: error: no member named 'islessgreater' in the global namespace
using ::islessgreater;
      ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:328:9: error: no member named 'isunordered' in the global namespace
using ::isunordered;
      ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:329:9: error: no member named 'isunordered' in the global namespace
using ::isunordered;
      ~~^
In file included from /tmp/pcl-test-20200805-22232-1lnfre8/pcd_write.cpp:2:
In file included from /usr/local/include/pcl-1.11/pcl/io/pcd_io.h:42:
In file included from /usr/local/include/pcl-1.11/pcl/memory.h:48:
In file included from /usr/local/include/eigen3/Eigen/Core:371:
/usr/local/include/eigen3/Eigen/src/Core/MathFunctions.h:719:16: error: no member named 'isfinite' in namespace 'std'; did you mean 'finite'?
    using std::isfinite;
          ~~~~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:319:9: note: 'finite' declared here
using ::isfinite;
        ^
In file included from /tmp/pcl-test-20200805-22232-1lnfre8/pcd_write.cpp:2:
In file included from /usr/local/include/pcl-1.11/pcl/io/pcd_io.h:42:
In file included from /usr/local/include/pcl-1.11/pcl/memory.h:48:
In file included from /usr/local/include/eigen3/Eigen/Core:371:
/usr/local/include/eigen3/Eigen/src/Core/MathFunctions.h:734:16: error: no member named 'isinf' in namespace 'std'
    using std::isinf;
          ~~~~~^
/usr/local/include/eigen3/Eigen/src/Core/MathFunctions.h:749:16: error: no member named 'isnan' in namespace 'std'
    using std::isnan;
          ~~~~~^
In file included from /tmp/pcl-test-20200805-22232-1lnfre8/pcd_write.cpp:2:
In file included from /usr/local/include/pcl-1.11/pcl/io/pcd_io.h:43:
/usr/local/include/pcl-1.11/pcl/pcl_macros.h:219:38: error: expected unqualified-id
bool pcl_isnan (T&& x) { return std::isnan (std::forward<T> (x)); }
                                     ^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/math.h:165:5: note: expanded from macro 'isnan'
    ( sizeof(x) == sizeof(float)  ? __inline_isnanf((float)(x))          \
    ^
In file included from /tmp/pcl-test-20200805-22232-1lnfre8/pcd_write.cpp:2:
In file included from /usr/local/include/pcl-1.11/pcl/io/pcd_io.h:43:
/usr/local/include/pcl-1.11/pcl/pcl_macros.h:223:41: error: expected unqualified-id
bool pcl_isfinite (T&& x) { return std::isfinite (std::forward<T> (x)); }
                                        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/math.h:155:5: note: expanded from macro 'isfinite'
    ( sizeof(x) == sizeof(float)  ? __inline_isfinitef((float)(x))       \
    ^
In file included from /tmp/pcl-test-20200805-22232-1lnfre8/pcd_write.cpp:2:
In file included from /usr/local/include/pcl-1.11/pcl/io/pcd_io.h:43:
/usr/local/include/pcl-1.11/pcl/pcl_macros.h:227:38: error: expected unqualified-id
bool pcl_isinf (T&& x) { return std::isinf (std::forward<T> (x)); }

@dtrodrigues dtrodrigues added help wanted Task(s) needing PRs from the community or maintainers test failure CI fails while running the test-do block labels Aug 5, 2020
@SergioRAgostinho
Copy link

PCL's CI has been bitten by this issue a couple of times. In the current CI setup we were forced to settle for command-line tools.
https://github.com/PointCloudLibrary/pcl/blob/84f694372b507e970f8447a84e6f2d787bea9d14/.ci/azure-pipelines/build/macos.yaml#L17

I'm unsure of homebrew's CI infrastructure but keep it in mind.

A juicy list of user reports of the same problem can be found at PointCloudLibrary/pcl#2601

@dtrodrigues
Copy link
Member Author

Including std_cmake_args in the test block does add -DCMAKE_OSX_SYSROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk as a CMake argument , which matches what the Azure pipeline is doing: https://github.com/Homebrew/homebrew-core/pull/59146/checks?check_run_id=949839522#step:6:52 so I'm not completely sure what the difference is.

@SergioRAgostinho
Copy link

SergioRAgostinho commented Aug 7, 2020

@dtrodrigues CMake is not picking up on the command line tools. It's using XCode's Toolchain.
https://github.com/Homebrew/homebrew-core/pull/59146/checks?check_run_id=949839522#step:6:132

My suspicion is that the command line tools are not present in the path you're specifying to CMake.

@dtrodrigues
Copy link
Member Author

This is possibly related to Homebrew/brew#7426 . Looking at a smaller example like the osqp formula, when building, the C compiler is /usr/local/Homebrew/Library/Homebrew/shims/mac/super/clang but when testing, it is /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang. The build environment seems to clear out and explicitly set the path where as test does not.

Compared to #52532, this is a case where we want to use the CLT vs the sdk.

@Bo98 do you have any ideas?

@dtrodrigues dtrodrigues added the maintainer feedback Additional maintainers' opinions may be needed label Aug 7, 2020
@Bo98
Copy link
Member

Bo98 commented Aug 7, 2020

The problematic flag is likely -isystem /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include. This should almost never be done - the compiler is perfectly capable of finding /usr/include itself with the correct -isysroot. The positioning of that flag is elevating it to be near the start of the include search path rather than near the end, which messes up C++ code.

This is likely a problem in a pkg-config file or CMake module of PCL or one of its dependencies.

@dtrodrigues
Copy link
Member Author

I'm not really sure where to go from here. One part that puzzles me is that the library and some executables appear to build successfully during the install stage but the library isn't usable during the test stage.

The currently available Homebrew pcl version doesn't work with the current boost version (1.73) so the software right now is unusable, which isn't great.

Based on the comment from @Bo98, this may be an upstream issue with PCL or one of its dependencies, so we're kind of stuck until that is resolved.

@Bo98
Copy link
Member

Bo98 commented Aug 12, 2020

One part that puzzles me is that the library and some executables appear to build successfully during the install stage but the library isn't usable during the test stage.

It's possibly because of the superenv's heroic work to make a fundamentally broken build somehow work.

Based on the comment from @Bo98, this may be an upstream issue with PCL or one of its dependencies, so we're kind of stuck until that is resolved.

I think it's a VTK bug. I can have a look but it might be a day or two before I manage to.

@kunaltyagi
Copy link
Contributor

Change target to PCL 1.11.1?

@dtrodrigues dtrodrigues changed the title Pcl 1.11.0 Pcl 1.11.1 Aug 15, 2020
Formula/pcl.rb Outdated
Comment on lines 46 to 42
-DBUILD_simulation:BOOL=AUTO_OFF
-DBUILD_simulation:BOOL=OFF
-DWITH_CUDA:BOOL=OFF
-DWITH_DOCS:BOOL=OFF
-DWITH_OPENGL:BOOL=OFF

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might be able to enable these again now. We merged some last minute fixes after realizing that OpenGL is still being shipped in Catalina.

@@ -13,39 +12,34 @@ class Pcl < Formula
sha256 "d14889b636e81d1427a7d0300c028b571ac038e54b3760eba8900a7175d210c1" => :high_sierra
end

depends_on "cmake" => :build
depends_on "cmake" => [:build, :test]
depends_on "pkg-config" => :build
depends_on "boost"
depends_on "cminpack"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is no longer needed

depends_on "pkg-config" => :build
depends_on "boost"
depends_on "cminpack"
depends_on "eigen"
depends_on "flann"
depends_on "glew"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is needed again.

@SergioRAgostinho
Copy link

This is our current CI build pipeline in macos using homebrew.
https://github.com/PointCloudLibrary/pcl/blob/master/.ci/azure-pipelines/build/macos.yaml
You can enable pretty much everything besides examples, global tests and cuda code.

I can submit a PR later against your branch with the changes.

@dtrodrigues
Copy link
Member Author

@SergioRAgostinho do you want to submit a new PR directly against homebrew-core with your desired changes and I can close this one?

@SergioRAgostinho
Copy link

Sure.

This was referenced Aug 30, 2020
@dtrodrigues
Copy link
Member Author

dtrodrigues commented Aug 31, 2020

@Bo98 you were right -- vtk installed by HomeBrew added those include paths:

 $ rg "usr/include"
vtk/8.2.0_10/lib/cmake/vtk-8.2/Modules/vtkpng.cmake
4:set(vtkpng_INCLUDE_DIRS "${VTK_INSTALL_PREFIX}/include/vtk-8.2;@@HOMEBREW_PREFIX@@/include;/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include")

vtk/8.2.0_10/lib/cmake/vtk-8.2/Modules/vtkexpat.cmake
4:set(vtkexpat_INCLUDE_DIRS "${VTK_INSTALL_PREFIX}/include/vtk-8.2;/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include")

vtk/8.2.0_10/lib/cmake/vtk-8.2/Modules/vtkzlib.cmake
4:set(vtkzlib_INCLUDE_DIRS "${VTK_INSTALL_PREFIX}/include/vtk-8.2;/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include")

vtk/8.2.0_10/lib/cmake/vtk-8.2/Modules/vtklibxml2.cmake
4:set(vtklibxml2_INCLUDE_DIRS "${VTK_INSTALL_PREFIX}/include/vtk-8.2;/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/libxml2")

After merging #60380 and rebasing on top of that, this PR should pass CI.

@dtrodrigues dtrodrigues removed help wanted Task(s) needing PRs from the community or maintainers maintainer feedback Additional maintainers' opinions may be needed test failure CI fails while running the test-do block labels Sep 2, 2020
@dtrodrigues
Copy link
Member Author

With the fix for vtk now in place, this should be good to go.

@BrewTestBot
Copy link
Member

🤖 A scheduled task has triggered a merge.

@dtrodrigues dtrodrigues deleted the pcl-1.11.0 branch September 6, 2020 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants