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 fails with "fatal error: glfw/src/context.c: No such file or directory" #7

Closed
kortschak opened this issue Nov 30, 2018 · 4 comments

Comments

@kortschak
Copy link

As filed in #6, building diagram fails with a failure to find components from glfw, even when glfw is installed (though note that the README does not give instructions detailing deps for diagram).

This failure occurs with current Go releast go1.11.1 and with go1.9.7 which is approximately what is being tested on by this project at travis - which also fails in the same manner.

~ $ uname -a
Linux cube 4.4.0-139-generic #165-Ubuntu SMP Wed Oct 24 10:58:50 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
~ $ go version
go version go1.9.7 linux/amd64
~ $ dpkg -l libglfw*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-=================================
ii  libglfw3:amd64 3.1.2-3      amd64        portable library for OpenGL, wind
ii  libglfw3-dev:a 3.1.2-3      amd64        portable library for OpenGL, wind
~/src/github.com/esimov/diagram [master]$ go install
# github.com/esimov/diagram/vendor/github.com/go-gl/glfw/v3.2/glfw
vendor/github.com/go-gl/glfw/v3.2/glfw/c_glfw.go:4:30: fatal error: glfw/src/context.c: No such file or directory
compilation terminated.

Invoking build.sh also fails with the same error.

Maybe you are building glfw locally and this is the difference? But with the current instructions, this doesn't build.

@kortschak
Copy link
Author

If I copy the directory of github.com/go-gl/glfw/v3.2/glfw/glfw into your vendor directory to the appropriate place from the commit specified in your Gopkg,lock then it builds. So it looks like you've not properly committed the vendored package there.

@esimov
Copy link
Owner

esimov commented Dec 3, 2018

Hey @kortschak thanks for notifying me about this error and also for taking the effort to debug it. You was right that the reason for the compiler build error was the incorrect vendor dependency generated by go-dep. For some reason generating the dependency tree with go-dep resulted in a truncated glfw library, but copying manually the glfw library into the vendor folder resolved the issue.

I've updated the library with the corrected dependency tree. Also the readme file was updated with a more clear explanation. Please check it now and let me know if it's working.

Thanks, @esimov

@esimov
Copy link
Owner

esimov commented Dec 10, 2018

Since i haven't received any feedback from my last update, i will close this ticket.

@esimov esimov closed this as completed Dec 10, 2018
@kortschak
Copy link
Author

Sorry about that. Yes, I can confirm this is fixed.

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