Skip to content
This repository has been archived by the owner on Aug 28, 2021. It is now read-only.

Error: cannot reslove "Assertion "glGetString(GL_VERSION)" FAILED" after trying all possible issue #47

Closed
Trinkle23897 opened this issue Nov 1, 2018 · 4 comments

Comments

@Trinkle23897
Copy link

  1. ubuntu 16.04 with nvidia 1080Ti, 396.44
sudo apt install libglfw3-dev libglm-dev libx11-dev libegl1-mesa-dev libpng-dev libjpeg-dev
cd
git clone https://github.com/NVIDIA/libglvnd && cd libglvnd
./autogen.sh && ./configure --disable-egl
make -j && sudo make install -j
PATH:
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/jiayi/.local/bin

CPATH:


PKG_CONFIG_PATH:


LIBRARY_PATH:


LD_LIBRARY_PATH:


PYTHONPATH:


+ pkg-config --cflags --libs glfw3
-I/usr/include/libdrm -lglfw
+ '[' '!' '' ']'
+ pkg-config --cflags --libs libglvnd
-I/usr/local/include
+ pkg-config --cflags --libs egl
-I/usr/include/libdrm -lEGL
+ which find
/usr/bin/find
+ which pkg-config
/usr/bin/pkg-config
+ which python-config
/usr/bin/python-config
+ python-config --includes --ldflags
-I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu/python2.7
-L/usr/lib/python2.7/config-x86_64-linux-gnu -L/usr/lib -lpython2.7 -lpthread -ldl  -lutil -lm  -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions
+ '[' ']'
+ g++ --version
g++ (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

+ '[' -f ../House3D/objrender.so ']'
+ ldd ../House3D/objrender.so
	linux-vdso.so.1 =>  (0x00007ffea73cc000)
	libGL.so.1 => /usr/lib/nvidia-396/libGL.so.1 (0x00007fc093a5e000)
	libEGL.so.1 => /usr/lib/nvidia-396/libEGL.so.1 (0x00007fc093858000)
	libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007fc09351e000)
	libpng12.so.0 => /lib/x86_64-linux-gnu/libpng12.so.0 (0x00007fc0932f8000)
	libglfw.so.3 => /usr/lib/x86_64-linux-gnu/libglfw.so.3 (0x00007fc0930e2000)
	libjpeg.so.8 => /usr/lib/x86_64-linux-gnu/libjpeg.so.8 (0x00007fc092e89000)
	libpython2.7.so.1.0 => /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0 (0x00007fc0928fa000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fc0926dd000)
	libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fc09235b000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fc092051000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fc091e3b000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fc091a71000)
	/lib64/ld-linux-x86-64.so.2 (0x000055d4ef045000)
	libnvidia-tls.so.396.44 => /usr/lib/nvidia-396/tls/libnvidia-tls.so.396.44 (0x00007fc09186c000)
	libnvidia-glcore.so.396.44 => /usr/lib/nvidia-396/libnvidia-glcore.so.396.44 (0x00007fc08fb9d000)
	libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007fc08f98b000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fc08f786000)
	libGLdispatch.so.0 => /usr/lib/nvidia-396/libGLdispatch.so.0 (0x00007fc08f4b8000)
	libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007fc08f296000)
	libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fc08f07b000)
	librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fc08ee73000)
	libXrandr.so.2 => /usr/lib/x86_64-linux-gnu/libXrandr.so.2 (0x00007fc08ec68000)
	libXinerama.so.1 => /usr/lib/x86_64-linux-gnu/libXinerama.so.1 (0x00007fc08ea64000)
	libXi.so.6 => /usr/lib/x86_64-linux-gnu/libXi.so.6 (0x00007fc08e854000)
	libXxf86vm.so.1 => /usr/lib/x86_64-linux-gnu/libXxf86vm.so.1 (0x00007fc08e64e000)
	libXcursor.so.1 => /usr/lib/x86_64-linux-gnu/libXcursor.so.1 (0x00007fc08e443000)
	libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007fc08e240000)
	libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007fc08e03b000)
	libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007fc08de35000)
	libXrender.so.1 => /usr/lib/x86_64-linux-gnu/libXrender.so.1 (0x00007fc08dc2b000)
	libXfixes.so.3 => /usr/lib/x86_64-linux-gnu/libXfixes.so.3 (0x00007fc08da24000)
  1. after typing command unset DISPLAY
➜  renderer git:(master) unset DISPLAY
➜  renderer git:(master) ./test-rectangle.bin egl     
[EGL] Detected 8 devices. Using device 0
assertion "glGetString(GL_VERSION)" failed, in printInfo, (gl/glContext.cc:92)
[1]    52092 abort (core dumped)  ./test-rectangle.bin egl
➜  renderer git:(master) ./test-rectangle.bin headless
error: Cannot connect to DISPLAY!
➜  renderer git:(master) 

More info:

➜  renderer git:(master) ./objview-offline.bin /data/.share/suncg/house/bd4d249bb93e43e023f7fa2ff30fa0b1/house.obj
[EGL] Detected 8 devices. Using device 0
assertion "glGetString(GL_VERSION)" failed, in printInfo, (gl/glContext.cc:92)
[1]    52610 abort (core dumped)  ./objview-offline.bin 

and use ssh -X command:

➜  ~ glxinfo
name of display: localhost:11.0
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  155 (GLX)
  Minor opcode of failed request:  24 (X_GLXCreateNewContext)
  Value in failed request:  0x0
  Serial number of failed request:  35
  Current serial number in output stream:  36

I also try to install virtualGL as one issue suggested, however it seems unsuccessful in my machine.
I'm so confused that I only type the command listed in README.md but failed to build. I have reinstalled all the dependency but no promising things happened. Any help?

@ppwwyyxx
Copy link
Contributor

ppwwyyxx commented Nov 1, 2018

Please don't use virtualGL or ssh -X.

The instruction said add INSTALL_DIR/lib to LD_LIBRARY_PATH after installing libglvnd. However your LD_LIBRARY_PATH is empty.
Could you try adding this? If it still fails please post the output of the debug-build.sh script again.

@Trinkle23897
Copy link
Author

I've install libglvnd into /usr/local/lib, this is not a problem.
But I finally find it out half an hour before as sudo apt upgrade…… Though the opengl still fails, it can work with egl mode. Thank you anyway!

@ppwwyyxx
Copy link
Contributor

ppwwyyxx commented Nov 1, 2018

I've install libglvnd into /usr/local/lib, this is not a problem.

But you binary is not actually linked with libglvnd. Adding it to LD_LIBRARY_PATH will include its priority in linker search path.

@ppwwyyxx
Copy link
Contributor

ppwwyyxx commented Nov 1, 2018

Closing as the issue seems to be solved.

@ppwwyyxx ppwwyyxx closed this as completed Nov 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants