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: glNamedBufferData when running test code #3

Open
kalyo-zjl opened this issue Oct 31, 2018 · 6 comments
Open

undefined symbol: glNamedBufferData when running test code #3

kalyo-zjl opened this issue Oct 31, 2018 · 6 comments

Comments

@kalyo-zjl
Copy link

Hi, when I run the tests/square_test.py. It said,
undefined symbol: glNamedBufferData when running test code
1
the result of $ ldd dirt/librasterise.so is as below.
2
There might be something wrong with my GL or EGL library, but I don't know hot to solve it, could you give me some advice?

@pmh47
Copy link
Owner

pmh47 commented Nov 2, 2018

Yes, the problem is with your GL and EGL libraries. A version from mesa is being used, which will not work with the nvidia gpu driver.

The nvidia driver package includes its own GL and EGL libraries, but where these are installed depends on your particular system. Running find /usr/lib -name '*GL*' | grep nvidia should give a list; they would all typically be in one folder, e.g. /usr/lib/nvidia-367. When building/installing dirt, set CMAKE_LIBRARY_PATH environment variable to point at that folder.

Afterwards, running ldd as before should not show mesa in the libEGL and libGL paths, but something containing nvidia.

@CCChenfei
Copy link

我也遇到了这个问题
把csrc文件夹下的CMakeLists.txt里set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -ffast-math")这句话后面加上一句add_definitions(-D_GLIBCXX_USE_CXX11_ABI=0)再重新编译就好了

@eshafeeqe
Copy link

I think I got a similar error. The building went fine but got the follwoing error while making

aslab@aslab-Serval-WS:~/experiments/dirt/build$ make 
[ 14%] Building CXX object CMakeFiles/rasterise.dir/rasterise_egl.cpp.o
/home/aslab/experiments/dirt/csrc/rasterise_egl.cpp: In member function ‘void RegisteredBuffer::ensure_size(const size_t&)’:
/home/aslab/experiments/dirt/csrc/rasterise_egl.cpp:81:76: error: ‘glNamedBufferData’ was not declared in this scope
         glNamedBufferData(gl_index, required_size, nullptr, GL_DYNAMIC_COPY);
                                                                            ^
make[2]: *** [CMakeFiles/rasterise.dir/rasterise_egl.cpp.o] Error 1
make[1]: *** [CMakeFiles/rasterise.dir/all] Error 2
make: *** [all] Error 2

Any leads for fixing this error ?

@eshafeeqe
Copy link

Fixed it by downloading GL/gl.h and GL/glext.h files,

Thanks

@wkailiu
Copy link

wkailiu commented Nov 20, 2019

Screenshot from 2019-11-20 20-48-32

anaconda
tensorflow-gpu=1.13.1
python=2.7.17
cuda=10.0 cudnn=7.6.4 RTX2080Ti

I have not nvidia-*** folder in /usr/lib/
I install OpenGL by: sudo apt install freeglut3-dev
and how can I install OpenGL correctly?

@pmh47
Copy link
Owner

pmh47 commented Nov 20, 2019

@wkailiu You need the version of OpenGL that comes with the nvidia driver -- not the one shown from freeglut/mesa. I don't know where the nvidia one is installed on your system; it should have shown up in that find command. Have you tried reinstalling the nvidia driver?

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

5 participants