Skip to content

[build] Breaking changes in emscripten 3.1.51 #3713

@Peter0x44

Description

@Peter0x44

Currently, attempting to build the examples for web leads to the following error:

error: linker: Undefined symbol: glfwGetProcAddress(). Please pass -sGL_ENABLE_GET_PROC_ADDRESS at link time to link in glfwGetProcAddress().

This is because of the following breaking change in emscripten:

Breaking change: Using the *glGetProcAddress() family of functions now requires passing a linker flag -sGL_ENABLE_GET_PROC_ADDRESS. This prevents ports of native GL renderers from later accidentally attempting to activate "dormant" features if web browser implementations gain new WebGL extensions in the future, which *glGetProcAddress() is not able to support. (#20802)

that is documented here:
https://github.com/emscripten-core/emscripten/blob/main/ChangeLog.md#3151---121323

This change was introduced for emscripten 3.1.51.

The call to glfwGetProcAddress is located here:

rlLoadExtensions(glfwGetProcAddress);

So, either platforms/rcore_web.c needs to be reviewed not to call glfwGetProcAddress, or adding the flag to compile commands needs to be documented. I'm not really sure which, so I'm opening this issue, so I can get input from others, and we can research together.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions