Fix issues while running ./build_gaps.sh
Platform: Ubuntu 18.04.3 LTS
./build_gaps.sh
fatal error: GL/osmesa.h: No such file or directory
Fix for this error
apt-get install libosmesa6-dev
Second error while running
./build_gaps.sh
In file included from scn2cam.cpp:13:0:
/usr/include/GL/osmesa.h:124:1: error: ‘GLAPI’ does not name a type; did you mean ‘GLEWAPI’?
GLAPI OSMesaContext GLAPIENTRY
Fix for this error Near the end of glew.h is the line: #undef GLAPI Delete it
Ready to go!
Thanks @YunYunY for documenting this.
Additionally to the GLAPI error I had this error:
/usr/bin/ld: cannot find -lGLEW
more verbose output via:
ld -lGLEW --verbose
fixed by installing libglew:
sudo apt-get install libglew-dev
Error:
/usr/include/GL/osmesa.h:137:1: error: ‘GLAPI’ does not name a type
GLAPI OSMesaContext GLAPIENTRY
fixed by removing #undef GLAPI in /usr/include/GL/glew.h as suggested by @YunYunY :)
Thanks for the tips! For completeness, I'm also on Ubuntu 18, running whatever strange combination of system packages I downloaded for the DeepSDF repository (which is presumably why I didn't encounter the other errors).
./build_gaps.sh fatal error: GL/glew.h: No such file or directory