Oh, good call! Took me a long time to get these right, and once I figured it out, I was a bit panicked about touching them. :) In addition to the stray \, I also found a missing ,. I also moved _main first, and flattened everything onto a single line. One or both of those seems to have resolved it.

Thanks!


On 08/27/2018 08:45 AM, Alon Zakai wrote:
My guess is that there may be a parsing bug here - we did refactor our argument parser for things like that recently. In particular, the slash on

'_sqlite3_finalize',\

and the fact that _main is the last item in the list, are the things that make me think it could be parsing-related.

Specifically, it could be related to

https://github.com/kripken/emscripten/issues/6581#issuecomment-412333543

which is the only known issue I am aware of there.

Also helpful to debug this might be to build with EMCC_DEBUG=1 in the env, which will print out the arguments passed, and also the flags passed to LLVM DCE (search for "main", or "-internalize-public-api-list=").


On Mon, Aug 27, 2018 at 6:10 AM Nolan Darilek <[email protected] <mailto:[email protected]>> wrote:

    I alluded to this issue earlier. Upgrading *only emsdk-portable* from
    1.37.36 to 1.38.11 and keeping everything else the same results in a
    wasm file that won't start. Further, its size is ~2.4M whereas the
    size
    under 1.37.36 is just over 10M. I'm using Rust nightly, cargo-web and
    the wasm32-unknown-emscripten target. All needed dependencies are
    rebuilt under 1.38.11 before rebuilding the Rust binary. _main is
    definitely specified in the list of exported functions. Here are my
    linker arguments as passed to rustc:


    link-args = [
       "-s", "ASSERTIONS=1",
       "-L", "vendor/prefix/lib",
       "-l", "proj",
       "-l", "geos_c",
       "-l", "geos",
       "-l", "z",
       "-s", "EXTRA_EXPORTED_RUNTIME_METHODS=['ccall','cwrap']",
       "-s", """EXPORTED_FUNCTIONS=[
    '_spatialite_version',
    '_spatialite_alloc_connection'
    '_spatialite_init_ex',
    '_spatialite_cleanup_ex',
    '_load_shapefile_ex',
    '_malloc',
    '_free',
    '_sqlite3_open',
    '_sqlite3_exec',
    '_sqlite3_free',
    '_sqlite3_errmsg',
    '_sqlite3_prepare_v2',
    '_sqlite3_bind_text',
    '_sqlite3_bind_blob',
    '_sqlite3_bind_double',
    '_sqlite3_bind_int',
    '_sqlite3_bind_parameter_index',
    '_sqlite3_step',
    '_sqlite3_data_count',
    '_sqlite3_column_double',
    '_sqlite3_column_text',
    '_sqlite3_column_blob',
    '_sqlite3_column_bytes',
    '_sqlite3_column_type',
    '_sqlite3_column_name',
    '_sqlite3_reset',
    '_sqlite3_clear_bindings',
    '_sqlite3_finalize',\
    '_sqlite3_close_v2',
    '_main'
    ]"""
    ]


    Is there any known issue between 1.37.36 and 1.38.11 that might
    have an
    effect here? How do I even go about debugging this? I have an
    older copy
    of the intermediate Rust artifacts, including the final .wasm file.


    Thanks for any help.

-- 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]
    <mailto:emscripten-discuss%[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] <mailto:[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.

Reply via email to