ycm-cmake-modules icon indicating copy to clipboard operation
ycm-cmake-modules copied to clipboard

FindPortAudio make CMake fail with homebrew-installed portaudio on macOS with CMake 3.18.1

Open traversaro opened this issue 5 years ago • 1 comments

In https://github.com/robotology/idyntree/pull/725 I bumped the YCM used by iDynTree's CI jobs from 0.11.0 to 0.11.1 (as Eigen's Bitbucket repo is finally down) and on macOs I now encounter this error when YARP calls find_package(PortAudio QUIET) (it is not only that PortAudio is not found, but CMake exists directly):

CMake Error at /usr/local/Cellar/cmake/3.18.1/share/cmake/Modules/SelectLibraryConfigurations.cmake:71 (set):
-- Configuring incomplete, errors occurred!
See also "/Users/runner/work/idyntree/idyntree/ycm/build/yarp/build/CMakeFiles/CMakeOutput.log".
See also "/Users/runner/work/idyntree/idyntree/ycm/build/yarp/build/CMakeFiles/CMakeError.log".
  Syntax error in cmake code at

    /usr/local/Cellar/cmake/3.18.1/share/cmake/Modules/SelectLibraryConfigurations.cmake:71

  when parsing string

    ${PortAudio_-FRAMEWORK COREAUDIO_LIBRARY}

  Invalid character (' ') in a variable name: 'PortAudio_-FRAMEWORK'
Call Stack (most recent call first):
  /Users/runner/work/idyntree/idyntree/install/deps/share/YCM/modules/StandardFindModule.cmake:153 (select_library_configurations)
  /Users/runner/work/idyntree/idyntree/install/deps/share/YCM/find-modules/FindPortAudio.cmake:31 (standard_find_module)
  cmake/YarpFindDependencies.cmake:365 (find_package)
  CMakeLists.txt:57 (include)

As with YCM 0.11.0 5 days before the failure everything was working fine with CMake 3.18.1 and the portaudio version in homebrew did not changed for a long time, I guess there is something that changed either from YCM 0.11.0 to 0.11.1, or in the GitHub Actions macOS image.

A workaround to this problem is to uninstall portaudio from the system. On the iDynTree's CI, portaudio was installed as it is a dependency of octave.

traversaro avatar Aug 22 '20 13:08 traversaro

A workaround to this problem is to uninstall portaudio from the system. On the iDynTree's CI, portaudio was installed as it is a dependency of octave.

A workaround for this was implemented in https://github.com/robotology/idyntree/pull/725 .

traversaro avatar Aug 22 '20 13:08 traversaro