Hello, I tied to compile a simple hello.c program using clang on the DTK. It complains:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:807:2: error: Unsupported architecture
Wondering how to fix this.
local~> hostinfo
Mach kernel version:
Darwin Kernel Version 20.0.0: Sun Jun 14 21:36:36 PDT 2020; root:Bridgexnu-7090.111.5.2~1/RELEASEARM64_T8020
Kernel configured for up to 8 processors.
8 processors are physically available.
8 processors are logically available.
Processor type: arm64e (ARM64E)
Processors active: 0 1 2 3 4 5 6 7
Primary memory available: 16.00 gigabytes
Default processor set: 370 tasks, 1252 threads, 8 processors
Load average: 0.44, Mach factor: 7.55
local~> clang --version
Apple clang version 12.0.0 (clang-1200.0.32.2)
Target: arm64-apple-darwin20.0.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:807:2: error: Unsupported architecture
Wondering how to fix this.
local~> hostinfo
Mach kernel version:
Darwin Kernel Version 20.0.0: Sun Jun 14 21:36:36 PDT 2020; root:Bridgexnu-7090.111.5.2~1/RELEASEARM64_T8020
Kernel configured for up to 8 processors.
8 processors are physically available.
8 processors are logically available.
Processor type: arm64e (ARM64E)
Processors active: 0 1 2 3 4 5 6 7
Primary memory available: 16.00 gigabytes
Default processor set: 370 tasks, 1252 threads, 8 processors
Load average: 0.44, Mach factor: 7.55
local~> clang --version
Apple clang version 12.0.0 (clang-1200.0.32.2)
Target: arm64-apple-darwin20.0.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
This is working for me:
One thing to check is that you have the latest Xcode installed (12.2b1) and that it’s currently selected:
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"
Code Block % sw_vers ProductName: macOS ProductVersion: 11.0 BuildVersion: 20A5374i % cc hello.c … some meaningless warnings … % ./a.out Hello Cruel World!
One thing to check is that you have the latest Xcode installed (12.2b1) and that it’s currently selected:
Code Block % xcode-select -p /Applications/Xcode-beta.app/Contents/Developer % plutil -p /Applications/Xcode-beta.app/Contents/Info.plist | grep 'CFBundle.*Version' … "CFBundleShortVersionString" => "12.2" "CFBundleVersion" => "17512.1"
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"