-
Notifications
You must be signed in to change notification settings - Fork 31
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
Ignition projects on macOS mix inclusion of system's uuid/uuid.h
and linking to homebrew's ossp-uuid
#127
Closed
traversaro opened this issue
Nov 15, 2020
· 0 comments
· Fixed by #128 or gazebosim/gazebo-classic#2878
Closed
Ignition projects on macOS mix inclusion of system's uuid/uuid.h
and linking to homebrew's ossp-uuid
#127
traversaro opened this issue
Nov 15, 2020
· 0 comments
· Fixed by #128 or gazebosim/gazebo-classic#2878
Labels
macOS
macOS support
Comments
traversaro
changed the title
Ignition projects on macOS mix inclusion of system's
Ignition projects on macOS mix inclusion of system's Nov 15, 2020
uuid/uuid.h
and homebrew's ossp-uuid uuid/uuid.h
and linking to homebrew's ossp-uuid
traversaro
added a commit
to traversaro/gz-cmake
that referenced
this issue
Nov 15, 2020
On Apple platforms, the headers of libuuid and its symbols are provided by the OS SDK, so no further linking is necessary. Fix gazebosim#127 Signed-off-by: Silvio Traversaro <silvio.traversaro@iit.it>
traversaro
added a commit
to traversaro/gazebo
that referenced
this issue
Nov 15, 2020
traversaro
added a commit
to traversaro/gz-cmake
that referenced
this issue
Nov 16, 2020
On Apple platforms, the headers of libuuid and its symbols are provided by the OS SDK, so no further linking is necessary. Fix gazebosim#127 Signed-off-by: Silvio Traversaro <silvio.traversaro@iit.it>
traversaro
added a commit
to traversaro/gz-cmake
that referenced
this issue
Nov 17, 2020
On Apple platforms, the headers of libuuid and its symbols are provided by the OS SDK, so no further linking is necessary. Fix gazebosim#127 Signed-off-by: Silvio Traversaro <silvio.traversaro@iit.it>
j-rivero
pushed a commit
to gazebosim/gazebo-classic
that referenced
this issue
Nov 24, 2020
scpeters
added a commit
that referenced
this issue
Dec 15, 2020
On Apple platforms, the headers of libuuid and its symbols are provided by the OS SDK, so no further linking is necessary. Fix #127 Signed-off-by: Silvio Traversaro <silvio.traversaro@iit.it> Co-authored-by: Steve Peters <scpeters@openrobotics.org>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The homebrew package
ossp-uuid
provides a library whose functionality is just a subset of theuuid
library that is part of the libc/SDK of macOS (see https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man3/uuid.3.html). Exactly to avoid tricky bugs due to this overlap, theossp-uuid
homebrew package installs its headers inossp\uuid.h
(Homebrew/homebrew-core@fdb81d8), while the system uuid library header is installed inuuid\uuid.h
. Due to how theUUID::UUID
target is created by the ignition-cmake'sFindUUID
module, the ignition libraries link the library installed by homebrew'sossp-uuid
, but apparently they consume the headers of the uuid library as:See for example ignition-transport ( https://github.com/ignitionrobotics/ign-transport/blob/3e84d43aba2c4aeeceda03b3f7ac1647258f6e16/include/ignition/transport/Uuid.hh#L32 ), ignition-common ( https://github.com/ignitionrobotics/ign-common/blob/1c75659001becdb4e8f8f444aaabe540cc32e287/include/ignition/common/Uuid.hh#L31 ) and Gazebo ( https://github.com/osrf/gazebo/blob/6fd426b3949c4ca73fa126cde68f5cc4a59522eb/plugins/rest_web/RestWebPlugin.cc#L27 ).
This means that, despite the apparent logic in CMake, the ignition libraries use the headers from macOS's uuid library, but then link the library provided by
ossp-uuid
. This is confusing at minimum, but everything works fine because the two libraries are ABI-compatible (at least the symbols used by the ignition libraries). However, in package managers such as conda-forge that do not use the workaround of homebrew of installinglibuuid
's headers toossp\uuid.h
, this confusion leads to compilation errors in programs that include macOS SDK headers, see for example robotology/robotology-superbuild#513 and conda-forge/libuuid-feedstock#16 .To solve this confusion, I suggest to modify the
FindUUID
CMake module to do not search for any library on macOS, but rather just definedUUID::UUID
as an empty target, as the necessary symbols are already provided by the macOS SDK. This is similar to what happens for theFindThreads
CMake module, that defines theThreads::Threads
imported target in any case.The text was updated successfully, but these errors were encountered: