-
Notifications
You must be signed in to change notification settings - Fork 75
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
v3.1/gles2: installing GLES2 shows "fatal error: KHR/khrplatform.h: No such file or directory" #125
Comments
meto
|
Bump! I am having the same exact error. |
Having some difficulties trying to get ANGLE to work. |
I am able to get this works with Google/ANGLE. What I did is to set the CFlags and LDFlags like this: CGO_CFLAGS=-I/Users/zhao/workspace/angle/include In /Users/zhao/workspace/angle/out/Release it contains these two libs: libEGL.dylib and libGLESv2.dylib Here is the PR to allow building go-gl/gl with tags on macOS: #134 Similar to windows, also need to set the flags above and link to libEGL.dll, libGLESv2.dll and d3dcompiler_47.dll Here is the related PR for windows: #133 Note: this is for the Intel Mac. I failed to build ANGLE with M1 Mac. |
@zwang wow thanks! I will try it out when I get a chance and write back with my results. |
@zwang I managed to build it after several hours of messing with go mod and KHR deps. But i get the following error. Please help 😅
EDIT: If i remove the following hint/line from my code
|
It seems that on OSX, cgo is igorning the Setting the env variable I also ran The mac equivalent of linux's This is why I believe cgo is ignoring the EDIT: The question still remains, does it matter that an older version is found? I think it does. One of the libs in my system has reference to Metal, the other does not. See below for the 2 outputs.
This has reference to metal.
|
Some more update. I noticed that
|
Getting close!
And the output from
Notice the first line, |
FINALLY! Found the solution that works.
The results from
This is the output from my program once it worked.
and after I changed my code to use OpenGL ES 2.0, the output is
not sure why it says 3.0.0 even thought I only want v2.0 ... but at least it works. |
I still have a similar issue on macOS (Apple Silicon), what could be a mistake from my side?
|
Fall back to an old version solves the issue: diff --git a/go.mod b/go.mod
index 62291a2..510b6d6 100644
--- a/go.mod
+++ b/go.mod
go 1.17
require (
- github.com/go-gl/gl v0.0.0-20210501111010-69f74958bac0
+ github.com/go-gl/gl v0.0.0-20190320180904-bf2b1f2f34d7 |
Tried to download & install GLES2 with
go get -u github.com/go-gl/gl/v3.1/gles2
. Git the following error:fatal error: KHR/khrplatform.h: No such file or directory
.Im using GO 1.14.2 with MinGW GCC 8.1.0.
All correctly installed.
The file "khrplatform.h" does simply not exist within the include directories of GCC.
The text was updated successfully, but these errors were encountered: