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

cannot find -lXxf86vm #140

Closed
pebbe opened this issue Jul 19, 2015 · 19 comments
Closed

cannot find -lXxf86vm #140

pebbe opened this issue Jul 19, 2015 · 19 comments

Comments

@pebbe
Copy link

pebbe commented Jul 19, 2015

Installation fails:

(peter) ~ go get github.com/go-gl/glfw/v3.1/glfw
# github.com/go-gl/glfw/v3.1/glfw
/usr/bin/ld: cannot find -lXxf86vm
collect2: ld returned 1 exit status
(peter) ~ ll /usr/lib/libXxf86vm*
lrwxrwxrwx 1 root root    19 jun 10  2013 /usr/lib/libXxf86vm.so.1 -> libXxf86vm.so.1.0.0
-rw-r--r-- 1 root root 19808 mei 30  2013 /usr/lib/libXxf86vm.so.1.0.0

go version go1.4.2 linux/amd64
Debian 6.0

@dmitshur
Copy link
Member

This is related to #138. We need to improve the README.

First, can you try a few things:

  1. go get -u github.com/go-gl/glfw/v3.1/glfw Use the -u flag for go get.
  2. If the above doesn't work, try sudo apt-get install libgl1-mesa-dev xorg-dev. What does that say? Afterwards, try the go get -u step above.

Let me know if that works.

@pebbe
Copy link
Author

pebbe commented Jul 19, 2015

After installing xorg-dev, installation of glfw succeeds. And I can build the examples. But when I run an example I get:

failed to initialize glfw: APIUnavailable: GLX: GLX version 1.3 is required

Searching for packages with glx in their name, I get plenty. I wouldn't now which to install.

@dmitshur
Copy link
Member

I just booted up a fresh Ubuntu (it's what I had) VM and after installing Go, I did this one step:

sudo apt-get install libgl1-mesa-dev xorg-dev

Afterwards go get -u github.com/go-gl/glfw/v3.1/glfw worked (as well as building and running examples).

FWIW, I looked at where the libXxf86vm* files ended up, and it was elsewhere. (But I see you've already commented above that it worked for you after getting xorg-dev.)

@dmitshur
Copy link
Member

A GLX version issue is something I expect on when the system is strangely configured and doesn't support OpenGL (e.g., some old VM or really old hardware), or it might be a graphics card drive issue. I'm not sure if it's just a missing library...

However, this might be a GLFW (the C library) issue possibly (but more likely it's something weird with your setup that can be avoided). Take a look at glfw/glfw#522 and see if it's relevant to you.

Also, what does glxinfo print (you might have to do sudo apt-get install mesa-utils)?

dmitshur added a commit that referenced this issue Jul 19, 2015
… comments.

Use -u flag for go get command to ensure latest version is installed (latest versions tend to exist in order to fix bugs and issues).

Mention that dependencies of GLFW (C library) need to be installed (but not GLFW itself, that is built as part of Go package).

Remove old comments like "we're breaking the API" as that's a constant now; the changelog remains below. Also remove comment about adding examples since the README in examples repo does a better job of communicating how to best contribute there. Change title from "bindings" since it's now a more complete Go package, not just bindings.

Use a godoc badge for the documentation link.

Fixes #138 (and related to #140).
@pebbe
Copy link
Author

pebbe commented Jul 19, 2015

@shurcooL glxinfo prints out a lot of stuff, among other:

server glx vendor string: SGI
server glx version string: 1.2
...
client glx vendor string: Mesa Project and SGI
client glx version string: 1.4
...
GLX version: 1.2
...
OpenGL vendor string: Tungsten Graphics, Inc
OpenGL renderer string: Mesa DRI Intel(R) Q45/Q43 GEM 20091221 2009Q4 
OpenGL version string: 2.1 Mesa 7.7.1
OpenGL shading language version string: 1.20

@dmitshur
Copy link
Member

GLX version: 1.2

That appears to be the problem.

What machine are you running it on (what year was it made)? What video card does it have? What video card drivers?

Can you install and run the C version of GLFW and its samples successfully?

@dmitshur
Copy link
Member

It seems GLFW (the C library) requires GLX version 1.3 or higher.

See https://github.com/glfw/glfw/blob/master/src/glx_context.c#L189-L194.

That means you'll need to find a way to upgrade to GLX 1.3 (it might be a software update, or if your hardware doesn't support it, then you'll need a hardware update).

@pebbe
Copy link
Author

pebbe commented Jul 20, 2015

So I have version 1.2. I removed the version check in glfw/v3.1/glfw/glfw/src/glx_context.c and the example in github.com/go-gl/examples/glfw31-gl21-cube compiles and runs fine.

The example in github.com/go-gl/examples/glfw31-gl41core-cube compiles, but runs with a panic:

panic: VersionUnavailable: GLX: Forward compatibility requested but GLX_ARB_create_context_profile is unavailable

Even Ubuntu 12, which is less than a year old, has GLX version 1.2, so it might be useful to drop the 1.3 requirement.

@tapir
Copy link
Member

tapir commented Jul 20, 2015

Ubuntu 12 and Mesa 7.7.1 are ancient. It's most definitely not less than a year old. 12 means 2012

@pebbe
Copy link
Author

pebbe commented Jul 20, 2015

Ubuntu 12.04.5 LTS was released in august 2014. End of life date is April 2017. This means it is still widely used.

See https://wiki.ubuntu.com/Releases

@tapir
Copy link
Member

tapir commented Jul 20, 2015

12.04 is from 2012 april. The minor version 5 at the end means bug fix only. So the packages are not updated. You're effectively using software from 2012.

@tapir
Copy link
Member

tapir commented Jul 20, 2015

Is there a reason you want to stay with 12.04? If you need an LTS release you can upgrade to 14.04.

@pebbe
Copy link
Author

pebbe commented Jul 20, 2015

At my work they use 12.04. They won't upgrade as long as it is supported (until 2017), because it is run on hundreds of computers.

@tapir
Copy link
Member

tapir commented Jul 20, 2015

then your best bet is to update the relevent packages yourself.
mesa and xorg mainly.

@pebbe
Copy link
Author

pebbe commented Jul 20, 2015

@tapir Impossible

@dmitshur
Copy link
Member

Even Ubuntu 12, which is less than a year old, has GLX version 1.2, so it might be useful to drop the 1.3 requirement.

Can you open this issue in https://github.com/glfw/glfw or maybe I can ping @elmindreda here to confirm that. Is it expected that GLFW 3.1 doesn't run on Ubuntu 12.04 or is there some issue here?

I'd be surprised if GLFW required GLX 1.3 unless it was really widely available.

@elmindreda
Copy link

GLX 1.3 has been almost universally available since I took over in 2005, with the exception of X11.app on... 10.4 Tiger, I think. This is the only reason why GLFW before 3.1 had a fallback to GLX_SGIX_fbconfig.

According to the Mesa Version History, support for GLX 1.3 was added with Mesa 3.3 on July 21, 2000. Something else is going on here.

@pebbe
Copy link
Author

pebbe commented Jul 20, 2015

Perhaps it's not mesa on the computer that runs glxinfo, but the computer that runs the X Server?

glxinfo:

server glx vendor string: SGI
server glx version string: 1.2
client glx vendor string: Mesa Project and SGI
client glx version string: 1.4

Mesa supplies the client?
What supplies the server, is that the X server?
I am running Debian 6 that was installed nearly four years ago.

@tapir
Copy link
Member

tapir commented Oct 14, 2015

I'm closing this one since it's not a glfw issue.

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

4 participants