Comments (11)
Hi jingweno,
Yes, unfortunately the go-gl-legacy/gl library (which GXUI currently depends on) has a dependency on the GLEW library.
I can confirm GXUI runs on Windows, OSX and Linux, but the GLEW is the most difficult aspect of getting these various targets to build. I will be looking to simplify / remove this GLEW dependency in the near future.
In the meantime, please try following information on: https://github.com/go-gl-legacy/gl
from gxui.
CGO_CFLAGS="-I/usr/local/Cellar/glew/1.11.0/include/GL" CGO_LDFLAGS="-L/usr/local/Cellar/glew/1.11.0/lib" go get github.com/go-gl-legacy/gl
from gxui.
@ben-clayton Hiya (one of the authors of go-gl here) FWIW https://github.com/go-gl/gl (the bindings generated by Glow) do not depend on GLEW for this exact reason.
from gxui.
I encountered the same problem but reached a little further. Now I am getting:
/tmp/go-build140376053/command-line-arguments/_obj/exe/main: error while loading shared libraries: libGLEW.so.1.12: cannot open shared object file: No such file or directory
exit status 127
I am using Ubuntu 14.04 64bit and I suppose it means that it doesn't know the location of the glew library to link it.
What I've done is:
- Installed glew. The make install output is:
install -d -m 0755 "/usr/include/GL"
install -m 0644 include/GL/wglew.h "/usr/include/GL/"
install -m 0644 include/GL/glew.h "/usr/include/GL/"
install -m 0644 include/GL/glxew.h "/usr/include/GL/"
sed \
-e "s|@prefix@|/usr|g" \
-e "s|@libdir@|/usr/lib64|g" \
-e "s|@exec_prefix@|/usr/bin|g" \
-e "s|@includedir@|/usr/include/GL|g" \
-e "s|@version@|1.12.0|g" \
-e "s|@cflags@||g" \
-e "s|@libname@|GLEW|g" \
-e "s|@requireslib@|glu|g" \
< glew.pc.in > glew.pc
install -d -m 0755 "/usr/lib64"
install -m 0644 lib/libGLEW.so.1.12.0 "/usr/lib64/"
ln -sf libGLEW.so.1.12.0 "/usr/lib64/libGLEW.so.1.12"
ln -sf libGLEW.so.1.12.0 "/usr/lib64/libGLEW.so"
install -m 0644 lib/libGLEW.a "/usr/lib64/"
install -d -m 0755 "/usr/lib64"
install -d -m 0755 "/usr/lib64/pkgconfig"
install -m 0644 glew.pc "/usr/lib64/pkgconfig/"
- go get github.com/go-gl-legacy
- cd .../gxui/samples/progress_bar
- go run main.go
/tmp/go-build140376053/command-line-arguments/_obj/exe/main: error while loading shared libraries: libGLEW.so.1.12: cannot open shared object file: No such file or directory
exit status 127
How can I tell go run to use the location of my installed glew?
from gxui.
That error is due to libGLEW.so
not being on your LD_LIBRARY_PATH
(linux) .
Try LD_LIBRARY_PATH=/path/to/glew/lib/dir go run main.go
.
from gxui.
Alright that worked. I used:
LD_LIBRARY_PATH=/usr/lib64 go run main.go
I am trying to run one of the samples, specifically the progress_bar. What I got is:
libGL error: pci id for fd 4: 80ee:beef, driver (null)
OpenGL Warning: glFlushVertexArrayRangeNV not found in mesa table
OpenGL Warning: glVertexArrayRangeNV not found in mesa table
OpenGL Warning: glCombinerInputNV not found in mesa table
OpenGL Warning: glCombinerOutputNV not found in mesa table
OpenGL Warning: glCombinerParameterfNV not found in mesa table
OpenGL Warning: glCombinerParameterfvNV not found in mesa table
OpenGL Warning: glCombinerParameteriNV not found in mesa table
OpenGL Warning: glCombinerParameterivNV not found in mesa table
OpenGL Warning: glFinalCombinerInputNV not found in mesa table
OpenGL Warning: glGetCombinerInputParameterfvNV not found in mesa table
OpenGL Warning: glGetCombinerInputParameterivNV not found in mesa table
OpenGL Warning: glGetCombinerOutputParameterfvNV not found in mesa table
OpenGL Warning: glGetCombinerOutputParameterivNV not found in mesa table
OpenGL Warning: glGetFinalCombinerInputParameterfvNV not found in mesa table
OpenGL Warning: glGetFinalCombinerInputParameterivNV not found in mesa table
OpenGL Warning: glDeleteFencesNV not found in mesa table
OpenGL Warning: glFinishFenceNV not found in mesa table
OpenGL Warning: glGenFencesNV not found in mesa table
OpenGL Warning: glGetFenceivNV not found in mesa table
OpenGL Warning: glIsFenceNV not found in mesa table
OpenGL Warning: glSetFenceNV not found in mesa table
OpenGL Warning: glTestFenceNV not found in mesa table
libGL error: core dri or dri2 extension not found
libGL error: failed to load driver: vboxvideo
panic: open data/SourceCodePro-Regular.ttf: no such file or directory
Edit: Hmm it seems the problem might be that I am running Ubuntu through virtualbox. I will run it natively and post results later. Thanks for the help.
Edit2: To get rid of the error
libGL error: core dri or dri2 extension not found
libGL error: failed to load driver: vboxvideo
I disabled the 3D accelaration on the Ubuntu machine from Virtualbox.
About
panic: open data/SourceCodePro-Regular.ttf: no such file or directory
I downloaded the fonts from 1001freefonts on ~/Downloads/sourcecodepro-fonts/ as described on #5 and then I run
go run main.go -data ~/Downloads/sourcecodepro-fonts/
Now the samples work.
from gxui.
If someone has this working, and is feeling generous, would you create a Dockerfile that builds it, perhaps using the official "golang" Docker image as the base, please? I'd like to help out where I can, and having a working environment without having to "junk up" my actual machine with various dependencies would be wonderful.
from gxui.
@ShawnMilo please file a separate issue for the dockerfile. It may not happen soon, but it should be tracked separately.
from gxui.
my build recipe (on Mac OS X)
$ cd ~/Code
$ git clone https://github.com/nigels-com/glew.git glew
$ cd glew
$ make extensions
$ sudo make install
from gxui.
@slimsag Thanks Stephen - I've updated to use v3.2-core instead.
from gxui.
This should now be fixed after running:
go get github.com/go-gl/gl/v3.2-core/gl
from gxui.
Related Issues (20)
- Resizing grid layout HOT 1
- Problem building gxui - cgo exit status and libintl-8.dll problems? HOT 3
- question freetype didn't findit HOT 3
- Error when run samples HOT 1
- Table cols and rows are reversed. HOT 7
- how to read a pixel on a canvas?
- Examples don't appear to support HiDPI screens HOT 1
- GXUI is now unmaintained HOT 7
- Writing a custom control
- Prohibition on window resizing
- TextBox and/or CodeEditor Multi-Directional Scrolling HOT 6
- Error when run sample on web HOT 2
- building using gb fails
- 官方的gui死掉了? HOT 1
- gxui Project also can restart? HOT 2
- What is the reason behind stopping the development of this project? HOT 2
- pop up box
- Build error HOT 1
- error on go get HOT 1
- possible to use gxui to create webview to load html/js/css as ui HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gxui.