go: crypto: "error Never include this file directly. Use instead." during test
Hi,
We just got the following report, https://youtrack.jetbrains.com/issue/GO-5653, on our issue tracker but I believe this is a Go issue.
By the looks of it, the user is using at least Go 1.10 on a macOS. I suspect this has something to do with the fact that we force Go to compile the test binary with -gcflags="all=-N -l"
in order to improve the debugging experience for the users.
Thank you.
OS: Mac OS X (10.13.4, x86_64)
GOROOT=/usr/local/go
GOPATH=/Users/xueqzhan/source/go
/usr/local/go/bin/go test -c -o /private/var/folders/fx/2f29vz253_z8grcj9cbkq3jw0000gn/T/___TestFollowerOnly_in_planner_scheduler_election -gcflags "all=-N -l" planner-scheduler/election
# crypto/x509
In file included from /usr/local/go/src/crypto/x509/root_cgo_darwin.go:16:
In file included from /System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:43:
In file included from /System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:72:
/usr/local/include/Block.h:16:3: error: Never include this file directly. Use <lzma.h> instead.
# error Never include this file directly. Use <lzma.h> instead.
^
1 error generated.
Compilation finished with exit code 2
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 1
- Comments: 18 (5 by maintainers)
I get same error when I copy Applications from one Macbook to another , maybe the copy that overlay the “/usr/local/include” dir , so move it and use global librarys . you can execute : sudo mv /usr/local/include /usr/local/include_old
and try again
sudo mv /usr/local/include /usr/local/include_old
In case you don’t want to mess with the whole
/usr/local/include
directory - you can also justrm /usr/local/include/block.h
you are welcome, It’s been bothering me for a long time too.
Yay!