Git Product home page Git Product logo

Comments (11)

ben-clayton avatar ben-clayton commented on May 3, 2024

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.

jimmykuu avatar jimmykuu commented on May 3, 2024
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.

slimsag avatar slimsag commented on May 3, 2024

@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.

nstratos avatar nstratos commented on May 3, 2024

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.

slimsag avatar slimsag commented on May 3, 2024

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.

nstratos avatar nstratos commented on May 3, 2024

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.

ShawnMilo avatar ShawnMilo commented on May 3, 2024

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.

crawshaw avatar crawshaw commented on May 3, 2024

@ShawnMilo please file a separate issue for the dockerfile. It may not happen soon, but it should be tracked separately.

from gxui.

ajstarks avatar ajstarks commented on May 3, 2024

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.

ben-clayton avatar ben-clayton commented on May 3, 2024

@slimsag Thanks Stephen - I've updated to use v3.2-core instead.

from gxui.

ben-clayton avatar ben-clayton commented on May 3, 2024

This should now be fixed after running:
go get github.com/go-gl/gl/v3.2-core/gl

from gxui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.