sil-quirk / sil-q

Other
210 stars 32 forks source link

Errors when compiling on macOS #50

Closed bdcarr closed 3 years ago

bdcarr commented 3 years ago

Hullo, I'm following the instructions for compiling on macOS 10.15.6 and it's failing with four errors.

I think this is the relevant system info:

❯ gcc --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 11.0.3 (clang-1103.0.32.59)
Target: x86_64-apple-darwin19.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

Here's the build output (only showing the errors I guess because the rest is cached from previous attempts):

❯ make -f Makefile.cocoa install
        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 /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:13:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/AppKit.h:27:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSCollectionView.h:9:
/Library/Developer/CommandLineTools/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_AVA...
                                      ^
/Library/Developer/CommandLineTools/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 /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:13:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/AppKit.h:99:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSSharingServicePickerTouchBarItem.h:9:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSSharingService.h:181:119: error:
      expected a type
  ...*)cloudKitSharingService shareProvider:(NSItemProvider *)provider;
                                             ^
/Library/Developer/CommandLineTools/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 /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:13:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/AppKit.h:250:
/Library/Developer/CommandLineTools/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

In an odd coincidence, I think I posted the same issue today, but when I figured it out, I closed it. Basically, you need to compile using master, vs. the 1.4.2 release.

bdcarr commented 3 years ago

Ha, that'd be right! I searched for similar issues yesterday but didn't bother posting until just now. Thanks mate, hopefully this prerelease version isn't too unstable 🤞