stereolabs/zed-openpose

undefined references to glew while building

ianni67 opened this issue · 2 comments

I re-cloned and re-built from openpose from the scratch yesterday, and then re-cloned and re-built from the scratch also zed-openpose. But could not complete the building operation, as I got a lng sequence of error messages such as:
CMakeFiles/zed_openpose.dir/src/GLViewer.o: In function GLObject::~GLObject()':
GLViewer.cpp:(.text+0x1b6): undefined reference to __glewDeleteBuffers' GLViewer.cpp:(.text+0x1c5): undefined reference to __glewDeleteVertexArrays'
CMakeFiles/zed_openpose.dir/src/GLViewer.o: In function GLObject::pushToGPU()': GLViewer.cpp:(.text+0x224): undefined reference to __glewGenVertexArrays'
GLViewer.cpp:(.text+0x233): undefined reference to __glewGenBuffers' GLViewer.cpp:(.text+0x23c): undefined reference to __glewBindVertexArray'
GLViewer.cpp:(.text+0x24a): undefined reference to __glewBindBuffer' GLViewer.cpp:(.text+0x26e): undefined reference to __glewBufferData'
GLViewer.cpp:(.text+0x288): undefined reference to __glewVertexAttribPointer' GLViewer.cpp:(.text+0x290): undefined reference to __glewEnableVertexAttribArray'
GLViewer.cpp:(.text+0x29e): undefined reference to __glewBindBuffer' GLViewer.cpp:(.text+0x2c3): undefined reference to __glewBufferData'
GLViewer.cpp:(.text+0x2e0): undefined reference to __glewVertexAttribPointer' GLViewer.cpp:(.text+0x2eb): undefined reference to __glewEnableVertexAttribArray'
GLViewer.cpp:(.text+0x2f9): undefined reference to __glewBindBuffer' GLViewer.cpp:(.text+0x31e): undefined reference to __glewBufferData'
GLViewer.cpp:(.text+0x326): undefined reference to __glewBindVertexArray' GLViewer.cpp:(.text+0x333): undefined reference to __glewBindBuffer'
GLViewer.cpp:(.text+0x341): undefined reference to __glewBindBuffer' CMakeFiles/zed_openpose.dir/src/GLViewer.o: In function GLObject::draw()':
GLViewer.cpp:(.text+0x399): undefined reference to __glewBindVertexArray' GLViewer.cpp:(.text+0x3bd): undefined reference to __glewBindVertexArray'
CMakeFiles/zed_openpose.dir/src/GLViewer.o: In function MeshObject::~MeshObject()': GLViewer.cpp:(.text+0x6b8): undefined reference to __glewDeleteBuffers'
...`

and so on. Glew-dev is regularly installed through the repositories of my Ubuntu 18.04.
What can I do?
Thank you very much for your kind advices.

I just tested it on a fresh install of Ubuntu 18 without any issues. Are you sure you installed libglew-dev? There was an issue a few months ago about Glew but it's fixed now (a5ce8a5).

It was my fault. I did reinstall both openpose and zed-openpose from scratch, but forgot to remove a previous (probably faulty) installation of glew from source, that was wrongly identified by cmake.
I removed it, leaving only the ubuntu version of libglew-dev and now the building goes thru end.
But now I'm getting a runtime error. I'll open another issue for that.
Sorry.