sil-quirk / sil-q

Other
217 stars 32 forks source link

Compiling for macOS 10.15.7 and Xcode 12.0.1 #49

Closed dixius99 closed 3 years ago

dixius99 commented 3 years ago

I'm following the compile instructions fo macOS available in the readme, and I'm getting some errors that are preventing it from building successfully. I'm on the latest version of macOS (10.15.7) and Xcode (12.0.1).

Sorry if this is overkill:

        CC main-cocoa.m         (objective-c)
clang -g -I. -W -Wall -Wno-unused-parameter -Wno-missing-field-initializers -O2 -DMACH_O_CARBON -DCOCOA -DHAVE_MKSTEMP -fno-stack-protector -arch i386 -arch x86_64 -std=c99 -x objective-c -mmacosx-version-min=10.5 -c -o main-cocoa.o main-cocoa.m
In file included from main-cocoa.m:46:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:13:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/AppKit.h:27:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSCollectionView.h:9:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSViewController.h:247:39: error: 
      unknown type name 'NSExtensionContext'; did you mean 'NSAnimationContext'?
@property (nullable, readonly,retain) NSExtensionContext *extensionContext API_AVAILABLE(mac...
                                      ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSAnimationContext.h:18:12: note: 
      'NSAnimationContext' declared here
@interface NSAnimationContext : NSObject
           ^
In file included from main-cocoa.m:46:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:13:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/AppKit.h:99:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSSharingServicePickerTouchBarItem.h:9:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSSharingService.h:181:119: error: 
      expected a type
  ...*)cloudKitSharingService shareProvider:(NSItemProvider *)provider;
                                             ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSSharingService.h:196:12: error: 
      cannot find interface declaration for 'NSItemProvider'
@interface NSItemProvider (NSCloudKitSharing)
           ^
In file included from main-cocoa.m:46:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:13:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/AppKit.h:250:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSItemProvider.h:16:12: error: 
      cannot find interface declaration for 'NSItemProvider'
@interface NSItemProvider (NSItemSourceInfo)
           ^
main-cocoa.m:3060:8: warning: unused variable 'button' [-Wunused-variable]
                        int button = ([event type] == NSLeftMouseDown) ? 1 : 2;
                            ^
1 warning and 4 errors generated.
make: *** [main-cocoa.o] Error 1
dixius99 commented 3 years ago

So, to answer my own question, it looks like I can't build from the latest Sil-Q release (1.4.2), but building from master (which identifies as version 1.5.0) works fine.

sil-quirk commented 3 years ago

Ah yes. @backwardsEric has been doing some excellent work resuscitating the Mac build and is continuing to work on it. 1.5-beta from master should be in relatively good shape.