This question and its answer, actually answer my question. I had to read its answer carefully and find my mistake.
Now my fragment shader look like this:
const GLchar* fragmentSource = R"glsl(
#version 330 core
in vec2 TexCoord;
uniform sampler2D ourTexture;
#define PI 3.141592653589793238462f
#define TWO_PI 6....
OpenGL 4.1's glGetProgramBinary and glProgramBinary exist for this purpose. The first one retrieves a binary that represents the compiled program in its entirety (though none of the state stored within it. It, and its implementation-defined format, can be stored and reloaded via glProgramBinary.
Of course, there are limitations. Implementations are not ...
The eye position (a vec3) was being bound to the wrong shader, resulting in the glUniform3 error when OpenGL (mesa) checked the validity of the uniforms. The error was due to a typo; I named my simple-mesh and animated-mesh shaders similar things.
glUniform3fv(mesh_shader.uniform("eye"), 1, &...