Closed Johnly1986 closed 3 years ago
Can you show the full emcc command line and the full output?
BTW where is make.py
coming from? Is that part of your project or part of emscripten? Its unrelated to this issue most likely but I would not advise importing emscripten into an external python script like that.
shared:ERROR: '/emscripten/upstream/bin/wasm2js --emscripten -O ./js/opencascade.wasm --mvp-features' failed (-9)
Traceback (most recent call last):
File "make.py", line 300, in
Interesting that we don't see any output at all from wasm2js... I guess it crashes without printing anything?
Can you please try with the latest emscripten release: 1.39.20. I think there have been a few fixes in wasm2js since 1.39.11.
Also I would advise you to avoid importing emscripten/tools module into your own python script. The internal structures of emscripten's python code are not designed for external consumption and could change at any time. Maybe just use a normal Makefile, or invoke emcc
directly using python's subprocess module?
Interesting that we don't see any output at all from wasm2js... I guess it crashes without printing anything?
Can you please try with the latest emscripten release: 1.39.20. I think there have been a few fixes in wasm2js since 1.39.11.
Also I would advise you to avoid importing emscripten/tools module into your own python script. The internal structures of emscripten's python code are not designed for external consumption and could change at any time. Maybe just use a normal Makefile, or invoke
emcc
directly using python's subprocess module?
I invoke emcc directly using python's subprocess module .
Strange, it looks like your make.py script is calling emscripten.Building.emcc
... is it not?
Strange, it looks like your make.py script is calling
emscripten.Building.emcc
... is it not?
You're right. This is the code fragment where the error occurred.
==================================================
opencascade_libs = os.listdir(os.path.join('.', 'lin32', 'clang', 'lib')) opencascade_libs = [os.path.join('.', 'build', 'lin32', 'clang', 'lib', s) for s in opencascade_libs]
stage('emcc: ' + ' '.join(emcc_args)) os.chdir('..') if not os.path.exists('js'): os.makedirs('js')
temp = os.path.join('.', 'js', target) emscripten.Building.emcc('-DNOTHING_WAKA_WAKA', emcc_args + ['glue.o'] + opencascade_libs + myincludes[:len(myincludes)-2] + ['--js-transform', 'python %s' % os.path.join('..', 'bundle.py')], temp)
======================================================================
Completed parameter string in https://github.com/emscripten-core/emscripten/issues/11735#issuecomment
You can probably trade that out for a simple subprocess.check_call(...).
Anyway, that is unrelated to the actual crash. Can you update the emscripten version to .20 and confirm this issue still occurs?
Also, are you really sure you need WASM=0
? Obviously we need to make sure that it works but we don't advise using that option unless you really need it.
In version 1.39.20 api changed ? emscripten.Building.emcc('glue.cpp', args, 'glue.o') AttributeError: 'module' object has no attribute 'Building'
========================================================
I've changed to a building instance. like this : import tools.building as building But there are new mistakes.
emcc:WARNING: --llvm-lto ignored when using llvm backend wasm-ld: warning: unexpected existing value for R_WASM_TABLE_INDEX_REL_SLEB: existing=13 expected=12 wasm-ld: warning: unexpected existing value for R_WASM_TABLE_INDEX_REL_SLEB: existing=46 expected=45
That just looks like a warnings. Is there an error too?
Regarding the warnings, did you rebuild all your object files when you did the upgrade?
Yes, it was a warning, but in the end it caused a breakdown. My project is in docker and looking for options to rebuild.
This issue has been automatically marked as stale because there has been no activity in the past year. It will be closed automatically if no further activity occurs in the next 30 days. Feel free to re-open at any time if this issue is still relevant.
An error has occurred,the emscripten version is 1.39.11.
shared:WARNING: for wasm there is no need to set ELIMINATE_DUPLICATE_FUNCTIONS, the binaryen optimizer does it automatically shared:ERROR: '/emscripten/upstream/bin/wasm2js --emscripten -O ./js/opencascade.wasm --mvp-features' failed (-9) Traceback (most recent call last): File "make.py", line 300, in
build()
File "make.py", line 280, in build
emscripten.Building.emcc('-DNOTHING_WAKA_WAKA', emcc_args + ['glue.o'] + opencascade_libs + myincludes[:len(myincludes)-2] + ['--js-transform', 'python %s' % os.path.join('..', 'bundle.py')], temp)
File "/emscripten/upstream/emscripten/tools/shared.py", line 2168, in emcc
run_process([PYTHON, EMCC, filename] + args + ['-o', output_filename], stdout=stdout, stderr=stderr, env=env)
File "/emscripten/upstream/emscripten/tools/shared.py", line 192, in run_process
result.check_returncode()
File "/emscripten/upstream/emscripten/tools/shared.py", line 165, in check_returncode
raise Py2CalledProcessError(returncode=self.returncode, cmd=self.args, output=self.stdout, stderr=self.stderr)