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

GitHub Actions: Enable conda-forge CI on macOS #513

Merged
merged 1 commit into from
Nov 23, 2020

Conversation

traversaro
Copy link
Member

@traversaro traversaro commented Nov 15, 2020

Modern version of #504 . Now the gazebo build has been refreshed, so everything should work fine.

For more details on what conda and conda-forge are, and why it useful to have a CI with them, please see #484 (comment) . For the specific case of macOS, having an build that is not using Homebrew should permit us to distinguish the quite frequent Homebrew failures from the actual macOS compilation problems (that should create a failure in both conda and Homebrew macOS jobs).

@traversaro
Copy link
Member Author

Now we have a macOS failure on YARP:

2020-11-15T11:23:43.6668550Z [161/1058] Building CXX object src/libYARP_os/src/CMakeFiles/YARP_os.dir/yarp/os/impl/macos/MacOSAPI.mm.o
2020-11-15T11:23:43.6669220Z FAILED: src/libYARP_os/src/CMakeFiles/YARP_os.dir/yarp/os/impl/macos/MacOSAPI.mm.o 
2020-11-15T11:23:43.6678910Z /usr/local/miniconda/envs/test/bin/x86_64-apple-darwin13.4.0-clang++ -DBUILDING_YARP -DYARP_HAS_ACE -DYARP_HAS_Libedit -DYARP_os_EXPORTS -D__ACE_INLINE__ -I/Users/runner/work/robotology-superbuild/robotology-superbuild/robotology/YARP/src/libYARP_os/src -I/Users/runner/work/robotology-superbuild/robotology-superbuild/robotology/YARP/src/libYARP_conf/src -Isrc/libYARP_conf/src -isystem /Users/runner/work/robotology-superbuild/robotology-superbuild/robotology/YARP/extern/hmac/hmac -Wall -Wextra -Wsign-compare -Wpointer-arith -Winit-self -Wnon-virtual-dtor -Wcast-align -Wunused -Wvla -Wmissing-include-dirs -Wreorder -Wsizeof-pointer-memaccess -Woverloaded-virtual -Wtautological-undefined-compare -Wmismatched-new-delete -Wparentheses-equality -Wundef -Wredundant-decls -Wunknown-pragmas -Wunused-result -Wc++17-compat -Wc++2a-compat -Wheader-guard -Wignored-attributes -Wnewline-eof -Wdangling-else -Wgcc-compat -Wmicrosoft-exists -Wstatic-inline-explicit-instantiation -Wmisleading-indentation -Wtautological-compare -Winconsistent-missing-override -Wnull-conversion  -Wno-unused-parameter  -Wdeprecated-declarations -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -std=c++14 -fmessage-length=0 -isystem /usr/local/miniconda/envs/test/include -O3 -DNDEBUG -isysroot /Applications/Xcode_12.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -std=c++14 -MD -MT src/libYARP_os/src/CMakeFiles/YARP_os.dir/yarp/os/impl/macos/MacOSAPI.mm.o -MF src/libYARP_os/src/CMakeFiles/YARP_os.dir/yarp/os/impl/macos/MacOSAPI.mm.o.d -o src/libYARP_os/src/CMakeFiles/YARP_os.dir/yarp/os/impl/macos/MacOSAPI.mm.o -c /Users/runner/work/robotology-superbuild/robotology-superbuild/robotology/YARP/src/libYARP_os/src/yarp/os/impl/macos/MacOSAPI.mm
2020-11-15T11:23:43.6687440Z In file included from /Users/runner/work/robotology-superbuild/robotology-superbuild/robotology/YARP/src/libYARP_os/src/yarp/os/impl/macos/MacOSAPI.mm:11:
2020-11-15T11:23:43.6688830Z In file included from /Applications/Xcode_12.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:89:
2020-11-15T11:23:43.6690330Z In file included from /Applications/Xcode_12.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURLError.h:15:
2020-11-15T11:23:43.6691850Z In file included from /Applications/Xcode_12.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:23:
2020-11-15T11:23:43.6693440Z In file included from /Applications/Xcode_12.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/AE.framework/Headers/AE.h:20:
2020-11-15T11:23:43.6695300Z In file included from /Applications/Xcode_12.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/CarbonCore.h:208:
2020-11-15T11:23:43.6697320Z In file included from /Applications/Xcode_12.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/HFSVolumes.h:25:
2020-11-15T11:23:43.6699390Z /Applications/Xcode_12.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/hfs/hfs_format.h:794:2: error: unknown type name 'uuid_string_t'; did you mean 'io_string_t'?
2020-11-15T11:23:43.6700200Z         uuid_string_t   ext_jnl_uuid;
2020-11-15T11:23:43.6700440Z         ^
2020-11-15T11:23:43.6701540Z /Applications/Xcode_12.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/device/device_types.h:89:33: note: 'io_string_t' declared here
2020-11-15T11:23:43.6702310Z typedef char                    io_string_t[512];
2020-11-15T11:23:43.6702560Z                                 ^
2020-11-15T11:23:43.6703700Z In file included from /Users/runner/work/robotology-superbuild/robotology-superbuild/robotology/YARP/src/libYARP_os/src/yarp/os/impl/macos/MacOSAPI.mm:11:
2020-11-15T11:23:43.6705070Z In file included from /Applications/Xcode_12.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:89:
2020-11-15T11:23:43.6706550Z In file included from /Applications/Xcode_12.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURLError.h:15:
2020-11-15T11:23:43.6708140Z In file included from /Applications/Xcode_12.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:23:
2020-11-15T11:23:43.6709730Z In file included from /Applications/Xcode_12.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/AE.framework/Headers/AE.h:20:
2020-11-15T11:23:43.6711460Z In file included from /Applications/Xcode_12.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/CarbonCore.h:208:
2020-11-15T11:23:43.6713290Z In file included from /Applications/Xcode_12.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/HFSVolumes.h:25:
2020-11-15T11:23:43.6715340Z /Applications/Xcode_12.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/hfs/hfs_format.h:796:20: error: unknown type name 'uuid_string_t'; did you mean 'io_string_t'?
2020-11-15T11:23:43.6716190Z         char            reserved[JIB_RESERVED_SIZE];
2020-11-15T11:23:43.6716470Z                                  ^
2020-11-15T11:23:43.6717620Z /Applications/Xcode_12.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/hfs/hfs_format.h:787:61: note: expanded from macro 'JIB_RESERVED_SIZE'
2020-11-15T11:23:43.6718830Z #define JIB_RESERVED_SIZE  ((32*sizeof(u_int32_t)) - sizeof(uuid_string_t) - 48)
2020-11-15T11:23:43.6719190Z                                                             ^
2020-11-15T11:23:43.6720300Z /Applications/Xcode_12.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/device/device_types.h:89:33: note: 'io_string_t' declared here
2020-11-15T11:23:43.6721060Z typedef char                    io_string_t[512];
2020-11-15T11:23:43.6721310Z                                 ^
2020-11-15T11:23:43.6722440Z In file included from /Users/runner/work/robotology-superbuild/robotology-superbuild/robotology/YARP/src/libYARP_os/src/yarp/os/impl/macos/MacOSAPI.mm:11:
2020-11-15T11:23:43.6723950Z In file included from /Applications/Xcode_12.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:89:
2020-11-15T11:23:43.6725610Z In file included from /Applications/Xcode_12.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURLError.h:15:
2020-11-15T11:23:43.6727130Z In file included from /Applications/Xcode_12.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:23:
2020-11-15T11:23:43.6728820Z In file included from /Applications/Xcode_12.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/AE.framework/Headers/AE.h:20:
2020-11-15T11:23:43.6730680Z In file included from /Applications/Xcode_12.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/CarbonCore.h:208:
2020-11-15T11:23:43.6732540Z In file included from /Applications/Xcode_12.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/HFSVolumes.h:25:
2020-11-15T11:23:43.6734050Z /Applications/Xcode_12.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/hfs/hfs_format.h:796:20: error: array is too large (18446744073709551184 elements)
2020-11-15T11:23:43.6734820Z         char            reserved[JIB_RESERVED_SIZE];
2020-11-15T11:23:43.6735090Z                                  ^~~~~~~~~~~~~~~~~
2020-11-15T11:23:43.6736300Z /Applications/Xcode_12.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/hfs/hfs_format.h:787:28: note: expanded from macro 'JIB_RESERVED_SIZE'
2020-11-15T11:23:43.6737520Z #define JIB_RESERVED_SIZE  ((32*sizeof(u_int32_t)) - sizeof(uuid_string_t) - 48)
2020-11-15T11:23:43.6737910Z                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2020-11-15T11:23:43.6738160Z 3 errors generated.
2020-11-15T11:23:43.6738670Z [162/1058] Building CXX object src/libYARP_os/src/CMakeFiles/YARP_os.dir/yarp/os/impl/UdpCarrier.cpp.o
2020-11-15T11:23:43.6739350Z [163/1058] Building CXX object src/libYARP_sig/src/CMakeFiles/YARP_sig.dir/yarp/sig/Image.cpp.o
2020-11-15T11:23:43.6740030Z [164/1058] Building CXX object src/libYARP_sig/src/CMakeFiles/YARP_sig.dir/yarp/sig/ImageFile.cpp.o
2020-11-15T11:23:43.6741720Z /Users/runner/work/robotology-superbuild/robotology-superbuild/robotology/YARP/src/libYARP_sig/src/yarp/sig/ImageFile.cpp:331:17: warning: cast from 'char *' to 'size_t *' (aka 'unsigned long *') increases required alignment from 1 to 8 [-Wcast-align]
2020-11-15T11:23:43.6742840Z     size_t h = ((size_t*)(dataReadInCompressed))[0]; //byte 0
2020-11-15T11:23:43.6743200Z                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2020-11-15T11:23:43.6744640Z /Users/runner/work/robotology-superbuild/robotology-superbuild/robotology/YARP/src/libYARP_sig/src/yarp/sig/ImageFile.cpp:332:17: warning: cast from 'char *' to 'size_t *' (aka 'unsigned long *') increases required alignment from 1 to 8 [-Wcast-align]
2020-11-15T11:23:43.6745820Z     size_t w = ((size_t*)(dataReadInCompressed))[1]; //byte 8, because size_t is 8 bytes long
2020-11-15T11:23:43.6746240Z                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2020-11-15T11:23:43.6746490Z 2 warnings generated.
2020-11-15T11:23:43.6746980Z [165/1058] Building CXX object src/libYARP_os/src/CMakeFiles/YARP_os.dir/yarp/os/impl/PortCore.cpp.o
2020-11-15T11:23:43.6747730Z [166/1058] Building CXX object src/libYARP_sig/src/CMakeFiles/YARP_sig.dir/yarp/sig/Image.copyPixels.cpp.o
2020-11-15T11:23:43.6748340Z ninja: build stopped: subcommand failed.

@traversaro
Copy link
Member Author

The problem is a good example of the classical messy situation of complex dependencies in C/C++ software. What is happening is that macOS installs as part of the official SDK/libc the uuid/uuid.h header (https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man3/uuid.3.html). The same header is installed by libuuid-feedstock package and so the libuuid-feedstock version shadows the system one, but with less definitions, hence the error of the missing uuid_string_t definition. The problem is tracked in conda-forge/libuuid-feedstock#16 .

Modern version of #504 . Now the gazebo build has been refreshed, so everything should work fine.
@traversaro
Copy link
Member Author

Now running a sample code generator in YARP that requires ace is failing with:

2020-11-18T11:51:34.3357760Z [374/1056] Linking CXX executable bin/yarpidl_rosmsg
2020-11-18T11:51:34.3358720Z [375/1056] Generating code from ../../../extern/ros/geometry2/tf2_msgs/msg/TF2Error.msg
2020-11-18T11:51:34.3359650Z FAILED: src/libYARP_rosmsg/src/yarp/rosmsg/tf2_msgs/TF2Error.h src/libYARP_rosmsg/src/tf2_msgs/TF2Error.h src/libYARP_rosmsg/src/tf2_msgs_TF2Error.h 
2020-11-18T11:51:34.3364520Z cd /Users/runner/work/robotology-superbuild/robotology-superbuild/robotology/YARP/src/libYARP_rosmsg/src && /Users/runner/work/robotology-superbuild/robotology-superbuild/build/robotology/YARP/bin/yarpidl_rosmsg --no-index --no-ros true --no-cache --out /Users/runner/work/robotology-superbuild/robotology-superbuild/build/robotology/YARP/src/libYARP_rosmsg/src ../../../extern/ros/geometry2/tf2_msgs/msg/TF2Error.msg
2020-11-18T11:51:34.3367390Z dyld: Library not loaded: @rpath/64/libACE.dylib
2020-11-18T11:51:34.3368890Z   Referenced from: /Users/runner/work/robotology-superbuild/robotology-superbuild/build/robotology/YARP/bin/yarpidl_rosmsg
2020-11-18T11:51:34.3370150Z   Reason: image not found
2020-11-18T11:51:34.3373010Z /bin/sh: line 1: 17584 Abort trap: 6           /Users/runner/work/robotology-superbuild/robotology-superbuild/build/robotology/YARP/bin/yarpidl_rosmsg --no-index --no-ros true --no-cache --out /Users/runner/work/robotology-superbuild/robotology-superbuild/build/robotology/YARP/src/libYARP_rosmsg/src ../../../extern/ros/geometry2/tf2_msgs/msg/TF2Error.msg

@traversaro
Copy link
Member Author

The libuuid problem is solved, while now there is a problem in the ace binary, I opened an issue for it in conda-forge/ace-feedstock#11 .

@traversaro
Copy link
Member Author

The libuuid problem is solved, while now there is a problem in the ace binary, I opened an issue for it in conda-forge/ace-feedstock#11 .

This was solved by conda-forge/ace-feedstock#12 .

@traversaro
Copy link
Member Author

The macOS Conda build is finally working. There are a few CI failures that are unrelated. Indeed, they are spurious macOS/Homebrew failures that we could finally distinguish from actual macOS failures thanks to the conda macOS job!

@traversaro
Copy link
Member Author

Thanks @Nicogene for the review.

@traversaro traversaro merged commit e5d7fbc into master Nov 23, 2020
@traversaro traversaro deleted the conda-enable-macos branch November 23, 2020 08:36
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.

2 participants