Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build error from mac osx 10.15 fatal error: 'IOKit/IOTypes.h' file not found #18

Open
huahuayu opened this issue Nov 12, 2020 · 4 comments

Comments

@huahuayu
Copy link

hi, when I build a project which depends on notify in mac osx 10.15 , it gets below error

the detail step is described here: would you please to check: ethereum/go-ethereum#21835

error info

# github.com/karalabe/usb
In file included from ../../pkg/mod/github.com/karalabe/[email protected]/libs.go:50:
In file included from ../../pkg/mod/github.com/karalabe/[email protected]/libusb/libusb/os/darwin_usb.c:72:
../../pkg/mod/github.com/karalabe/[email protected]/libusb/libusb/os/darwin_usb.h:25:10: fatal error: 'IOKit/IOTypes.h' file not found
#include <IOKit/IOTypes.h>
         ^~~~~~~~~~~~~~~~~
../../pkg/mod/github.com/karalabe/[email protected]/libusb/libusb/os/darwin_usb.h:25:10: note: did not find header 'IOTypes.h' in framework 'IOKit' (loaded from '/System/Library/Frameworks')
1 error generated.
@huahuayu
Copy link
Author

huahuayu commented Nov 12, 2020

but I can see the header file is here:

/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/IOKit/IOTypes.h

I made symbolic links to /usr/local/include/ but not working, it seems loaded from '/System/Library/Frameworks', I don't know the specific path, why not read from /usr/local/include/

sudo ln -s sudo ln -s /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/IOKit/*  /usr/local/include/

@huahuayu
Copy link
Author

below ln is work!

sudo ln -s /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/IOKit.framework/Versions/A/Headers /System/Library/Frameworks/IOKit.framework

@huahuayu
Copy link
Author

similar issue rjeczalik/notify#196

@Danyalkasiri
Copy link

hi, when I build a project which depends on notify in mac osx 10.15 , it gets below error

the detail step is described here: would you please to check: ethereum/go-ethereum#21835

error info

# github.com/karalabe/usb
In file included from ../../pkg/mod/github.com/karalabe/[email protected]/libs.go:50:
In file included from ../../pkg/mod/github.com/karalabe/[email protected]/libusb/libusb/os/darwin_usb.c:72:
../../pkg/mod/github.com/karalabe/[email protected]/libusb/libusb/os/darwin_usb.h:25:10: fatal error: 'IOKit/IOTypes.h' file not found
#include <IOKit/IOTypes.h>
         ^~~~~~~~~~~~~~~~~
../../pkg/mod/github.com/karalabe/[email protected]/libusb/libusb/os/darwin_usb.h:25:10: note: did not find header 'IOTypes.h' in framework 'IOKit' (loaded from '/System/Library/Frameworks')
1 error generated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants