compiling platform=javascript with 3.4 results in "use of undeclared identifier 'glGetBufferSubData'"

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By dbu

i installed emsdk with latest (after trying 1.40.1 and 1.39.9)

when i run
scons platform=javascript tools=no target=release

i get an error that glGetBufferSubData is not declared.

[ 56%] Compiling ==> drivers/gles3/rasterizer_scene_gles3.cpp
drivers/gles3/rasterizer_scene_gles3.cpp:1375:5: error: use of undeclared identifier 'glGetBufferSubData'; did you mean 'glBufferSubData'?
                                glGetBufferSubData(GL_ARRAY_BUFFER, 0, particles->amount * sizeof(RasterizerGLES3Particle), particle_array);
                                ^~~~~~~~~~~~~~~~~~
                                glBufferSubData                                                                                                                                                                                             
/home/david/data/godot/godot-src/emsdk/upstream/emscripten/system/include/GLES3/gl3.h:541:29: note: 'glBufferSubData' declared here
GL_APICALL void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void *data);
                            ^

when i compile godot 3.3.3 with the exact same setup, the build runs through.

is this problem coming from somewhere else than emsdk? what part of my system should be providing that glGetBufferSubData ?

:bust_in_silhouette: Reply From: dbu

i did a complete reinstall of emscripten. i think i misunderstood how ./emsdk install latest works: it does not check with any online source but only uses the “latest at the time you downloaded emscripten”.

however, i think this means the minimum version of emscripten specified at Compiling for the Web — Godot Engine (stable) documentation in English is wrong, 1.39.9 did not work.

if i read Implement glGetBufferSubData. by juj · Pull Request #13776 · emscripten-core/emscripten · GitHub and the release timestamps correctly, i think we now need at least emscripten 2.0.17