Hmm, this is puzzling. Nothing in that range on emscripten looks suspicious, except perhaps for closure - do you have any other link flags, like --closure 1, than those mentioned?
If that's not it, perhaps this is a regression in Binaryen's wasm2js. To confirm, this is with 1.39.8 or 1.39.8-upstream, and and not 1.39.8-fastcomp? Do you also get an error when building with -O0 or -O1? The error message might be clearer. On Mon, Feb 17, 2020 at 11:16 PM Laurent Pugin <[email protected]> wrote: > Hi, > > I have a problem with a project that builds asm.js output with the > following parameters. > > my $FLAGS = "-O3"; > $FLAGS .= " -DNDEBUG"; > $FLAGS .= " --memory-init-file 0"; > $FLAGS .= " -std=c++17"; > $FLAGS .= " -s ASM_JS=1"; > $FLAGS .= " -s WASM=0"; > $FLAGS .= " -s TOTAL_MEMORY=256MB"; > $FLAGS .= " -s TOTAL_STACK=128MB"; > > It generates a single JS file that can be included in a webpage within a > <script> tag in the header, and then exported function are accessible. This > used to work fine up to 1.39.7 but fails with 1.39.8. Any ideas of what has > changed between the two versions and how to fix it? Thanks > > The console throws (Chrome) > > verovio-toolkit.js:43 failed to asynchronously prepare wasm: > ReferenceError: oa is not defined > (anonymous) @ verovio-toolkit.js:43 > Promise.then (async) > instantiateArrayBuffer @ verovio-toolkit.js:43 > instantiateAsync @ verovio-toolkit.js:43 > createWasm @ verovio-toolkit.js:43 > (anonymous) @ verovio-toolkit.js:43 > verovio-toolkit.js:43 ReferenceError: oa is not defined > verovio-toolkit.js:43 ReferenceError: oa is not defined > abort @ verovio-toolkit.js:43 > (anonymous) @ verovio-toolkit.js:43 > Promise.then (async) > instantiateArrayBuffer @ verovio-toolkit.js:43 > instantiateAsync @ verovio-toolkit.js:43 > createWasm @ verovio-toolkit.js:43 > (anonymous) @ verovio-toolkit.js:43 > verovio-toolkit.js:43 Uncaught (in promise) Error: abort(ReferenceError: > oa is not defined). Build with -s ASSERTIONS=1 for more info. > at abort (verovio-toolkit.js:43) > at verovio-toolkit.js:43 > abort @ verovio-toolkit.js:43 > (anonymous) @ verovio-toolkit.js:43 > Promise.then (async) > instantiateArrayBuffer @ verovio-toolkit.js:43 > instantiateAsync @ verovio-toolkit.js:43 > createWasm @ verovio-toolkit.js:43 > (anonymous) @ verovio-toolkit.js:43 > verovio-toolkit.js:43 Uncaught TypeError: Cannot read property 'apply' of > undefined > at Object.Module._vrvToolkit_constructor [as constructor] > (verovio-toolkit.js:43) > at new verovio.toolkit (verovio-toolkit.js:135) > at verovio.js:3 > Module._vrvToolkit_constructor @ verovio-toolkit.js:43 > verovio.toolkit @ verovio-toolkit.js:135 > (anonymous) @ verovio.js:3 > > Firefox > > failed to asynchronously prepare wasm: ReferenceError: oa is not defined > verovio-toolkit-light.js:43:10692 > <http://localhost:4001/javascript/develop/verovio-toolkit-light.js> > ReferenceError: oa is not defined verovio-toolkit-light.js:43:9036 > <http://localhost:4001/javascript/develop/verovio-toolkit-light.js> > ReferenceError: oa is not defined verovio-toolkit-light.js:43:9046 > <http://localhost:4001/javascript/develop/verovio-toolkit-light.js> > Error: abort(ReferenceError: oa is not defined). Build with -s > ASSERTIONS=1 for more info. > TypeError: Module.asm.vrvToolkit_constructor is undefined > verovio-toolkit-light.js:43:85119 > <http://localhost:4001/javascript/develop/verovio-toolkit-light.js> > _vrvToolkit_constructor > http://localhost:4001/javascript/develop/verovio-toolkit-light.js:43 > toolkit > http://localhost:4001/javascript/develop/verovio-toolkit-light.js:135 > <anonymous> http://localhost:4001/midi.xhtml:111 > > > > > > -- > 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]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/emscripten-discuss/9619c413-0463-427e-ae26-27c41942466d%40googlegroups.com > <https://groups.google.com/d/msgid/emscripten-discuss/9619c413-0463-427e-ae26-27c41942466d%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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]. To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/CAEX4NpRj%2Bx6%3DzQWh7swp2VYnnWK8sicdJfwEUqOGcyCGfU_gUA%40mail.gmail.com.
