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

Conda compilation from source not compatible with macOS SDK in Xcode 13 #955

Closed
traversaro opened this issue Dec 14, 2021 · 3 comments
Closed

Comments

@traversaro
Copy link
Member

Since yesterday, the CI of conda on macos-latest failed with:

2021-12-14T02:36:03.7886020Z [159/1268] Building CXX object src/libYARP_os/src/CMakeFiles/YARP_os.dir/yarp/os/impl/macos/MacOSAPI.mm.o
2021-12-14T02:36:03.7985980Z FAILED: src/libYARP_os/src/CMakeFiles/YARP_os.dir/yarp/os/impl/macos/MacOSAPI.mm.o 
2021-12-14T02:36:03.8099100Z /Users/runner/miniconda3/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/src/YARP/src/libYARP_os/src -I/Users/runner/work/robotology-superbuild/robotology-superbuild/src/YARP/src/libYARP_conf/src -I/Users/runner/work/robotology-superbuild/robotology-superbuild/build/src/YARP/src/libYARP_conf/src -isystem /Users/runner/work/robotology-superbuild/robotology-superbuild/src/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 -Wsuggest-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 /Users/runner/miniconda3/envs/test/include -O3 -DNDEBUG -isysroot /Applications/Xcode_13.1.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/src/YARP/src/libYARP_os/src/yarp/os/impl/macos/MacOSAPI.mm
2021-12-14T02:36:03.8188790Z In file included from /Users/runner/work/robotology-superbuild/robotology-superbuild/src/YARP/src/libYARP_os/src/yarp/os/impl/macos/MacOSAPI.mm:8:
2021-12-14T02:36:03.8289100Z In file included from /Applications/Xcode_13.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:12:
2021-12-14T02:36:03.8392380Z /Applications/Xcode_13.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSBundle.h:91:143: error: function does not return NSString
2021-12-14T02:36:03.8493800Z - (NSAttributedString *)localizedAttributedStringForKey:(NSString *)key value:(nullable NSString *)value table:(nullable NSString *)tableName NS_FORMAT_ARGUMENT(1) NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0));
2021-12-14T02:36:03.8592390Z                                                          ~~~~~~~~~~~~~~                                                                       ^                  ~
2021-12-14T02:36:03.8695020Z /Applications/Xcode_13.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:103:48: note: expanded from macro 'NS_FORMAT_ARGUMENT'
2021-12-14T02:36:03.8794480Z         #define NS_FORMAT_ARGUMENT(A) __attribute__ ((format_arg(A)))
2021-12-14T02:36:03.8895780Z                                                       ^          ~
2021-12-14T02:36:03.8998840Z In file included from /Users/runner/work/robotology-superbuild/robotology-superbuild/src/YARP/src/libYARP_os/src/yarp/os/impl/macos/MacOSAPI.mm:8:
2021-12-14T02:36:03.9068890Z In file included from /Applications/Xcode_13.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:130:
2021-12-14T02:36:03.9188110Z /Applications/Xcode_13.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURLSession.h:500:168: error: expected ')'
2021-12-14T02:36:03.9292600Z - (void)readDataOfMinLength:(NSUInteger)minBytes maxLength:(NSUInteger)maxBytes timeout:(NSTimeInterval)timeout completionHandler:(void (^) (NSData * _Nullable_result data, BOOL atEOF, NSError * _Nullable error))completionHandler;
2021-12-14T02:36:03.9398600Z                                                                                                                                                                        ^
2021-12-14T02:36:03.9501760Z /Applications/Xcode_13.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURLSession.h:500:141: note: to match this '('
2021-12-14T02:36:03.9603800Z - (void)readDataOfMinLength:(NSUInteger)minBytes maxLength:(NSUInteger)maxBytes timeout:(NSTimeInterval)timeout completionHandler:(void (^) (NSData * _Nullable_result data, BOOL atEOF, NSError * _Nullable error))completionHandler;
2021-12-14T02:36:03.9701700Z                                                                                                                                             ^
2021-12-14T02:36:03.9806730Z 2 errors generated.

Homebrew on macos-10.15 did not failed, so I wonder if this problem is related to the macos-latest image.

@traversaro traversaro changed the title Conda macos-latest CI Failure Mid December Conda macos-latest CI Failure Mid December with Xcode 13 Dec 17, 2021
@traversaro
Copy link
Member Author

So, conda compiler fail with the macOS SDK provided by XCode 13. As a cross-check, I added a CI run with homebrew with Xcode 13 in #960, to understand if that fails also there or not.

@traversaro
Copy link
Member Author

As shown in #960, the homebrew CI works fine. The issue is caused by some kind of incompatibility between the macOS SDK in Xcode 13 and the conda-forge compilers.

@traversaro traversaro changed the title Conda macos-latest CI Failure Mid December with Xcode 13 Conda compilation from source not compatible with macOS SDK in Xcode 13 Dec 20, 2021
@traversaro
Copy link
Member Author

traversaro commented Jul 28, 2022

The problem was solved on its own, see #1216 , probably thanks to a compiler or macOS SDK update, a rare case in which ignoring a problem and just putting in place a workaround eventually lead to the problem being solved. : )

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

No branches or pull requests

1 participant