That error reads like some kind of botched up command line perhaps? The --proxy-to-worker flag should not reach clang, but should be consumed by emcc frontend itself. Checking this out, noticed that we did not have a test for sync Fetches in --proxy-to-worker, so added one in https://github.com/kripken/emscripten/pull/6306, which did pass for me when trying it out. Try double checking the command line?
2018-02-14 17:30 GMT+02:00 Stéphane Letz <[email protected]>: > OK, I found out -s FETCH=1 described in settings.js, but now I get a link > error: > > emcc -O3 -–proxy-to-worker --memory-init-file 0 -s WASM=1 -s FETCH=1 -s > EXPORT_NAME="'FaustModule'" -s MODULARIZE=1 -s ASSERTIONS=1 -s > ALLOW_MEMORY_GROWTH=1 -s DISABLE_EXCEPTION_CATCHING=1 -s > EXPORTED_FUNCTIONS="['_createWasmCDSPFactoryFromString', > '_expandCDSPFromString', '_getCLibFaustVersion', '_getWasmCModule', > '_getWasmCModuleSize', '_getWasmCHelpers', '_freeWasmCModule', > '_freeCMemory', '_cleanupAfterException', '_getErrorAfterException']" -s > EXTRA_EXPORTED_RUNTIME_METHODS="['cwrap','Pointer_stringify','stringToUTF8']" > > gives: > > clang++: error: unknown argument: '-–proxy-to-worker' > > So as soon as -s FETCH=1 is added, this '-–proxy-to-worker' related error > happens ? > > Le mercredi 14 février 2018 15:55:55 UTC+1, Stéphane Letz a écrit : >> >> I'm trying to replace old code with the emscripten fetch API, using the >> example code given here: >> https://kripken.github.io/emscripten-site/docs/api_reference/fetch.html >> following the "Synchronous Fetches" section. Our library is then linked with >> --proxy-to-worker flag. >> >> At run time, I get an exception: libfaust-wasm.js:4 missing function: >> emscripten_fetch_attr_init. I've tried to add emscripten_fetch_attr_init or >> _emscripten_fetch_attr_init in the EXTRA_EXPORTED list, but this actually >> fails a library link time (warning: invalid item (maybe a typo?) in >> EXPORTED_RUNTIME_METHODS: emscripten_fetch_attr_init) >> >> The libraries is compiled using emscripten 1.37.32 >> >> Any idea of what could be the problem? Thanks. > > -- > You received this message because you are subscribed to the Google Groups > "emscripten-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
