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

undefined symbol: XRRQueryExtension #22

Open
msgoloborodov opened this issue Sep 5, 2014 · 16 comments
Open

undefined symbol: XRRQueryExtension #22

msgoloborodov opened this issue Sep 5, 2014 · 16 comments

Comments

@msgoloborodov
Copy link

When try to run any test or example:
node: symbol lookup error: /usr/local/lib/node_modules/node-glfw/build/Release/glfw.node: undefined symbol: XRRQueryExtension

@mikeseven
Copy link
Owner

you sure? Make sure you do npm install . since I updated the code to NAN 1.2.0. and then node-gyp rebuild. I don't see any error with test.js or test_atb.js

@msgoloborodov
Copy link
Author

There was a problem with glew installation. Thank you.

@sami-sweng
Copy link

Could you explain how you solved it? Thank you.

@kaosat-dev
Copy link

Same issue here , @msgoloborodov it would be really great if you shared how you solved this issue
(all dependencies seem to compile fine, and there are not other error messages)

@mikeseven
Copy link
Owner

Be sure to install latest versions of glew, glfw3, ant tweakbar. A simple apt-get on linux, brew on mac and for Windows I provide the prebuilt binaries as a submodule just done 2 days ago.

@kaosat-dev
Copy link

@mikeseven Thanks for the quick reply ! For the linux box (Ubuntu 14.04) I am testing it on, at least glw3 & tweakbar had to be compiled ,and the the error is exactly the same as this one .
(potentially related to http://stackoverflow.com/questions/21685903/glfw3-undefined-reference-to-xrr, sadly my Cmake knowledge is pretty much non existant , so still looking for a way to specify those flags)

Thanks for creating prebuild binairies for Windows users btw, that is always a nice thing to have !

@mikeseven
Copy link
Owner

Ah I think I know what it might be. I'll try on 15.04 I use here. I think you need to add X11-dev libraries. Once it works I'll update the project and release a new minor version.

--mike

On Fri, Nov 27, 2015 at 11:32 AM -0800, "Mark Moissette" <notifications@github.commailto:notifications@github.com> wrote:

@mikesevenhttps://github.com/mikeseven Thanks for the quick reply ! For the linux box (Ubuntu 14.04) I am testing it on, at least glw3 & tweakbar had to be compiled ,and the the error is exactly the same as this one .
(potentially related to http://stackoverflow.com/questions/21685903/glfw3-undefined-reference-to-xrr, sadly my Cmake knowledge is pretty much non existant , so still looking for a way to specify those flags)

Thanks for creating prebuild binairies for Windows users btw, that is always a nice thing to have !

Reply to this email directly or view it on GitHubhttps://github.com//issues/22#issuecomment-160194035.

@kaosat-dev
Copy link

@mikeseven thanks for the extra effort !
I had already installed libx11-dev and all the following :

  • libxinerama-dev
  • libxcursor-dev
  • libXxf86vm-dev
  • libxi-dev
  • libxrandr-dev
    I only installed libxrandr after the initial attempt failed with 'undefined symbol: XRRQueryExtension'
    I originally though that simply installing the dev lib , and re-running the glfw3 build would do the trick (Qmake , make & sudo make install) ,(and then reinstalling node-webgl) , but no luck!

EDIT:
I also tried to modify bindings.gyp of node-webgl like so :

['OS=="linux"', {'libraries': ['-lfreeimage','-lGLEW','-lGL', '-lXrandr','-lX11','-lXinerama', '-lXcursor', '-lXxf86vm']}],

based on the output of

pkg-config --libs --cflags --print-requires-private glfw3 

but no luck

@mikeseven
Copy link
Owner

Fixed in the last commits to node-glfw.
The problem on linux is that libglfw-dev package is screwed up. You must rebuild and install glfw 3.x. Then I added the missing X dependencies in node-glfw and all works; you don't even need to rebuild node-webgl.

As others mentioned, and I just went through it, it's a pain to install on linux. I'm thinking to have an automatic way to build and to install these libraries if not present on the system and thus to maintain clones on my github repo.

Any thoughts?

1 similar comment
@mikeseven
Copy link
Owner

Fixed in the last commits to node-glfw.
The problem on linux is that libglfw-dev package is screwed up. You must rebuild and install glfw 3.x. Then I added the missing X dependencies in node-glfw and all works; you don't even need to rebuild node-webgl.

As others mentioned, and I just went through it, it's a pain to install on linux. I'm thinking to have an automatic way to build and to install these libraries if not present on the system and thus to maintain clones on my github repo.

Any thoughts?

@mikeseven mikeseven reopened this Nov 27, 2015
@kaosat-dev
Copy link

hi again @mikeseven ! thanks for the quick fix ! Unfortunately the new version will not even install :
../src/atb.h:11:25: fatal error: AntTweakBar.h: No such file or directory
#include <AntTweakBar.h>
I will try to resolve this on my end and post back a solution.
For the other points you raise :

  • Glfw 3.x was actually really easy to compile from source (I did not use the system package)
  • for pre build binaries for different systems the best one I tried is https://github.com/mapbox/node-pre-gyp I used it for some opencv bindings a while back, and it saved a huge amount of time having only to do all this compile mess ONCE on a working machine (per os etc , but still)

@mikeseven
Copy link
Owner

Weird, I had no problem on 14.04. That would mean AntTweakBar and other dependencies are not retrieved as submodules. Follow the steps in my repo node-native-graphics-dep.
On my github account, you'll find AntTweakBar, glfw, glew that I used on all platforms for node-glfw.
Linux is the most painful!

@kaosat-dev
Copy link

@mikeseven my bad ! I double checked everything, and it turns out I had done a bad symlink for AntTweakBar !

I also had to add ,'-lXi', (for libxi-dev) to get it to "work" (I'll do a PR later on):
now it does not complain about any missing libs/symbols , but does a segfault , so some progress :)
Exact error now is
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
Status: Using GLEW 1.10.0
Segmentation fault (core dumped)

Thanks for your patience and dedication !

@mikeseven
Copy link
Owner

humm, you don't seem to have an up-to-date system. GLEW is 1.13.0 since August.
There is a bug with Ubuntu glfw packages: it installs glfw2, not glfw3.
Do NOT install libglfw-dev, you must install glfw3 from code at https://github.com/glfw/glfw then I didn't need to use -lXi

@kaosat-dev
Copy link

@mikeseven strange, I compiled glfw3 from source (not using the Ubuntu packages), using version 3.1.2.

This is on a 14.04 LTS Ubuntu, just double checked, the system is up to date, I guess I'll have to build GLEW manually too :)

@mikeseven
Copy link
Owner

GLEW shouldn't be the issue, nor AntTweakBar; they just rely on GL libraries.
GLFW3 is the one with all these dependencies, see https://github.com/glfw/glfw/blob/master/CMakeLists.txt for _GLFW_X11 section. I did notice -lXi there but surprisingly on my ubuntu it was not needed for node-glfw.

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