Giter Club home page Giter Club logo

go-m1cpu's People

Contributors

dependabot[bot] avatar gmwiz avatar shoenig avatar zhongruoyu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

go-m1cpu's Issues

go-m1cpu fails to build on darwin macos sonoma 14.6 with error `header file not found`

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!

Error when trying to build nomad master on apple M2

# 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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.