oryol icon indicating copy to clipboard operation
oryol copied to clipboard

MacOSX10.12.sdk build failure:

Open ghost opened this issue 7 years ago • 5 comments

Hi, Which Xcode SDK should I use?

warning: unknown warning option '-Wno-expansion-to-defined'; did you mean '-Wno-macro-redefined'? [-Wunknown-warning-option] In file included from /Users/freebsd/repo/_dev/fips-glfw/glfw/src/cocoa_monitor.m:28: In file included from /Users/freebsd/repo/_dev/fips-glfw/glfw/src/internal.h:182: In file included from /Users/freebsd/repo/_dev/fips-glfw/glfw/src/cocoa_platform.h:31: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Carbon.framework/Headers/Carbon.h:29: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Carbon.framework/Frameworks/HIToolbox.framework/Headers/HIToolbox.h:240: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Carbon.framework/Frameworks/HIToolbox.framework/Headers/IMKInputSession.h:23: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:10: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:5: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:19:21: error: expected a type

  • (id)copyWithZone:(nullable NSZone *)zone;

ghost avatar May 30 '18 16:05 ghost

That's very weird. I'm not aware of 10.12 SDK problems in GLFW, but I have switched to the latest SDK versions as they are coming out (so since High Sierra I'm on the 10.13 SDK).

I'm on the 10.13 SDK, OSX 10.13.5 Beta and Xcode 9.4 with the 9.4 command line tools.

I just tried a fresh checkout and that worked:

> git clone --depth=1 https://github.com/floooh/oryol
> cd oryol
> ./fips build
...
** BUILD SUCCEEDED **

1 configs built
> ./fips run Triangle

Can you try that?

Unfortunately I can't simply switch to an older base SDK in my Xcode installation (I guess I need to install an old Xcode for that?)

floooh avatar May 30 '18 18:05 floooh

Thanks for your response. I have upgraded to OSX Siera (latest) and also to the latest Xcode and SDK. I still cant make it work.

In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:43:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:18:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFAvailability.h:25:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/os/availability.h:58:160: note: expanded from macro 'API_AVAILABLE'
    #define API_AVAILABLE(...) __API_AVAILABLE_GET_MACRO(__VA_ARGS__,__API_AVAILABLE5, __API_AVAILABLE4, __API_AVAILABLE3, __API_AVAILABLE2, __API_AVAILABLE1)(__VA_ARGS__)
                                                                                                                                                               ^
In file included from /Users/freebsd/repo/_dev/fips-glfw/glfw/src/cocoa_monitor.m:28:
In file included from /Users/freebsd/repo/_dev/fips-glfw/glfw/src/internal.h:182:
In file included from /Users/freebsd/repo/_dev/fips-glfw/glfw/src/cocoa_platform.h:28:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/dlfcn.h:41:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/Availability.h:206:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/AvailabilityInternal.h:33238:57: note: expanded from macro
      '__API_AVAILABLE3'
    #define __API_AVAILABLE3(x,y,z)  __API_A(x) __API_A(y) __API_A(z)
                                                        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/AvailabilityInternal.h:33235:79: note: expanded from macro '__API_A'
    #define __API_A(x) __attribute__((availability(__API_AVAILABLE_PLATFORM_##x)))
                                                                              ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/AvailabilityInternal.h:33230:60: note: expanded from macro
      '__API_AVAILABLE_PLATFORM_ios'
    #define __API_AVAILABLE_PLATFORM_ios(x) ios,introduced=x
                                                           ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
3 warnings and 20 errors generated.

** BUILD FAILED **


The following build commands failed:
	CompileC /Users/freebsd/repo/_dev/fips-build/oryol-samples-master/osx-xcode-debug/fips-glfw_glfw3/oryol-samples.build/Debug/glfw3.build/Objects-normal/x86_64/cocoa_init.o /Users/freebsd/repo/_dev/fips-glfw/glfw/src/cocoa_init.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
	CompileC /Users/freebsd/repo/_dev/fips-build/oryol-samples-master/osx-xcode-debug/fips-glfw_glfw3/oryol-samples.build/Debug/glfw3.build/Objects-normal/x86_64/cocoa_joystick.o /Users/freebsd/repo/_dev/fips-glfw/glfw/src/cocoa_joystick.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
	CompileC /Users/freebsd/repo/_dev/fips-build/oryol-samples-master/osx-xcode-debug/fips-glfw_glfw3/oryol-samples.build/Debug/glfw3.build/Objects-normal/x86_64/cocoa_monitor.o /Users/freebsd/repo/_dev/fips-glfw/glfw/src/cocoa_monitor.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(3 failures)
[ERROR] Failed to build config 'osx-xcode-debug' of project 'oryol-samples-master'
nsa-000:oryol-samples-master freebsd$ 

ghost avatar Jun 02 '18 18:06 ghost

Very weird, can you try a simpler project in a new directory?:

> mkdir ~/scratch
> cd scratch
> git clone https://github.com/floooh/chips-test
> cd chips-test
> ./fips build
...
> ./fips run kc87

Also let's check if any required tools versions are different, on my side:

> cmake --version
cmake version 3.11.2
> python --version
Python 2.7.15
> xcodebuild -version
Xcode 9.4
Build version 9F1027a
> clang --version
Apple LLVM version 9.1.0 (clang-902.0.39.2)
Target: x86_64-apple-darwin17.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

...and the GLFW version:

> cd fips-glfw
> git rev-parse HEAD
154a124127e9356a3d0a636b055906bce257158b
> cd glfw
> git rev-parse HEAD
fcedb0be325425a6ad16d53349f2008ac4fc05d3

Cheers!

floooh avatar Jun 03 '18 11:06 floooh

Hi, Here is the info you requested.

nsa-000:oryol-samples-master freebsd$ ./stats.sh cmake version 3.10.2 CMake suite maintained and supported by Kitware (kitware.com/cmake). Python 2.7.13 Xcode 9.4 Build version 9F1027a Apple LLVM version 9.1.0 (clang-902.0.39.2) Target: x86_64-apple-darwin17.5.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin nsa-000:oryol-samples-master freebsd$

I also run the chips-test example:

In file included from /Users/freebsd/repo/_dev/oryol-samples-master/scratch/fips-glfw/glfw/src/cocoa_monitor.m:28:
In file included from /Users/freebsd/repo/_dev/oryol-samples-master/scratch/fips-glfw/glfw/src/internal.h:182:
In file included from /Users/freebsd/repo/_dev/oryol-samples-master/scratch/fips-glfw/glfw/src/cocoa_platform.h:31:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Carbon.framework/Headers/Carbon.h:20:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:39:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Headers/LaunchServices.h:22:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Headers/IconsCore.h:23:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/OSServices.framework/Headers/OSServices.h:27:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/OSServices.framework/Headers/CSIdentity.h:43:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Security.framework/Headers/Security.h:31:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Security.framework/Headers/SecItem.h:796:36: error: expected a version of the form
      'major[.minor[.subminor]]'
    **API_AVAILABLE(macos(10.7), ios(NA), bridgeos(NA));**

ghost avatar Jun 03 '18 16:06 ghost

hmm, I'm running out of ideas unfortunately... next thing I would try is to build the 'official' GLFW samples and check if they have the same problem: https://github.com/glfw/glfw

floooh avatar Jun 03 '18 21:06 floooh