You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If using SDL2 with threads then sdl2_ttf.py and freetype.py don't compile a -mt version of the library automatically like sdl2.py does.
We found that the linker dosnt seem to complain about linking the non-mt versionf of these librarys, but when using TTF_OpenFont you get heap corruption at runtime.
I changed sdl2.ttf.py and freetype to compile with USE_PTHREADS, linked with those library's and it fixed the heap corruption.
The text was updated successfully, but these errors were encountered:
cm226
changed the title
SDL_TFF and freetype not building with PTHREADS
SDL_TTF and freetype not building with PTHREADS
Feb 3, 2021
wasm-ld: error: --shared-memory is disallowed by sfnt.c.o because it was not compiled with 'atomics' or 'bulk-memory' features.
The solution, as @cm226 advised, is to edit both tools/ports/sdl_ttf2.py and tools/ports/freetype.py by adding the -pthread flag to the build commands (then rebuilding them after emcc --clear-ports)
If using SDL2 with threads then sdl2_ttf.py and freetype.py don't compile a -mt version of the library automatically like sdl2.py does.
We found that the linker dosnt seem to complain about linking the non-mt versionf of these librarys, but when using TTF_OpenFont you get heap corruption at runtime.
I changed sdl2.ttf.py and freetype to compile with USE_PTHREADS, linked with those library's and it fixed the heap corruption.
The text was updated successfully, but these errors were encountered: