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
Running a config script (happens to be for libicu, which I'm installing myself due to separate issues with USE_ICU) and have no problem when installing without USE_PTHREADS.
However, when USE_PTHREADS (and related flags) are used, configure fails in several steps. After investigating, the root of the problem appears to be that the following first line of the generated JS:
#!/path/to/emsdk/node/14.15.5_64bit/bin/node
does not include the --experimental-wasm-threads --experimental-wasm-bulk-memory flags necessary to run the executable without throwing an error. The configure script then fails at that step. If I manually change the first line to:
then it runs fine. Based on that, I modified make_js_executable in emcc.py to add those flags as shown below:
...
with open(script, 'w') as f:
f.write('#!%s --experimental-wasm-threads --experimental-wasm-bulk-memory\n' % cmd)
f.write(src)
...
and then the configure script (and subsequent make + install) ran without a hitch
It seems like this could be easily solved if emcc supported an option to add these flags its line 1 output. Looking at emcc.py, it's not clear to me whether this is currently supported. If it is supported, what is the means to use it? If not, please consider adding. It could be as simple as having some emcc option for specifying a string that is appended when emcc.py's make_js_executable() runs, though ideally it would be a bit smarter e.g. BUILD_WITH_REQUIRED_FEATURES in which case make_js_executable() is smart enough to know that if we are building with PTHREADS enabled, it needs to append the experimental flags.
The text was updated successfully, but these errors were encountered:
Running a config script (happens to be for libicu, which I'm installing myself due to separate issues with USE_ICU) and have no problem when installing without USE_PTHREADS.
However, when USE_PTHREADS (and related flags) are used,
configure
fails in several steps. After investigating, the root of the problem appears to be that the following first line of the generated JS:does not include the
--experimental-wasm-threads --experimental-wasm-bulk-memory
flags necessary to run the executable without throwing an error. The configure script then fails at that step. If I manually change the first line to:then it runs fine. Based on that, I modified
make_js_executable
inemcc.py
to add those flags as shown below:and then the configure script (and subsequent make + install) ran without a hitch
It seems like this could be easily solved if
emcc
supported an option to add these flags its line 1 output. Looking at emcc.py, it's not clear to me whether this is currently supported. If it is supported, what is the means to use it? If not, please consider adding. It could be as simple as having some emcc option for specifying a string that is appended when emcc.py'smake_js_executable()
runs, though ideally it would be a bit smarter e.g.BUILD_WITH_REQUIRED_FEATURES
in which casemake_js_executable()
is smart enough to know that if we are building with PTHREADS enabled, it needs to append the experimental flags.The text was updated successfully, but these errors were encountered: