Undefined opengl macros fail compilation on Ubuntu 19.04

#1

I’ve been trying to compile the last nightly (of_v20190324_linux64gcc6_nightly.tar.gz) and the current code base from github (master and stable branches, 17/18.08.2019) in Ubuntu 19.04.
All of them fail due to undefined GL_XXX macro errors:

/of_v20190324_linux64gcc6_release/libs/openFrameworks/gl/ofGLUtils.cpp: In function 'GLuint ofGetGLPrimitiveMode(ofPrimitiveMode)':
/of_v20190324_linux64gcc6_release/libs/openFrameworks/gl/ofGLUtils.cpp:491:11: error: 'GL_LINES_ADJACENCY' was not declared in this scope
    return GL_LINES_ADJACENCY;
           ^~~~~~~~~~~~~~~~~~
[many more in between...]
/of_v20190324_linux64gcc6_release/libs/openFrameworks/gl/ofGLRenderer.cpp: In member function 'virtual void ofGLRenderer::enableTextureTarget(const ofTexture&, int)':
/of_v20190324_linux64gcc6_release/libs/openFrameworks/gl/ofGLRenderer.cpp:1712:15: error: 'GL_TEXTURE_BUFFER' was not declared in this scope
   glTexBuffer(GL_TEXTURE_BUFFER, tex.getTextureData().glInternalFormat, tex.getTextureData().bufferId);
               ^~~~~~~~~~~~~~~~~
/of_v20190324_linux64gcc6_release/libs/openFrameworks/gl/ofGLRenderer.cpp:1712:15: note: suggested alternative: 'GL_TEXTURE_BORDER'
   glTexBuffer(GL_TEXTURE_BUFFER, tex.getTextureData().glInternalFormat, tex.getTextureData().bufferId);
               ^~~~~~~~~~~~~~~~~
               GL_TEXTURE_BORDER

/of_v20190324_linux64gcc6_release/libs/openFrameworks/gl/ofGLRenderer.cpp:1712:3: error: 'glTexBuffer' was not declared in this scope
   glTexBuffer(GL_TEXTURE_BUFFER, tex.getTextureData().glInternalFormat, tex.getTextureData().bufferId);
   ^~~~~~~~~~~
/of_v20190324_linux64gcc6_release/libs/openFrameworks/gl/ofGLRenderer.cpp:1712:3: note: suggested alternative: 'glReadBuffer'
   glTexBuffer(GL_TEXTURE_BUFFER, tex.getTextureData().glInternalFormat, tex.getTextureData().bufferId);
   ^~~~~~~~~~~
   glReadBuffer
make[1]: *** [makefileCommon/compile.core.mk:238: /of_v20190324_linux64gcc6_release/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/gl/ofGLRenderer.o] Error 1
make: *** [makefileCommon/compile.core.mk:212: Debug] Error 2
there has been a problem compiling Debug OF library
please report this problem in the forums

I experimented with modifying install_dependencies.sh to install libglfw3-dev from sources which seems intended for cases where the distribution doesn’t offer it (Ubuntu 19.04 does) but it didn’t change anything.
The whole odyssey started with trying to compile release v0.10.1 which fails with another known GL error (Arch linux compilation error after updating the system). After fixing this one manually - by now the fix is on github and in the nightlies - the same errors appear as shown above.

#2

just to be clear, the problem and fix reported for Ubuntu 18.04 like this one Cannot Compile OF, errors on of3dPrimitives and conflicting GL / glew declarations is not the one I am facing here.
Has no one else tried to compile OF on Ubuntu 19.04? Is the use of non-LTS versions discouraged?

#3

can you try using the latest nightly builds? the ones that were in downloads were a bit old but they are up to date now. from the errors it looks like you broke something else while fixing the glfw error manually