shoenig / go-m1cpu Goto Github PK
View Code? Open in Web Editor NEWLibrary for inspecting Apple Silicon CPUs in Go
License: Mozilla Public License 2.0
Library for inspecting Apple Silicon CPUs in Go
License: Mozilla Public License 2.0
I'm trying to run testcontainers on sonoma 14.6.1 but go-m1cpu which is listed as one of the dependencies, fails to build with the below error:
1 error generated.
# github.com/shoenig/go-m1cpu
../../go/pkg/mod/github.com/shoenig/[email protected]/cpu.go:8:11: fatal error: 'IOKit/IOKitLib.h' file not found
#include <IOKit/IOKitLib.h>
Below is my machine info:
❯ uname -v
Darwin Kernel Version 23.6.0: Mon Jul 29 21:14:30 PDT 2024; root:xnu-10063.141.2~1/RELEASE_ARM64_T6030
I have tried updating/installing XCode and CLTs but still it fails to build.
macOS: 14.6.1-arm64
CLT: 15.3.0.0.1.1708646388
Xcode: 15.4
Rosetta 2: false
Possible issue being :
In the newer versions of MacOS the headers files have been moved from/usr/include
to Xcode bundle under /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk
.
So fsevents is failing to build since its possibly trying to find the files in the original location.
This changed has been applied for new Mac and Xcode versions 10 and above.
Check release notes.
If you are the maintainer of such software, we encourage you to update your project to work with the SDK or file a bug report for issues that are preventing you from doing so
I have even tried setting appropriate CGO_CFLAGS
and CGO_LDFLAGS
before running :
#cgo CFLAGS: -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/System/Library/Frameworks/IOKit.framework/Headers
for cgo to find the header files under the Xcode.app location but the issue remains the same.
Please advice. Thank you!
# github.com/shoenig/go-m1cpu
../gopath/pkg/mod/github.com/shoenig/[email protected]/cpu.go:65:33: error: use of undeclared identifier 'kIOMainPortDefault'; did you mean 'kIOMasterPortDefault'?
IOServiceGetMatchingServices(kIOMainPortDefault, matching, &iter);
^~~~~~~~~~~~~~~~~~
kIOMasterPortDefault
/nix/store/qgi0x5iwmrbxvbjfqx1kbc16xj49pnk1-apple-framework-IOKit-11.0.0/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:103:19: note: 'kIOMasterPortDefault' declared here
const mach_port_t kIOMasterPortDefault;
^
1 error generated.
make[1]: *** [GNUmakefile:97: pkg/darwin_arm64/nomad] Error 2
make: *** [GNUmakefile:267: dev] Error 2
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.