claudeha / pure-data

Pure Data - tracking puredata SourceForge git repository
Other
6 stars 1 forks source link

emscripten's default dlopen() abort()s, which breaks loaders like pdlua #1

Open claudeha opened 5 years ago

claudeha commented 5 years ago

Emscripten aborts the browser script with an assertion failure unless you jump through hoops to compile in a different way, which loses pthread support and is slow for calls between different modules.

pdlua (etc) loader is called after pd tries dlopen() for externals

Workaround: in your main libpd program that you compile with Emscripten, stub it out like this:

// emscripten dl aborts; replace with graceful failure
void *dlopen(const char *fn, int flags) { return 0; }
int dlclose(void *handle) { return 0; }
void *dlsym(void *h, const char *sym) { return 0; }
char *dlerror(void) { return "not supported"; }