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

Add portaudio dependency and enable audio-related devices in YARP #499

Merged
merged 6 commits into from
Oct 27, 2020

Conversation

traversaro
Copy link
Member

This PR add the dependency on portaudio on Linux, macOS and Windows, and enable by default the compilation of the YARP devices related to audio. Fix #284 .

@traversaro
Copy link
Member Author

For the members of iCub Tech's Team Code, this PR will mean that from 2020.11 the audio support of YARP should also be directly available in robot-bazaar's Docker images. @vtikha @AlexAntn @ilaria-carlini

@traversaro
Copy link
Member Author

Note that this PR may fail for Windows/Unstable as robotology/ycm-cmake-modules#357 still needs to be propagated to the master branch of ycm, but for that we just need to wait one day.

@traversaro
Copy link
Member Author

There are a few open problems.

The Windows compilation is still failing, mainly because we were still using YCM 0.11 as a stable branch, this was fixed in 9e1fb78 .

Other problems include:

macOS

On macOS, the configuration fails with:

CMake Error at /usr/local/Cellar/cmake/3.18.4/share/cmake/Modules/SelectLibraryConfigurations.cmake:71 (set):
  Syntax error in cmake code at

    /usr/local/Cellar/cmake/3.18.4/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/robotology-superbuild/robotology-superbuild/build/install/share/YCM/modules/StandardFindModule.cmake:153 (select_library_configurations)
  /Users/runner/work/robotology-superbuild/robotology-superbuild/build/install/share/YCM/find-modules/FindPortAudio.cmake:31 (standard_find_module)
  cmake/YarpFindDependencies.cmake:379 (find_package)
  CMakeLists.txt:61 (include)

Releases

The currently tested release (2020.05 and 2020.08) will be broken as they will not have the necessary fixes in their YCM version. As the 2020.11 release is fast approaching, I think we can simply drop these releases from the master branch CIs (anyone that uses them can simply use the related tags) and add the 2020.11 release instead.

@traversaro
Copy link
Member Author

The macOS problem is due to the fact that portaudio-2.0 pkg-config file structure is:

Mac-1603138180646:build runner$ cat /usr/local/lib/pkgconfig/portaudio-2.0.pc
prefix=/usr/local/Cellar/portaudio/19.6.0
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: PortAudio
Description: Portable audio I/O
Requires:
Version: 19

Libs: -L${libdir} -lportaudio -framework CoreAudio -framework AudioToolbox -framework AudioUnit -framework Carbon
Cflags: -I${includedir}
Mac-1603138180646:build runner$

and probably the YCM's standard_find_module is not able to deal with the -framework options passed as part of Libs.

traversaro added a commit that referenced this pull request Oct 20, 2020
The rationale is that old releases will be broken by the enabling of portaudio dependencies, see #499 (comment) . 
For use old releases, it is still possible to checkout the relative tag.
@traversaro
Copy link
Member Author

Additional macOS-related fixes:

* [robotology/ycm#358](https://github.com/robotology/ycm/pull/358)

* [robotology/yarp#2387](https://github.com/robotology/yarp/pull/2387)

As this PR have been merged and I bumper the commits of YARP and YCM in the 2020.11 release, I think the PR is finally ready to be merged.

@traversaro traversaro merged commit 43db43d into master Oct 27, 2020
@traversaro traversaro deleted the add-portaudio-deps branch October 27, 2020 14:11
traversaro added a commit that referenced this pull request Nov 27, 2020
For YCM and YARP in absence of minor releases with the portaudio fixes (see #499) we get the latest commit from their stable branches. 
For icub-gazebo and iDynTree we bump to the latest tags.
traversaro added a commit that referenced this pull request Nov 30, 2020
* Update some releases for the 2020.11

For YCM and YARP in absence of minor releases with the portaudio fixes (see #499) we get the latest commit from their stable branches. 
For icub-gazebo, icub-models and iDynTree we bump to the latest tags.
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.

Enable audio-related devices in the YARP configuration
2 participants