Viewing Issue Advanced Details
ID Category [?] Severity [?] Reproducibility Date Submitted Last Update
07746 Compiling Minor Always Sep 8, 2020, 16:28 Dec 31, 2020, 04:01
Tester Dominus View Status Public Platform MAME (Self-compiled)
Assigned To micko Resolution Fixed OS MacOS X
Status [?] Resolved Driver
Version N/A Fixed in Version 0.227 Build Other
Fixed in Git Commit Github Pull Request #
Summary 07746: macOS 11: Compiling on the Apple DTK fails
Description I have an Apple DTK (the Apple Silicone device for developers) and have been asked to give it a try to compile and run mame. I'm failing with 
clang++ -MMD -MP -MP -DNDEBUG -DCRLF=2 -DLSB_FIRST -DFLAC__NO_DLL -DPUGIXML_HEADER_ONLY -DMAME_NOASM -DLUA_COMPAT_ALL -DLUA_COMPAT_5_1 -DLUA_COMPAT_5_2 -I"../../../../../src/osd" -I"../../../../../src/emu" -I"../../../../../src/devices" -I"../../../../../src/mame" -I"../../../../../src/lib" -I"../../../../../src/lib/util" -I"../../../../../3rdparty" -I"../../../../generated/mame/layout" -I"../../../../../3rdparty/libflac/include" -I"../../../../../3rdparty/glm" -I"../../../../../3rdparty/libjpeg" -I"../../../../../3rdparty/rapidjson/include" -I"../../../../../3rdparty/zlib" -m32 -arch i386 -pipe -Werror -O3 -fno-strict-aliasing -Wno-unknown-pragmas -Wall -Wcast-align -Wundef -Wformat-security -Wwrite-strings -Wno-sign-compare -Wno-conversion -Wno-error=deprecated-declarations -Wno-cast-align -Wno-tautological-compare -Wno-unused-value -Wno-constant-logical-operand -fdiagnostics-show-note-include-stack -Wno-unknown-warning-option -Wno-extern-c-compat -Wno-unknown-attributes -Wno-ignored-qualifiers -Wno-pragma-pack -m32 -std=c++14 -Woverloaded-virtual -include ../../../../osx_clang/obj/x32/Release/emu.h -o "../../../../osx_clang/obj/x32/Release/src/mame/drivers/atari400.o" -c "../../../../../src/mame/drivers/atari400.cpp"
In file included from ../../../../../3rdparty/bgfx/src/glcontext_nsgl.mm:11:
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:248:39: error:
      unknown type name 'NSExtensionContext'; did you mean 'NSAnimationContext'?
@property (nullable, readonly,retain) NSExtensionContext *extensionConte...
                                      ^
In file included from ../../../../../3rdparty/bgfx/src/glcontext_nsgl.mm:11:
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:17:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSAnimationContext.h:19:12: note:
      'NSAnimationContext' declared here
@interface NSAnimationContext : NSObject
           ^
Compiling src/mame/drivers/bmcpokr.cpp...
clang++ -MMD -MP -MP -DNDEBUG -DCRLF=2 -DLSB_FIRST -DFLAC__NO_DLL -DPUGIXML_HEADER_ONLY -DMAME_NOASM -DLUA_COMPAT_ALL -DLUA_COMPAT_5_1 -DLUA_COMPAT_5_2 -I"../../../../../src/osd" -I"../../../../../src/emu" -I"../../../../../src/devices" -I"../../../../../src/mame" -I"../../../../../src/lib" -I"../../../../../src/lib/util" -I"../../../../../3rdparty" -I"../../../../generated/mame/layout" -I"../../../../../3rdparty/libflac/include" -I"../../../../../3rdparty/glm" -I"../../../../../3rdparty/libjpeg" -I"../../../../../3rdparty/rapidjson/include" -m32 -arch i386 -pipe -Werror -O3 -fno-strict-aliasing -Wno-unknown-pragmas -Wall -Wcast-align -Wundef -Wformat-security -Wwrite-strings -Wno-sign-compare -Wno-conversion -Wno-error=deprecated-declarations -Wno-cast-align -Wno-tautological-compare -Wno-unused-value -Wno-constant-logical-operand -fdiagnostics-show-note-include-stack -Wno-unknown-warning-option -Wno-extern-c-compat -Wno-unknown-attributes -Wno-ignored-qualifiers -Wno-pragma-pack -m32 -std=c++14 -Woverloaded-virtual -include ../../../../osx_clang/obj/x32/Release/emu.h -o "../../../../osx_clang/obj/x32/Release/src/mame/drivers/bmcpokr.o" -c "../../../../../src/mame/drivers/bmcpokr.cpp"
In file included from ../../../../../3rdparty/bgfx/src/glcontext_nsgl.mm:11:
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 ../../../../../3rdparty/bgfx/src/glcontext_nsgl.mm:11:
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:252:
/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)
           ^
4 errors generated.
make[2]: *** [../../../../osx_clang/obj/x32/Release/3rdparty/bgfx/src/glcontext_nsgl.o] Error 1
make[1]: *** [bgfx] Error 2
Steps To Reproduce I started compilation with make -j5 SDL_INSTALL_ROOT=/opt/arm VERBOSE=1
 the whole compile log is at https://www.dropbox.com/s/ymrvhh1hhxmgymd/mamemake.txt?dl=0

I used git bb65a67489d (that was the latest git at the time of testing)
Additional Information
Github Commit
Flags
Regression Version
Affected Sets / Systems macOS 11
Attached Files
 
Relationships
There are no relationship linked to this issue.
Notes
13
User avatar
No.17943
Dominus
Tester
Sep 8, 2020, 17:00
same error with the release 0.224, this time in driver bfm_sc5) but it's likely not connected to the driver, just the first one that pulls in Apple's SDK.
User avatar
No.17944
cuavas
Administrator
Sep 8, 2020, 17:09
It isn’t in those driver files at all, it’s in bgfx’s glcontext_nsgl.mm but you’re getting confused by the output of make with parallel jobs. Filtering it down a bit:
Objective-C compiling 3rdparty/bgfx/src/glcontext_nsgl.mm...
clang++    -MMD -MP -MP -DNDEBUG -DCRLF=2 -DLSB_FIRST -DFLAC__NO_DLL -DPUGIXML_HEADER_ONLY -DMAME_NOASM -DLUA_COMPAT_ALL -DLUA_COMPAT_5_1 -DLUA_COMPAT_5_2 -D__STDC_LIMIT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS -DBGFX_CONFIG_MAX_FRAME_BUFFERS=128 -DIMGUI_DISABLE_OBSOLETE_FUNCTIONS -I"../../../../../3rdparty/bgfx/include" -I"../../../../../3rdparty/bgfx/3rdparty" -I"../../../../../3rdparty/bx/include" -I"../../../../../3rdparty/bimg/include" -I"../../../../../3rdparty/bgfx/3rdparty/dxsdk/include" -I"../../../../../3rdparty/bgfx/3rdparty/khronos" -I"../../../../../3rdparty/bx/include/compat/osx"  -m32 -arch i386 -pipe -Werror -O3 -fno-strict-aliasing -Wno-unknown-pragmas -Wall -Wcast-align -Wundef -Wformat-security -Wwrite-strings -Wno-sign-compare -Wno-conversion -Wno-error=deprecated-declarations -Wno-cast-align -Wno-tautological-compare -Wno-unused-value -Wno-constant-logical-operand -fdiagnostics-show-note-include-stack -Wno-unknown-warning-option -Wno-extern-c-compat -Wno-unknown-attributes -Wno-ignored-qualifiers -Wno-pragma-pack -m32 -Wno-uninitialized -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -Wno-format-extra-args -Wno-switch -x objective-c++ -std=c++14 -Wpointer-arith  -o "../../../../osx_clang/obj/x32/Release/3rdparty/bgfx/src/glcontext_nsgl.o" -c "../../../../../3rdparty/bgfx/src/glcontext_nsgl.mm"

In file included from ../../../../../3rdparty/bgfx/src/glcontext_nsgl.mm:11:
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:248:39: error: 
      unknown type name 'NSExtensionContext'; did you mean 'NSAnimationContext'?
@property (nullable, readonly,retain) NSExtensionContext *extensionConte...
                                      ^
In file included from ../../../../../3rdparty/bgfx/src/glcontext_nsgl.mm:11:
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:17:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSAnimationContext.h:19:12: note: 
      'NSAnimationContext' declared here
@interface NSAnimationContext : NSObject
           ^

In file included from ../../../../../3rdparty/bgfx/src/glcontext_nsgl.mm:11:
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 ../../../../../3rdparty/bgfx/src/glcontext_nsgl.mm:11:
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:252:
/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)
           ^
4 errors generated.
make[2]: *** [../../../../osx_clang/obj/x32/Release/3rdparty/bgfx/src/glcontext_nsgl.o] Error 1
make[1]: *** [bgfx] Error 2
User avatar
No.17945
cuavas
Administrator
Sep 8, 2020, 17:14
Checking the Apple documentation for those classes doesn't show them as deprecated, so I don’t know why it’s not finding them:

https://developer.apple.com/documentation/foundation/nsextensioncontext?language=objc
https://developer.apple.com/documentation/foundation/nsitemprovider?language=objc
User avatar
No.17946
Justin Kerk
Developer
Sep 8, 2020, 17:26
The issue is in 3rd party code so please file it upstream at https://github.com/bkaradzic/bgfx
User avatar
No.17959
balrog
Developer
Sep 10, 2020, 15:12
edited on: Sep 10, 2020, 15:41
I see that you're using the Apple Command Line Tools. Can you do the following?

1. Download the latest beta of Xcode from https://developer.apple.com/download/more , install it, and then use the xcode-select command to set its Developer directory (/path/to/Xcode-beta.app/Contents/Developer) as the current Xcode active developer directory. Then test compile.

2. Download the latest beta of the Xcode command line tools from the above URL, and then use the xcode-select command to set its Developer directory (/Library/Developer/CommandLineTools) as the current Xcode active developer directory. Then test compile.

There have been various reports that the macOS Catalina Command Line Tools are incompatible with Big Sur.
User avatar
No.17960
Fujix
Administrator
Sep 10, 2020, 16:14
edited on: Sep 10, 2020, 16:14
Fixed the word wrapping issue of the pre tag.
User avatar
No.17977
Tafoid
Administrator
Sep 15, 2020, 20:26
Awaiting some feedback from OP regarding this.
User avatar
No.17987
Dominus
Tester
Sep 18, 2020, 20:01
Balrog: I did as you asked, I was already on the bate as only the beta Xcode runs on the ARM DTK. I've now painfully made sure that I'm using matching commandline tools and xcode versions. For some reason Apple is not able to provide matching CLT for the latest Xcode 12 beta (6) or the 12.2 beta.
BUT the issue itself is not budging:
- xcode-select set to xcode-beta (either 12 beta 5 or 6): it dies everytime with
3rdparty/genie/bin/darwin/genie --distro=generic --OPTIMIZE=3 --target='mame' --subtarget='mame' --build-dir='build' --SDL_INSTALL_ROOT='/opt/arm' --NOASM='1' --osd='sdl' --targetos='macosx' --PLATFORM='arm' --gcc=osx-clang --gcc_version=12.0.0 gmake
make: *** [build/projects/sdl/mame/gmake-osx-clang/Makefile] Killed: 9

- xcode-select set to CLT: back to the original reported problem

Next up trying Xcode 12.2 beta but without CLT I fear it will not go further.
I've not tried Xcode 12 GM, because AFAIK it is NOT supposed to be used with the DTK

@Tafoid: sorry, I thought I'd get an automated mail notification if there is a reply, so I missed the ongoing conversation here.

@cuavas: as this is for the ARM SDK which is still in beta, deprecations might have been applied that are not yet in the official docs.
User avatar
No.17988
Tafoid
Administrator
Sep 18, 2020, 20:29
If you need to there is a button when you view the bug report "Monitor Issue" which should set you up with Email updates on notes posted to your email provided here.
User avatar
No.17993
Dominus
Tester
Sep 21, 2020, 11:01
the issue of it dying with "genie" is an odd one related to switching the active developer directory. Only a reboot of the DTK did make this stick (just restarting the Terminal app did not help).
With this working (with the Xcode-beta app as active developer directory) the compile broke at the same point.

I tried with bgfx upstream and that did build *BUT* I ran into another problem, that showed that bgfx was building for x86_64 not ARM64. So IMHO it points at only the ARM build being affected. So I really think there is an issue with these things from the SDK building for ARM. Possible deprecations.
User avatar
No.18002
balrog
Developer
Sep 25, 2020, 14:43
edited on: Sep 25, 2020, 14:55
It looks like Xcode 12.2 is supported on the DTK. I don't see a matching Command Line Tools package yet.
You should not need CLT if Xcode is installed. Both should contain all the required headers and packages.
User avatar
No.18172
Dominus
Tester
Nov 21, 2020, 08:29
As balrog has a working fix for this, I consider this bug resolved :)
Thank you all, especially balrog!
User avatar
No.18173
Robbbert
Senior Tester
Nov 21, 2020, 09:20
Resolved as per OPs statement.