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

Unable to build a project with visp installed using brew #1537

Open
fspindle opened this issue Jan 7, 2025 · 0 comments
Open

Unable to build a project with visp installed using brew #1537

fspindle opened this issue Jan 7, 2025 · 0 comments
Labels

Comments

@fspindle
Copy link
Contributor

fspindle commented Jan 7, 2025

This issue is also reported here.

On my Apple M1Pro running Sequoia 15.2 after brew upgrade && brew reinstall visp I have:

% brew info visp
==> visp: stable 3.6.0 (bottled)
Visual Servoing Platform library
https://visp.inria.fr/
Installed
/opt/homebrew/Cellar/visp/3.6.0_10 (812 files, 11.8MB) *
  Poured from bottle using the formulae.brew.sh API on 2025-01-06 at 18:05:47
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/v/visp.rb
License: GPL-2.0-or-later
==> Dependencies
Build: cmake ✔, pkgconf ✔
Required: eigen ✔, gsl ✔, jpeg-turbo ✔, libdc1394 ✔, libpng ✔, openblas ✔, opencv ✔, pcl ✔, vtk ✔, zbar ✔, boost ✔, flann ✔, glew ✔, libomp ✔, libpcap ✔, qhull ✔, qt ✔
==> Analytics
install: 124 (30 days), 344 (90 days), 2,294 (365 days)
install-on-request: 124 (30 days), 344 (90 days), 2,294 (365 days)
build-error: 2 (30 days)

that brings ViSP CMake material in /opt/homebrew/Cellar/visp/3.6.0_10/lib/cmake/visp (VISPConfig.cmake and ISPModules.cmake).

I have also:

% xcode-select -p
/Library/Developer/CommandLineTools

% ls -als /Library/Developer/CommandLineTools/SDKs/
total 0
0 drwxr-xr-x  7 root  wheel  224 19 déc 16:08 .
0 drwxr-xr-x  5 root  wheel  160 24 jan  2024 ..
0 lrwxr-xr-x  1 root  wheel   14 19 déc 16:07 MacOSX.sdk -> MacOSX15.2.sdk
0 drwxr-xr-x  7 root  wheel  224 19 déc 16:08 MacOSX14.5.sdk
0 lrwxr-xr-x  1 root  wheel   14 19 déc 16:07 MacOSX14.sdk -> MacOSX14.5.sdk
0 drwxr-xr-x  7 root  wheel  224 21 nov 09:05 MacOSX15.2.sdk
0 lrwxr-xr-x  1 root  wheel   14 19 déc 16:06 MacOSX15.sdk -> MacOSX15.2.sdk

Now when I try to build a simple project with
CMakeLists.txt file content:

cmake_minimum_required(VERSION 3.10)

project(test-brew-opencv)

find_package(VISP)
add_executable(test-opencv test-opencv.cpp)
target_include_directories(test-opencv PRIVATE ${VISP_INCLUDE_DIRS})
target_link_libraries(test-opencv ${VISP_LIBRARIES})

and test-opencv.cpp file content:

#include <visp3/core/vpImage.h>
#include <visp3/core/vpImageConvert.h>
#include <visp3/core/vpConvert.h>

int main()
{
  cv::Mat mat(3, 3, CV_8UC1, 10);
  vpImage<unsigned char> I;
  vpImageConvert::convert(mat, I);
  for (unsigned int i = 0; i < mat.rows * mat.cols; ++i) {
    if (I.bitmap[i] != 10) {
      std::cout << "Error in image conversion from opencv to visp" << std::endl;
      return EXIT_FAILURE;
    }
  }

  vpImagePoint ip(10, 20);
  cv::Point2d cv_point2d;
  vpConvert::convertToOpenCV(ip, cv_point2d);

  if ((ip.get_u() != cv_point2d.x) || (ip.get_v() != cv_point2d.y)) {
    std::cout << "Error in point2d conversion from visp to opencv" << std::endl;
    return EXIT_FAILURE;
  }

  std::cout << "Test succeed" << std::endl;
  return EXIT_SUCCESS;
}

I got the following build issues:

% cmake ..
-- The C compiler identification is AppleClang 16.0.0.16000026
-- The CXX compiler identification is AppleClang 16.0.0.16000026
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - 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: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done (0.4s)
-- Generating done (0.0s)
-- Build files have been written to: /Users/fspindle/soft/test/brew/build-avec-brew
(base) fspindle@MAC-03220146 build-avec-brew % make
[ 50%] Building CXX object CMakeFiles/test-opencv.dir/test-opencv.cpp.o
In file included from /Users/fspindle/soft/test/brew/test-opencv.cpp:1:
In file included from /opt/homebrew/include/visp3/core/vpImage.h:42:
In file included from /opt/homebrew/include/visp3/core/vpConfig.h:40:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cstdlib:90:5: error: <cstdlib> tried including <stdlib.h> but didn't find libc++'s <stdlib.h> header.           This usually means that your header search paths are not configured properly.           The header search paths should contain the C++ Standard Library headers before           any C Standard Library, and you are probably using compiler flags that make that           not be the case.
   90 | #   error <cstdlib> tried including <stdlib.h> but didn't find libc++'s <stdlib.h> header. \
      |     ^
In file included from /Users/fspindle/soft/test/brew/test-opencv.cpp:1:
In file included from /opt/homebrew/include/visp3/core/vpImage.h:42:
In file included from /opt/homebrew/include/visp3/core/vpConfig.h:167:
In file included from /opt/homebrew/opt/opencv/include/opencv4/opencv2/opencv.hpp:52:
In file included from /opt/homebrew/opt/opencv/include/opencv4/opencv2/core.hpp:52:
In file included from /opt/homebrew/opt/opencv/include/opencv4/opencv2/core/cvdef.h:185:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/limits:819:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/type_traits:425:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__type_traits/add_pointer.h:17:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__type_traits/remove_reference.h:13:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cstddef:46:5: error: <cstddef> tried including <stddef.h> but didn't find libc++'s <stddef.h> header.           This usually means that your header search paths are not configured properly.           The header search paths should contain the C++ Standard Library headers before           any C Standard Library, and you are probably using compiler flags that make that           not be the case.
   46 | #   error <cstddef> tried including <stddef.h> but didn't find libc++'s <stddef.h> header. \
      |     ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cstddef:59:9: error: no member named 'nullptr_t' in the global namespace
   59 | using ::nullptr_t;
      |       ~~^
In file included from /Users/fspindle/soft/test/brew/test-opencv.cpp:1:
In file included from /opt/homebrew/include/visp3/core/vpImage.h:42:
In file included from /opt/homebrew/include/visp3/core/vpConfig.h:167:
In file included from /opt/homebrew/opt/opencv/include/opencv4/opencv2/opencv.hpp:52:
In file included from /opt/homebrew/opt/opencv/include/opencv4/opencv2/core.hpp:52:
In file included from /opt/homebrew/opt/opencv/include/opencv4/opencv2/core/cvdef.h:185:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/limits:819:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/type_traits:456:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__type_traits/is_compound.h:14:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__type_traits/is_fundamental.h:14:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__type_traits/is_null_pointer.h:26:28: error: use of undeclared identifier 'nullptr_t'; did you mean 'nullptr'?
   26 | struct __is_nullptr_t_impl<nullptr_t> : public true_type {};
      |                            ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__type_traits/is_null_pointer.h:26:28: error: template argument for template type parameter must be a type
   26 | struct __is_nullptr_t_impl<nullptr_t> : public true_type {};
      |                            ^~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__type_traits/is_null_pointer.h:23:17: note: template parameter is declared here
   23 | template <class _Tp>
      |                 ^
In file included from /Users/fspindle/soft/test/brew/test-opencv.cpp:1:
In file included from /opt/homebrew/include/visp3/core/vpImage.h:42:
In file included from /opt/homebrew/include/visp3/core/vpConfig.h:167:
In file included from /opt/homebrew/opt/opencv/include/opencv4/opencv2/opencv.hpp:52:
In file included from /opt/homebrew/opt/opencv/include/opencv4/opencv2/core.hpp:52:
In file included from /opt/homebrew/opt/opencv/include/opencv4/opencv2/core/cvdef.h:185:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/limits:819:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/type_traits:508:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__type_traits/is_trivially_copyable.h:14:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cstdint:149:5: error: <cstdint> tried including <stdint.h> but didn't find libc++'s <stdint.h> header.           This usually means that your header search paths are not configured properly.           The header search paths should contain the C++ Standard Library headers before           any C Standard Library, and you are probably using compiler flags that make that           not be the case.
  149 | #   error <cstdint> tried including <stdint.h> but didn't find libc++'s <stdint.h> header. \
      |     ^
In file included from /Users/fspindle/soft/test/brew/test-opencv.cpp:1:
In file included from /opt/homebrew/include/visp3/core/vpImage.h:42:
In file included from /opt/homebrew/include/visp3/core/vpConfig.h:167:
In file included from /opt/homebrew/opt/opencv/include/opencv4/opencv2/opencv.hpp:52:
In file included from /opt/homebrew/opt/opencv/include/opencv4/opencv2/core.hpp:53:
In file included from /opt/homebrew/opt/opencv/include/opencv4/opencv2/core/base.hpp:55:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/algorithm:1804:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__algorithm/find.h:31:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cwchar:112:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cwctype:54:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cctype:43:5: error: <cctype> tried including <ctype.h> but didn't find libc++'s <ctype.h> header.           This usually means that your header search paths are not configured properly.            The header search paths should contain the C++ Standard Library headers before           any C Standard Library.
   43 | #   error <cctype> tried including <ctype.h> but didn't find libc++'s <ctype.h> header. \
      |     ^
In file included from /Users/fspindle/soft/test/brew/test-opencv.cpp:1:
In file included from /opt/homebrew/include/visp3/core/vpImage.h:42:
In file included from /opt/homebrew/include/visp3/core/vpConfig.h:167:
In file included from /opt/homebrew/opt/opencv/include/opencv4/opencv2/opencv.hpp:52:
In file included from /opt/homebrew/opt/opencv/include/opencv4/opencv2/core.hpp:53:
In file included from /opt/homebrew/opt/opencv/include/opencv4/opencv2/core/base.hpp:55:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/algorithm:1804:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__algorithm/find.h:31:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cwchar:112:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cwctype:59:5: error: <cwctype> tried including <wctype.h> but didn't find libc++'s <wctype.h> header.           This usually means that your header search paths are not configured properly.           The header search paths should contain the C++ Standard Library headers before           any C Standard Library, and you are probably using compiler flags that make that           not be the case.
   59 | #   error <cwctype> tried including <wctype.h> but didn't find libc++'s <wctype.h> header. \
      |     ^
In file included from /Users/fspindle/soft/test/brew/test-opencv.cpp:1:
In file included from /opt/homebrew/include/visp3/core/vpImage.h:42:
In file included from /opt/homebrew/include/visp3/core/vpConfig.h:167:
In file included from /opt/homebrew/opt/opencv/include/opencv4/opencv2/opencv.hpp:52:
In file included from /opt/homebrew/opt/opencv/include/opencv4/opencv2/core.hpp:53:
In file included from /opt/homebrew/opt/opencv/include/opencv4/opencv2/core/base.hpp:55:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/algorithm:1804:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__algorithm/find.h:31:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cwchar:117:5: error: <cwchar> tried including <wchar.h> but didn't find libc++'s <wchar.h> header.           This usually means that your header search paths are not configured properly.           The header search paths should contain the C++ Standard Library headers before           any C Standard Library, and you are probably using compiler flags that make that           not be the case.
  117 | #   error <cwchar> tried including <wchar.h> but didn't find libc++'s <wchar.h> header. \
      |     ^
In file included from /Users/fspindle/soft/test/brew/test-opencv.cpp:1:
In file included from /opt/homebrew/include/visp3/core/vpImage.h:42:
In file included from /opt/homebrew/include/visp3/core/vpConfig.h:167:
In file included from /opt/homebrew/opt/opencv/include/opencv4/opencv2/opencv.hpp:52:
In file included from /opt/homebrew/opt/opencv/include/opencv4/opencv2/core.hpp:53:
In file included from /opt/homebrew/opt/opencv/include/opencv4/opencv2/core/base.hpp:55:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/algorithm:1810:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__algorithm/for_each.h:16:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__ranges/movable_box.h:23:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/optional:187:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__functional/hash.h:28:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cstring:66:5: error: <cstring> tried including <string.h> but didn't find libc++'s <string.h> header.           This usually means that your header search paths are not configured properly.           The header search paths should contain the C++ Standard Library headers before           any C Standard Library, and you are probably using compiler flags that make that           not be the case.
   66 | #   error <cstring> tried including <string.h> but didn't find libc++'s <string.h> header. \
      |     ^
In file included from /Users/fspindle/soft/test/brew/test-opencv.cpp:1:
In file included from /opt/homebrew/include/visp3/core/vpImage.h:42:
In file included from /opt/homebrew/include/visp3/core/vpConfig.h:167:
In file included from /opt/homebrew/opt/opencv/include/opencv4/opencv2/opencv.hpp:52:
In file included from /opt/homebrew/opt/opencv/include/opencv4/opencv2/core.hpp:53:
In file included from /opt/homebrew/opt/opencv/include/opencv4/opencv2/core/base.hpp:55:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/algorithm:1810:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__algorithm/for_each.h:16:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__ranges/movable_box.h:23:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/optional:187:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__functional/hash.h:515:34: error: use of undeclared identifier 'nullptr_t'; did you mean 'nullptr'?
  515 | struct _LIBCPP_TEMPLATE_VIS hash<nullptr_t> : public __unary_function<nullptr_t, size_t> {
      |                                  ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__functional/hash.h:515:34: error: template argument for template type parameter must be a type
  515 | struct _LIBCPP_TEMPLATE_VIS hash<nullptr_t> : public __unary_function<nullptr_t, size_t> {
      |                                  ^~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__functional/hash.h:509:17: note: template parameter is declared here
  509 | template <class _Tp>
      |                 ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__functional/hash.h:515:71: error: use of undeclared identifier 'nullptr_t'; did you mean 'nullptr'?
  515 | struct _LIBCPP_TEMPLATE_VIS hash<nullptr_t> : public __unary_function<nullptr_t, size_t> {
      |                                                                       ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__functional/hash.h:515:71: error: template argument for template type parameter must be a type
  515 | struct _LIBCPP_TEMPLATE_VIS hash<nullptr_t> : public __unary_function<nullptr_t, size_t> {
      |                                                                       ^~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__functional/unary_function.h:45:17: note: template parameter is declared here
   45 | template <class _Arg, class _Result>
      |                 ^
In file included from /Users/fspindle/soft/test/brew/test-opencv.cpp:1:
In file included from /opt/homebrew/include/visp3/core/vpImage.h:42:
In file included from /opt/homebrew/include/visp3/core/vpConfig.h:167:
In file included from /opt/homebrew/opt/opencv/include/opencv4/opencv2/opencv.hpp:52:
In file included from /opt/homebrew/opt/opencv/include/opencv4/opencv2/core.hpp:53:
In file included from /opt/homebrew/opt/opencv/include/opencv4/opencv2/core/base.hpp:55:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/algorithm:1810:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__algorithm/for_each.h:16:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__ranges/movable_box.h:23:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/optional:236:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/compare:145:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__compare/compare_partial_order_fallback.h:13:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__compare/partial_order.h:14:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__compare/weak_order.h:14:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__compare/strong_order.h:20:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:322:5: error: <cmath> tried including <math.h> but didn't find libc++'s <math.h> header.           This usually means that your header search paths are not configured properly.           The header search paths should contain the C++ Standard Library headers before           any C Standard Library, and you are probably using compiler flags that make that           not be the case.
  322 | #   error <cmath> tried including <math.h> but didn't find libc++'s <math.h> header. \
      |     ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:583:15: error: expected unqualified-id
  583 |   return std::isnan(__lcpp_x);
      |               ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/math.h:166:5: note: expanded from macro 'isnan'
  166 |     ( sizeof(x) == sizeof(float)  ? __inline_isnanf((float)(x))          \
      |     ^
In file included from /Users/fspindle/soft/test/brew/test-opencv.cpp:1:
In file included from /opt/homebrew/include/visp3/core/vpImage.h:42:
In file included from /opt/homebrew/include/visp3/core/vpConfig.h:167:
In file included from /opt/homebrew/opt/opencv/include/opencv4/opencv2/opencv.hpp:52:
In file included from /opt/homebrew/opt/opencv/include/opencv4/opencv2/core.hpp:53:
In file included from /opt/homebrew/opt/opencv/include/opencv4/opencv2/core/base.hpp:55:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/algorithm:1810:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__algorithm/for_each.h:16:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__ranges/movable_box.h:23:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/optional:236:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/compare:145:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__compare/compare_partial_order_fallback.h:13:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__compare/partial_order.h:14:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__compare/weak_order.h:14:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__compare/strong_order.h:20:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:582:46: error: no return statement in constexpr function
  582 | _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool __constexpr_isnan(_A1 __lcpp_x) _NOEXCEPT {
      |                                              ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:597:15: error: expected unqualified-id
  597 |   return std::isinf(__lcpp_x);
      |               ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/math.h:161:5: note: expanded from macro 'isinf'
  161 |     ( sizeof(x) == sizeof(float)  ? __inline_isinff((float)(x))          \
      |     ^
In file included from /Users/fspindle/soft/test/brew/test-opencv.cpp:1:
In file included from /opt/homebrew/include/visp3/core/vpImage.h:42:
In file included from /opt/homebrew/include/visp3/core/vpConfig.h:167:
In file included from /opt/homebrew/opt/opencv/include/opencv4/opencv2/opencv.hpp:52:
In file included from /opt/homebrew/opt/opencv/include/opencv4/opencv2/core.hpp:53:
In file included from /opt/homebrew/opt/opencv/include/opencv4/opencv2/core/base.hpp:55:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/algorithm:1810:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__algorithm/for_each.h:16:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__ranges/movable_box.h:23:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/optional:236:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/compare:145:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__compare/compare_partial_order_fallback.h:13:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__compare/partial_order.h:14:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__compare/weak_order.h:14:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__compare/strong_order.h:20:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:596:46: error: no return statement in constexpr function
  596 | _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool __constexpr_isinf(_A1 __lcpp_x) _NOEXCEPT {
      |                                              ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[2]: *** [CMakeFiles/test-opencv.dir/test-opencv.cpp.o] Error 1
make[1]: *** [CMakeFiles/test-opencv.dir/all] Error 2
make: *** [all] Error 2

I found that in VISPConfig.cmake and VISPModules.cmake there are references to MacOSX14.sdk.

The fix I found is to replace in these 2 files MacOSX14.sdk by MacOSX15.sdk.

% cmake ../
-- Configuring done (0.0s)
-- Generating done (0.0s)
-- Build files have been written to: /Users/soft/test/brew/build-avec-brew

(base) fspindle@MAC-03220146 build-avec-brew % make
[ 50%] Building CXX object CMakeFiles/test-opencv.dir/test-opencv.cpp.o
[100%] Linking CXX executable test-opencv
[100%] Built target test-opencv

I don't know if this is something that comes from the way visp bottle is build or if this is related on how visp exports the 3rdparties in VISPConfig.cmake and VISPModules.cmake?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant