Previous Thread
Next Thread
Print Thread
Joined: Sep 2000
Posts: 249
W
will Offline OP
Senior Member
OP Offline
Senior Member
W
Joined: Sep 2000
Posts: 249
Getting errors trying to compile mame 0252:


Clang 11.0.3 detected
/Library/Developer/CommandLineTools/usr/bin/make -R --no-print-directory -C build/projects/sdl/mame/gmake-osx-clang config=release64 precompile
Objective-C compiling 3rdparty/bgfx/src/renderer_mtl.mm...
../../../../../3rdparty/bgfx/src/renderer_mtl.mm:323:5: error: 'MTLPixelFormatB5G6R5Unorm' is unavailable: not available
on macOS
{ MTLPixelFormatB5G6R5Unorm, MTLPixelFormatInvalid, MTL...
^
In file included from ../../../../../3rdparty/bgfx/src/renderer_mtl.mm:10:
In file included from ../../../../../3rdparty/bgfx/src/renderer_mtl.h:13:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CAMetalLayer.h:8:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLPixelFormat.h:43:5: note:
'MTLPixelFormatB5G6R5Unorm' has been explicitly marked unavailable here
MTLPixelFormatB5G6R5Unorm API_AVAILABLE(ios(8.0)) API_UNAVAILABLE(macos, macCatalyst) = 40,
^
../../../../../3rdparty/bgfx/src/renderer_mtl.mm:324:5: error: 'MTLPixelFormatB5G6R5Unorm' is unavailable: not available
on macOS
{ MTLPixelFormatB5G6R5Unorm, MTLPixelFormatInvalid, MTL...
^
In file included from ../../../../../3rdparty/bgfx/src/renderer_mtl.mm:10:
In file included from ../../../../../3rdparty/bgfx/src/renderer_mtl.h:13:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CAMetalLayer.h:8:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLPixelFormat.h:43:5: note:
'MTLPixelFormatB5G6R5Unorm' has been explicitly marked unavailable here
MTLPixelFormatB5G6R5Unorm API_AVAILABLE(ios(8.0)) API_UNAVAILABLE(macos, macCatalyst) = 40,
^
../../../../../3rdparty/bgfx/src/renderer_mtl.mm:325:5: error: 'MTLPixelFormatABGR4Unorm' is unavailable: not available
on macOS
{ MTLPixelFormatABGR4Unorm, MTLPixelFormatInvalid, MTL...
^
In file included from ../../../../../3rdparty/bgfx/src/renderer_mtl.mm:10:
In file included from ../../../../../3rdparty/bgfx/src/renderer_mtl.h:13:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CAMetalLayer.h:8:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLPixelFormat.h:45:5: note:
'MTLPixelFormatABGR4Unorm' has been explicitly marked unavailable here
MTLPixelFormatABGR4Unorm API_AVAILABLE(ios(8.0)) API_UNAVAILABLE(macos, macCatalyst) = 42,
^
../../../../../3rdparty/bgfx/src/renderer_mtl.mm:326:5: error: 'MTLPixelFormatABGR4Unorm' is unavailable: not available
on macOS
{ MTLPixelFormatABGR4Unorm, MTLPixelFormatInvalid, MTL...
^
In file included from ../../../../../3rdparty/bgfx/src/renderer_mtl.mm:10:
In file included from ../../../../../3rdparty/bgfx/src/renderer_mtl.h:13:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CAMetalLayer.h:8:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLPixelFormat.h:45:5: note:
'MTLPixelFormatABGR4Unorm' has been explicitly marked unavailable here
MTLPixelFormatABGR4Unorm API_AVAILABLE(ios(8.0)) API_UNAVAILABLE(macos, macCatalyst) = 42,
^
../../../../../3rdparty/bgfx/src/renderer_mtl.mm:327:5: error: 'MTLPixelFormatBGR5A1Unorm' is unavailable: not available
on macOS
{ MTLPixelFormatBGR5A1Unorm, MTLPixelFormatInvalid, MTL...
^
In file included from ../../../../../3rdparty/bgfx/src/renderer_mtl.mm:10:
In file included from ../../../../../3rdparty/bgfx/src/renderer_mtl.h:13:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CAMetalLayer.h:8:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLPixelFormat.h:46:5: note:
'MTLPixelFormatBGR5A1Unorm' has been explicitly marked unavailable here
MTLPixelFormatBGR5A1Unorm API_AVAILABLE(ios(8.0)) API_UNAVAILABLE(macos, macCatalyst) = 43,
^
../../../../../3rdparty/bgfx/src/renderer_mtl.mm:328:5: error: 'MTLPixelFormatBGR5A1Unorm' is unavailable: not available
on macOS
{ MTLPixelFormatBGR5A1Unorm, MTLPixelFormatInvalid, MTL...
^
In file included from ../../../../../3rdparty/bgfx/src/renderer_mtl.mm:10:
In file included from ../../../../../3rdparty/bgfx/src/renderer_mtl.h:13:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CAMetalLayer.h:8:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLPixelFormat.h:46:5: note:
'MTLPixelFormatBGR5A1Unorm' has been explicitly marked unavailable here
MTLPixelFormatBGR5A1Unorm API_AVAILABLE(ios(8.0)) API_UNAVAILABLE(macos, macCatalyst) = 43,
^
6 errors generated.
make[2]: *** [../../../../osx_clang/obj/x64/Release/3rdparty/bgfx/src/renderer_mtl.o] Error 1
make[1]: *** [bgfx] Error 2
make: *** [macosx_x64_clang] Error 2



=will=
Joined: Sep 2000
Posts: 249
W
will Offline OP
Senior Member
OP Offline
Senior Member
W
Joined: Sep 2000
Posts: 249
BTW I'm running macOS 13.2.1 on an Intel iMac from 2017.

SDL2 version 2.26.1


=will=
Joined: Mar 2001
Posts: 17,098
Likes: 153
R
Very Senior Member
Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 17,098
Likes: 153
Clang 11 is likely the problem. I'm on 13.2.1 also with Xcode 14.2 and I get "Clang 14.0.0 detected" and it builds fine.

Joined: May 2016
Posts: 37
L
Member
Offline
Member
L
Joined: May 2016
Posts: 37
I'm using clang 14.0.0 (also a 13.2.1 Mac with M1 CPU) and getting compile fails, but a fail in a different place with a lot of additional errors after the initial one:

Code
Compiling src/osd/modules/lib/osdlib_macosx.cpp...
In file included from ../../../../../src/osd/modules/lib/osdlib_macosx.cpp:29:
In file included from /Library/Frameworks/Carbon.framework/Headers/Carbon.h:20:
In file included from /Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:19:
In file included from /Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:48:
In file included from /Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:19:
/Library/Frameworks/CoreFoundation.framework/Headers/CFAvailability.h:183:5: error: 'DEPLOYMENT_RUNTIME_SWIFT' is not defined, evaluates to 0 [-Werror,-Wundef]
#if DEPLOYMENT_RUNTIME_SWIFT
    ^
In file included from ../../../../../src/osd/modules/lib/osdlib_macosx.cpp:29:
In file included from /Library/Frameworks/Carbon.framework/Headers/Carbon.h:20:
In file included from /Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:19:
In file included from /Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:48:
/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:45:6: error: '__BIG_ENDIAN__' is not defined, evaluates to 0 [-Werror,-Wundef]
#if !__BIG_ENDIAN__ && !__LITTLE_ENDIAN__
     ^
/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:49:5: error: '__BIG_ENDIAN__' is not defined, evaluates to 0 [-Werror,-Wundef]
#if __BIG_ENDIAN__ && __LITTLE_ENDIAN__
    ^
/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:478:5: error: '__LLP64__' is not defined, evaluates to 0 [-Werror,-Wundef]
#if __LLP64__
    ^
/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:683:5: error: 'DEPLOYMENT_RUNTIME_SWIFT' is not defined, evaluates to 0 [-Werror,-Wundef]
#if DEPLOYMENT_RUNTIME_SWIFT
    ^
/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:710:5: error: 'DEPLOYMENT_RUNTIME_SWIFT' is not defined, evaluates to 0 [-Werror,-Wundef]
#if DEPLOYMENT_RUNTIME_SWIFT
    ^
In file included from ../../../../../src/osd/modules/lib/osdlib_macosx.cpp:29:
In file included from /Library/Frameworks/Carbon.framework/Headers/Carbon.h:20:
In file included from /Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:19:
In file included from /Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:54:
In file included from /Library/Frameworks/CoreFoundation.framework/Headers/CFCalendar.h:16:
In file included from /Library/Frameworks/CoreFoundation.framework/Headers/CFTimeZone.h:18:
/Library/Frameworks/CoreFoundation.framework/Headers/CFString.h:157:5: error: 'DEPLOYMENT_RUNTIME_SWIFT' is not defined, evaluates to 0 [-Werror,-Wundef]
#if DEPLOYMENT_RUNTIME_SWIFT
    ^
/Library/Frameworks/CoreFoundation.framework/Headers/CFString.h:167:5: error: 'DEPLOYMENT_RUNTIME_SWIFT' is not defined, evaluates to 0 [-Werror,-Wundef]
#if DEPLOYMENT_RUNTIME_SWIFT && TARGET_OS_MAC
    ^
In file included from ../../../../../src/osd/modules/lib/osdlib_macosx.cpp:29:
In file included from /Library/Frameworks/Carbon.framework/Headers/Carbon.h:20:
In file included from /Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:19:
In file included from /Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:66:
In file included from /Library/Frameworks/CoreFoundation.framework/Headers/CFPropertyList.h:17:
In file included from /Library/Frameworks/CoreFoundation.framework/Headers/CFStream.h:16:
/Library/Frameworks/CoreFoundation.framework/Headers/CFURL.h:1188:6: error: 'DEPLOYMENT_TARGET_SWIFT' is not defined, evaluates to 0 [-Werror,-Wundef]
#if !DEPLOYMENT_TARGET_SWIFT
     ^
In file included from ../../../../../src/osd/modules/lib/osdlib_macosx.cpp:29:
In file included from /Library/Frameworks/Carbon.framework/Headers/Carbon.h:20:
In file included from /Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:23:
In file included from /Library/Frameworks/AE.framework/Headers/AE.h:20:
In file included from /Library/Frameworks/CarbonCore.framework/Headers/CarbonCore.h:35:
/Library/Frameworks/CarbonCore.framework/Headers/FixMath.h:80:26: error: '__ppc64__' is not defined, evaluates to 0 [-Werror,-Wundef]
#elif defined __ppc__ || __ppc64__ || __arm64__
                         ^
In file included from ../../../../../src/osd/modules/lib/osdlib_macosx.cpp:29:
In file included from /Library/Frameworks/Carbon.framework/Headers/Carbon.h:20:
In file included from /Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:23:
In file included from /Library/Frameworks/AE.framework/Headers/AE.h:20:
In file included from /Library/Frameworks/CarbonCore.framework/Headers/CarbonCore.h:39:
In file included from /Library/Frameworks/CarbonCore.framework/Headers/Script.h:21:
/Library/Frameworks/CarbonCore.framework/Headers/IntlResources.h:197:5: error: '__BIG_ENDIAN__' is not defined, evaluates to 0 [-Werror,-Wundef]
#if __BIG_ENDIAN__
    ^
In file included from ../../../../../src/osd/modules/lib/osdlib_macosx.cpp:29:
In file included from /Library/Frameworks/Carbon.framework/Headers/Carbon.h:20:
In file included from /Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:23:
In file included from /Library/Frameworks/AE.framework/Headers/AE.h:20:
In file included from /Library/Frameworks/CarbonCore.framework/Headers/CarbonCore.h:39:
/Library/Frameworks/CarbonCore.framework/Headers/Script.h:837:3: warning: 'ScriptTokenType' is deprecated: first deprecated in macOS 13.0 - Deprecated [-Wdeprecated-declarations]
  ScriptTokenType     theToken;
  ^
/Library/Frameworks/CarbonCore.framework/Headers/Script.h:833:41: note: 'ScriptTokenType' has been explicitly marked deprecated here
typedef short                           ScriptTokenType API_DEPRECATED( "Deprecated", macos(10.0,13.0));;
                                        ^
/Library/Frameworks/CarbonCore.framework/Headers/Script.h:857:3: warning: 'ScriptTokenType' is deprecated: first deprecated in macOS 13.0 - Deprecated [-Wdeprecated-declarations]
  ScriptTokenType     leftDelims[2];
  ^
/Library/Frameworks/CarbonCore.framework/Headers/Script.h:833:41: note: 'ScriptTokenType' has been explicitly marked deprecated here
typedef short                           ScriptTokenType API_DEPRECATED( "Deprecated", macos(10.0,13.0));;
                                        ^
/Library/Frameworks/CarbonCore.framework/Headers/Script.h:858:3: warning: 'ScriptTokenType' is deprecated: first deprecated in macOS 13.0 - Deprecated [-Wdeprecated-declarations]
  ScriptTokenType     rightDelims[2];
  ^
/Library/Frameworks/CarbonCore.framework/Headers/Script.h:833:41: note: 'ScriptTokenType' has been explicitly marked deprecated here
typedef short                           ScriptTokenType API_DEPRECATED( "Deprecated", macos(10.0,13.0));;
                                        ^
/Library/Frameworks/CarbonCore.framework/Headers/Script.h:859:3: warning: 'ScriptTokenType' is deprecated: first deprecated in macOS 13.0 - Deprecated [-Wdeprecated-declarations]
  ScriptTokenType     leftComment[4];
  ^
/Library/Frameworks/CarbonCore.framework/Headers/Script.h:833:41: note: 'ScriptTokenType' has been explicitly marked deprecated here
typedef short                           ScriptTokenType API_DEPRECATED( "Deprecated", macos(10.0,13.0));;
                                        ^
/Library/Frameworks/CarbonCore.framework/Headers/Script.h:860:3: warning: 'ScriptTokenType' is deprecated: first deprecated in macOS 13.0 - Deprecated [-Wdeprecated-declarations]
  ScriptTokenType     rightComment[4];
  ^
/Library/Frameworks/CarbonCore.framework/Headers/Script.h:833:41: note: 'ScriptTokenType' has been explicitly marked deprecated here
typedef short                           ScriptTokenType API_DEPRECATED( "Deprecated", macos(10.0,13.0));;
                                        ^
/Library/Frameworks/CarbonCore.framework/Headers/Script.h:861:3: warning: 'ScriptTokenType' is deprecated: first deprecated in macOS 13.0 - Deprecated [-Wdeprecated-declarations]
  ScriptTokenType     escapeCode;             /*escape symbol code*/
  ^
/Library/Frameworks/CarbonCore.framework/Headers/Script.h:833:41: note: 'ScriptTokenType' has been explicitly marked deprecated here
typedef short                           ScriptTokenType API_DEPRECATED( "Deprecated", macos(10.0,13.0));;
                                        ^
/Library/Frameworks/CarbonCore.framework/Headers/Script.h:862:3: warning: 'ScriptTokenType' is deprecated: first deprecated in macOS 13.0 - Deprecated [-Wdeprecated-declarations]
  ScriptTokenType     decimalCode;
  ^
/Library/Frameworks/CarbonCore.framework/Headers/Script.h:833:41: note: 'ScriptTokenType' has been explicitly marked deprecated here
typedef short                           ScriptTokenType API_DEPRECATED( "Deprecated", macos(10.0,13.0));;
                                        ^
In file included from ../../../../../src/osd/modules/lib/osdlib_macosx.cpp:29:
In file included from /Library/Frameworks/Carbon.framework/Headers/Carbon.h:20:
In file included from /Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:23:
In file included from /Library/Frameworks/AE.framework/Headers/AE.h:20:
In file included from /Library/Frameworks/CarbonCore.framework/Headers/CarbonCore.h:67:
/Library/Frameworks/CarbonCore.framework/Headers/Math64.h:47:7: error: 'MATH64_USE_INLINE' is not defined, evaluates to 0 [-Werror,-Wundef]
  #if MATH64_USE_INLINE
      ^
/Library/Frameworks/CarbonCore.framework/Headers/Math64.h:69:7: error: 'MATH64_USE_INLINE' is not defined, evaluates to 0 [-Werror,-Wundef]
  #if MATH64_USE_INLINE
      ^
/Library/Frameworks/CarbonCore.framework/Headers/Math64.h:96:7: error: 'MATH64_USE_INLINE' is not defined, evaluates to 0 [-Werror,-Wundef]
  #if MATH64_USE_INLINE
      ^
/Library/Frameworks/CarbonCore.framework/Headers/Math64.h:123:7: error: 'MATH64_USE_INLINE' is not defined, evaluates to 0 [-Werror,-Wundef]
  #if MATH64_USE_INLINE
      ^
/Library/Frameworks/CarbonCore.framework/Headers/Math64.h:148:7: error: 'MATH64_USE_INLINE' is not defined, evaluates to 0 [-Werror,-Wundef]
  #if MATH64_USE_INLINE
      ^
/Library/Frameworks/CarbonCore.framework/Headers/Math64.h:204:7: error: 'MATH64_USE_INLINE' is not defined, evaluates to 0 [-Werror,-Wundef]
  #if MATH64_USE_INLINE
      ^
/Library/Frameworks/CarbonCore.framework/Headers/Math64.h:230:7: error: 'MATH64_USE_INLINE' is not defined, evaluates to 0 [-Werror,-Wundef]
  #if MATH64_USE_INLINE
      ^
/Library/Frameworks/CarbonCore.framework/Headers/Math64.h:264:7: error: 'MATH64_USE_INLINE' is not defined, evaluates to 0 [-Werror,-Wundef]
  #if MATH64_USE_INLINE
      ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
7 warnings and 20 errors generated.
make[2]: *** [../../../../osx_clang/obj/x64/Release/ocore_sdl/src/osd/modules/lib/osdlib_macosx.o] Error 1
make[1]: *** [ocore_sdl] Error 2
make: *** [macosx_arm64_clang] Error 2

Joined: Mar 2001
Posts: 17,098
Likes: 153
R
Very Senior Member
Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 17,098
Likes: 153
You aren't trying to cross-compile or something weird, are you? None of that should happen.

Try a make clean and then make NOWERROR=1 REGENIE=1 and see if that goes.

Joined: Sep 2000
Posts: 249
W
will Offline OP
Senior Member
OP Offline
Senior Member
W
Joined: Sep 2000
Posts: 249
OK I had to remove the command line tools and reinstall to get Clang 14.
Was able to compile it. Thanks RB!


=will=
Joined: Mar 2001
Posts: 17,098
Likes: 153
R
Very Senior Member
Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 17,098
Likes: 153
Great, will!

Joined: May 2016
Posts: 37
L
Member
Offline
Member
L
Joined: May 2016
Posts: 37
Originally Posted by R. Belmont
You aren't trying to cross-compile or something weird, are you? None of that should happen.

Try a make clean and then make NOWERROR=1 REGENIE=1 and see if that goes.

This is the command that I've used in the past to build:

Code
make -j5 TOOLS=1 REGENIE=1

I'll try with your suggested arguments.

EDIT: Over an hour later and it's still building, so I guess that fixes my problem. I should have just added the -j5 to it so it would have finished in about 30 min instead of still building. I'll test build this again tomorrow with the -j5 to make sure that still works. Thanks for the help.

Last edited by Llaffer; 02/22/23 07:18 AM.

Moderated by  R. Belmont 

Link Copied to Clipboard
Who's Online Now
5 members (Duke, Darkstar, R. Belmont, 2 invisible), 67 guests, and 3 robots.
Key: Admin, Global Mod, Mod
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics9,240
Posts120,958
Members5,061
Most Online1,283
Dec 21st, 2022
Our Sponsor
These forums are sponsored by Superior Solitaire, an ad-free card game collection for macOS and iOS. Download it today!

Superior Solitaire
Forum hosted by www.retrogamesformac.com