emscripten-core / emscripten

Emscripten: An LLVM-to-WebAssembly Compiler
Other
25.69k stars 3.29k forks source link

An error has occurred #11735

Closed Johnly1986 closed 3 years ago

Johnly1986 commented 4 years ago

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)

sbc100 commented 4 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.

Johnly1986 commented 4 years ago

make.py From my own project.

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) tools.shared.Py2CalledProcessError: Command '['/usr/bin/python2.7', '/emscripten/upstream/emscripten/emcc.py', '-DNOTHING_WAKA_WAKA', '-std=c++1z', '-s', 'NO_EXIT_RUNTIME=1', '-s', 'EXPORTED_RUNTIME_METHODS=["UTF8ToString"]', '-O3', '--llvm-lto', '3', '-s', 'WASM=0', '-s', 'ELIMINATE_DUPLICATE_FUNCTIONS=1', '-s', 'SINGLE_FILE=1', '-s', 'LEGACY_VM_SUPPORT=1', '-s', 'NO_DYNAMIC_EXECUTION=1', '-s', 'TOTAL_MEMORY=67108864', '-s', 'ALLOW_MEMORY_GROWTH=1', '-s', 'EXPORT_NAME="opencascade"', '-s', 'MODULARIZE=1', '-s', 'EXTRA_EXPORTED_RUNTIME_METHODS=["FS"]', '-s', 'EXPORT_ES6=1', '-s', 'USE_ES6_IMPORT_META=0', '-s', 'AGGRESSIVE_VARIABLE_ELIMINATION=1', 'glue.o', './build/lin32/clang/lib/libTKBO.a', './build/lin32/clang/lib/libTKBRep.a', './build/lin32/clang/lib/libTKBin.a', './build/lin32/clang/lib/libTKBinL.a', './build/lin32/clang/lib/libTKBinXCAF.a', './build/lin32/clang/lib/libTKBool.a', './build/lin32/clang/lib/libTKCAF.a', './build/lin32/clang/lib/libTKCDF.a', './build/lin32/clang/lib/libTKFeat.a', './build/lin32/clang/lib/libTKFillet.a', './build/lin32/clang/lib/libTKG2d.a', './build/lin32/clang/lib/libTKG3d.a', './build/lin32/clang/lib/libTKGeomAlgo.a', './build/lin32/clang/lib/libTKGeomBase.a', './build/lin32/clang/lib/libTKHLR.a', './build/lin32/clang/lib/libTKIGES.a', './build/lin32/clang/lib/libTKLCAF.a', './build/lin32/clang/lib/libTKMath.a', './build/lin32/clang/lib/libTKMesh.a', './build/lin32/clang/lib/libTKOffset.a', './build/lin32/clang/lib/libTKPrim.a', './build/lin32/clang/lib/libTKRWMesh.a', './build/lin32/clang/lib/libTKSTEP.a', './build/lin32/clang/lib/libTKSTEP209.a', './build/lin32/clang/lib/libTKSTEPAttr.a', './build/lin32/clang/lib/libTKSTEPBase.a', './build/lin32/clang/lib/libTKSTL.a', './build/lin32/clang/lib/libTKService.a', './build/lin32/clang/lib/libTKShHealing.a', './build/lin32/clang/lib/libTKTopAlgo.a', './build/lin32/clang/lib/libTKV3d.a', './build/lin32/clang/lib/libTKVCAF.a', './build/lin32/clang/lib/libTKVRML.a', './build/lin32/clang/lib/libTKXCAF.a', './build/lin32/clang/lib/libTKXDEIGES.a', './build/lin32/clang/lib/libTKXDESTEP.a', './build/lin32/clang/lib/libTKXMesh.a', './build/lin32/clang/lib/libTKXSBase.a', './build/lin32/clang/lib/libTKXml.a', './build/lin32/clang/lib/libTKXmlL.a', './build/lin32/clang/lib/libTKXmlXCAF.a', './build/lin32/clang/lib/libTKernel.a', '-I./occt/src/AIS', '-I./occt/src/APIHeaderSection', '-I./occt/src/Adaptor2d', '-I./occt/src/Adaptor3d', '-I./occt/src/AdvApp2Var', '-I./occt/src/AdvApprox', '-I./occt/src/AppBlend', '-I./occt/src/AppCont', '-I./occt/src/AppDef', '-I./occt/src/AppParCurves', '-I./occt/src/AppStd', '-I./occt/src/AppStdL', '-I./occt/src/Approx', '-I./occt/src/ApproxInt', '-I./occt/src/Aspect', '-I./occt/src/BOPAlgo', '-I./occt/src/BOPDS', '-I./occt/src/BOPTest', '-I./occt/src/BOPTools', '-I./occt/src/BRep', '-I./occt/src/BRepAdaptor', '-I./occt/src/BRepAlgo', '-I./occt/src/BRepAlgoAPI', '-I./occt/src/BRepApprox', '-I./occt/src/BRepBlend', '-I./occt/src/BRepBndLib', '-I./occt/src/BRepBuilderAPI', '-I./occt/src/BRepCheck', '-I./occt/src/BRepClass', '-I./occt/src/BRepClass3d', '-I./occt/src/BRepExtrema', '-I./occt/src/BRepFeat', '-I./occt/src/BRepFill', '-I./occt/src/BRepFilletAPI', '-I./occt/src/BRepGProp', '-I./occt/src/BRepIntCurveSurface', '-I./occt/src/BRepLProp', '-I./occt/src/BRepLib', '-I./occt/src/BRepMAT2d', '-I./occt/src/BRepMesh', '-I./occt/src/BRepMeshData', '-I./occt/src/BRepOffset', '-I./occt/src/BRepOffsetAPI', '-I./occt/src/BRepPrim', '-I./occt/src/BRepPrimAPI', '-I./occt/src/BRepProj', '-I./occt/src/BRepSweep', '-I./occt/src/BRepTest', '-I./occt/src/BRepToIGES', '-I./occt/src/BRepToIGESBRep', '-I./occt/src/BRepTools', '-I./occt/src/BRepTopAdaptor', '-I./occt/src/BSplCLib', '-I./occt/src/BSplSLib', '-I./occt/src/BVH', '-I./occt/src/BiTgte', '-I./occt/src/BinDrivers', '-I./occt/src/BinLDrivers', '-I./occt/src/BinMDF', '-I./occt/src/BinMDataStd', '-I./occt/src/BinMDataXtd', '-I./occt/src/BinMDocStd', '-I./occt/src/BinMFunction', '-I./occt/src/BinMNaming', '-I./occt/src/BinMXCAFDoc', '-I./occt/src/BinObjMgt', '-I./occt/src/BinTObjDrivers', '-I./occt/src/BinTools', '-I./occt/src/BinXCAFDrivers', '-I./occt/src/Bisector', '-I./occt/src/Blend', '-I./occt/src/BlendFunc', '-I./occt/src/Bnd', '-I./occt/src/BndLib', '-I./occt/src/CDF', '-I./occt/src/CDM', '-I./occt/src/CPnts', '-I./occt/src/CSLib', '-I./occt/src/ChFi2d', '-I./occt/src/ChFi3d', '-I./occt/src/ChFiDS', '-I./occt/src/ChFiKPart', '-I./occt/src/Cocoa', '-I./occt/src/Contap', '-I./occt/src/Convert', '-I./occt/src/D3DHost', '-I./occt/src/DBRep', '-I./occt/src/DDF', '-I./occt/src/DDataStd', '-I./occt/src/DDocStd', '-I./occt/src/DNaming', '-I./occt/src/DPrsStd', '-I./occt/src/DRAWEXE', '-I./occt/src/Draft', '-I./occt/src/Draw', '-I./occt/src/DrawDim', '-I./occt/src/DrawFairCurve', '-I./occt/src/DrawResources', '-I./occt/src/DrawTrSurf', '-I./occt/src/DsgPrs', '-I./occt/src/ElCLib', '-I./occt/src/ElSLib', '-I./occt/src/Expr', '-I./occt/src/ExprIntrp', '-I./occt/src/Extrema', '-I./occt/src/FEmTool', '-I./occt/src/FSD', '-I./occt/src/FairCurve', '-I./occt/src/FilletSurf', '-I./occt/src/Font', '-I./occt/src/GC', '-I./occt/src/GCE2d', '-I./occt/src/GCPnts', '-I./occt/src/GProp', '-I./occt/src/Gsrc/Geom2dAdaptor', '-I./occt/src/Geom2dConvert', '-I./occt/src/Geom2dEvaluator', '-I./occt/src/Geom2dGcc', '-I./occt/src/Geom2dHatch', '-I./occt/src/Geom2dInt', '-I./occt/src/Geom2dLProp', '-I./occt/src/Geom2dToIGES', '-I./occt/src/GeomAPI', '-I./occt/src/GeomAbs', '-I./occt/src/GeomAdaptor', '-I./occt/src/GeomConvert', '-I./occt/src/GeomEvaluator', '-I./occt/src/GeomFill', '-I./occt/src/GeomInt', '-I./occt/src/GeomLProp', '-I./occt/src/GeomLib', '-I./occt/src/GeomPlate', '-I./occt/src/GeomProjLib', '-I./occt/src/GeomToIGES', '-I./occt/src/GeomToStep', '-I./occt/src/GeomTools', '-I./occt/src/GeometryTest', '-I./occt/src/GeomliteTest', '-I./occt/src/Graphic3d', '-I./occt/src/HLRAlgo', '-I./occt/src/HLRAppli', '-I./occt/src/HLRBRep', '-I./occt/src/HLRTest', '-I./occt/src/HLRTopoBRep', '-I./occt/src/Hatch', '-I./occt/src/HatchGen', '-I./occt/src/HeaderSection', '-I./occt/src/Hermit', '-I./occt/src/IFGraph', '-I./occt/src/IFSelect', '-I./occt/src/IGESAppli', '-I./occt/src/IGESBasic', '-I./occt/src/IGESCAFControl', '-I./occt/src/IGESControl', '-I./occt/src/IGESConvGeom', '-I./occt/src/IGESData', '-I./occt/src/IGESDefs', '-I./occt/src/IGESDimen', '-I./occt/src/IGESDraw', '-I./occt/src/IGESFile', '-I./occt/src/IGESGeom', '-I./occt/src/IGESGraph', '-I./occt/src/IGESSelect', '-I./occt/src/IGESSolid', '-I./occt/src/IGESToBRep', '-I./occt/src/IMeshData', '-I./occt/src/IMeshTools', '-I./occt/src/IVtk', '-I./occt/src/IVtkDraw', '-I./occt/src/IVtkOCC', '-I./occt/src/IVtkTools', '-I./occt/src/IVtkVTK', '-I./occt/src/Image', '-I./occt/src/IntAna', '-I./occt/src/IntAna2d', '-I./occt/src/IntCurve', '-I./occt/src/IntCurveSurface', '-I./occt/src/IntCurvesFace', '-I./occt/src/IntImp', '-I./occt/src/IntImpParGen', '-I./occt/src/IntPatch', '-I./occt/src/IntPolyh', '-I./occt/src/IntRes2d', '-I./occt/src/IntStart', '-I./occt/src/IntSurf', '-I./occt/src/IntTools', '-I./occt/src/IntWalk', '-I./occt/src/Interface', '-I./occt/src/InterfaceGraphic', '-I./occt/src/Intf', '-I./occt/src/Intrv', '-I./occt/src/LDOM', '-I./occt/src/LProp', '-I./occt/src/LProp3d', '-I./occt/src/Law', '-I./occt/src/LibCtl', '-I./occt/src/LocOpe', '-I./occt/src/LocalAnalysis', '-I./occt/src/MAT', '-I./occt/src/MAT2d', '-I./occt/src/MMgt', '-I./occt/src/Media', '-I./occt/src/MeshTest', '-I./occt/src/MeshVS', '-I./occt/src/Message', '-I./occt/src/MoniTool', '-I./occt/src/NCollection', '-I./occt/src/NLPlate', '-I./occt/src/OS', '-I./occt/src/OSD', '-I./occt/src/OpenGl', '-I./occt/src/PCDM', '-I./occt/src/PLib', '-I./occt/src/Plate', '-I./occt/src/Plugin', '-I./occt/src/Poly', '-I./occt/src/Precision', '-I./occt/src/ProjLib', '-I./occt/src/Prs3d', '-I./occt/src/PrsMgr', '-I./occt/src/QABugs', '-I./occt/src/QADNaming', '-I./occt/src/QADraw', '-I./occt/src/QANCollection', '-I./occt/src/Quantity', '-I./occt/src/RWGltf', '-I./occt/src/RWHeaderSection', '-I./occt/src/RWMesh', '-I./occt/src/RWObj', '-I./occt/src/RWStepAP203', '-I./occt/src/RWStepAP214', '-I./occt/src/RWStepAP242', '-I./occt/src/RWStepBasic', '-I./occt/src/RWStepDimTol', '-I./occt/src/RWStepElement', '-I./occt/src/RWStepFEA', '-I./occt/src/RWStepGeom', '-I./occt/src/RWStepRepr', '-I./occt/src/RWStepShape', '-I./occt/src/RWStepVisual', '-I./occt/src/RWStl', '-I./occt/src/Resource', '-I./occt/src/SHMessage', '-I./occt/src/STEPCAFControl', '-I./occt/src/STEPConstruct', '-I./occt/src/STEPControl', '-I./occt/src/STEPEdit', '-I./occt/src/STEPSelections', '-I./occt/src/SWDRAW', '-I./occt/src/Select3D', '-I./occt/src/SelectBasics', '-I./occt/src/SelectMgr', '-I./occt/src/Shaders', '-I./occt/src/ShapeAlgo', '-I./occt/src/ShapeAnalysis', '-I./occt/src/ShapeBuild', '-I./occt/src/ShapeConstruct', '-I./occt/src/ShapeCustom', '-I./occt/src/ShapeExtend', '-I./occt/src/ShapeFix', '-I./occt/src/ShapePersistent', '-I./occt/src/ShapeProcess', '-I./occt/src/ShapeProcessAPI', '-I./occt/src/ShapeUpgrade', '-I./occt/src/Standard', '-I./occt/src/StdDrivers', '-I./occt/src/StdFail', '-I./occt/src/StdLDrivers', '-I./occt/src/StdLPersistent', '-I./occt/src/StdObjMgt', '-I./occt/src/StdObject', '-I./occt/src/StdPersistent', '-I./occt/src/StdPrs', '-I./occt/src/StdResource', '-I./occt/src/StdSelect', '-I./occt/src/StdStorage', '-I./occt/src/StepAP203', '-I./occt/src/StepAP209', '-I./occt/src/StepAP214', '-I./occt/src/StepAP242', '-I./occt/src/StepBasic', '-I./occt/src/StepData', '-I./occt/src/StepDimTol', '-I./occt/src/StepElement', '-I./occt/src/StepFEA', '-I./occt/src/StepFile', '-I./occt/src/StepGeom', '-I./occt/src/StepRepr', '-I./occt/src/StepSelect', '-I./occt/src/StepShape', '-I./occt/src/StepToGeom', '-I./occt/src/StepToTopoDS', '-I./occt/src/StepVisual', '-I./occt/src/StlAPI', '-I./occt/src/Storage', '-I./occt/src/Sweep', '-I./occt/src/TColGeom', '-I./occt/src/TColGeom2d', '-I./occt/src/TColQuantity', '-I./occt/src/TColStd', '-I./occt/src/TColgp', '-I./occt/src/TCollection', '-I./occt/src/TDF', '-I./occt/src/TDataStd', '-I./occt/src/TDataXtd', '-I./occt/src/TDocStd', '-I./occt/src/TFunction', '-I./occt/src/TKBO', '-I./occt/src/TKBRep', '-I./occt/src/TKBin', '-I./occt/src/TKBinL', '-I./occt/src/TKBinTObj', '-I./occt/src/TKBinXCAF', '-I./occt/src/TKBool', '-I./occt/src/TKCAF', '-I./occt/src/TKCDF', '-I./occt/src/TKD3DHost', '-I./occt/src/TKDCAF', '-I./occt/src/TKDraw', '-I./occt/src/TKFeat', '-I./occt/src/TKFillet', '-I./occt/src/TKG2d', '-I./occt/src/TKG3d', '-I./occt/src/TKGeomAlgo', '-I./occt/src/TKGeomBase', '-I./occt/src/TKHLR', '-I./occt/src/TKIGES', '-I./occt/src/TKIVtk', '-I./occt/src/TKIVtkDraw', '-I./occt/src/TKLCAF', '-I./occt/src/TKMath', '-I./occt/src/TKMesh', '-I./occt/src/TKMeshVS', '-I./occt/src/TKOffset', '-I./occt/src/TKOpenGl', '-I./occt/src/TKPrim', '-I./occt/src/TKQADraw', '-I./occt/src/TKRWMesh', '-I./occt/src/TKSTEP', '-I./occt/src/TKSTEP209', '-I./occt/src/TKSTEPAttr', '-I./occt/src/TKSTEPBase', '-I./occt/src/TKSTL', '-I./occt/src/TKService', '-I./occt/src/TKShHealing', '-I./occt/src/TKStd', '-I./occt/src/TKStdL', '-I./occt/src/TKTObj', '-I./occt/src/TKTObjDRAW', '-I./occt/src/TKTopAlgo', '-I./occt/src/TKTopTest', '-I./occt/src/TKV3d', '-I./occt/src/TKVCAF', '-I./occt/src/TKVRML', '-I./occt/src/TKViewerTest', '-I./occt/src/TKXCAF', '-I./occt/src/TKXDEDRAW', '-I./occt/src/TKXDEIGES', '-I./occt/src/TKXDESTEP', '-I./occt/src/TKXMesh', '-I./occt/src/TKXSBase', '-I./occt/src/TKXSDRAW', '-I./occt/src/TKXml', '-I./occt/src/TKXmlL', '-I./occt/src/TKXmlTObj', '-I./occt/src/TKXmlXCAF', '-I./occt/src/TKernel', '-I./occt/src/TNaming', '-I./occt/src/TObj', '-I./occt/src/TObjDRAW', '-I./occt/src/TPrsStd', '-I./occt/src/TShort', '-I./occt/src/Textures', '-I./occt/src/TopAbs', '-I./occt/src/TopBas', '-I./occt/src/TopClass', '-I./occt/src/TopCnx', '-I./occt/src/TopExp', '-I./occt/src/TopLoc', '-I./occt/src/TopOpeBRep', '-I./occt/src/TopOpeBRepBuild', '-I./occt/src/TopOpeBRepDS', '-I./occt/src/TopOpeBRepTool', '-I./occt/src/TopTools', '-I./occt/src/TopTrans', '-I./occt/src/TopoDS', '-I./occt/src/TopoDSToStep', '-I./occt/src/Transfer', '-I./occt/src/TransferBRep', '-I./occt/src/UTL', '-I./occt/src/Units', '-I./occt/src/UnitsAPI', '-I./occt/src/UnitsMethods', '-I./occt/src/V3d', '-I./occt/src/ViewerTest', '-I./occt/src/Vrml', '-I./occt/src/VrmlAPI', '-I./occt/src/VrmlConverter', '-I./occt/src/VrmlData', '-I./occt/src/WNT', '-I./occt/src/XBRepMesh', '-I./occt/src/XCAFApp', '-I./occt/src/XCAFDimTolObjects', '-I./occt/src/XCAFDoc', '-I./occt/src/XCAFNoteObjects', '-I./occt/src/XCAFPrs', '-I./occt/src/XCAFView', '-I./occt/src/XDEDRAW', '-I./occt/src/XSAlgo', '-I./occt/src/XSControl', '-I./occt/src/XSDRAW', '-I./occt/src/XSDRAWIGES', '-I./occt/src/XSDRAWSTEP', '-I./occt/src/XSDRAWSTLVRML', '-I./occt/src/XSMessage', '-I./occt/src/XSTEPResource', '-I./occt/src/XmlDrivers', '-I./occt/src/XmlLDrivers', '-I./occt/src/XmlMDF', '-I./occt/src/XmlMDataStd', '-I./occt/src/XmlMDataXtd', '-I./occt/src/XmlMDocStd', '-I./occt/src/XmlMFunction', '-I./occt/src/XmlMNaming', '-I./occt/src/XmlMXCAFDoc', '-I./occt/src/XmlObjMgt', '-I./occt/src/XmlOcafResource', '-I./occt/src/XmlTObjDrivers', '-I./occt/src/XmlXCAFDrivers', '-I./occt/src/Xw', '-I./occt/src/gce', '-I./occt/src/gp', '-I./occt/src/math', '-I./../', '--js-transform', 'python ../bundle.py', '-o', './js/opencascade.js']' returned non-zero exit status 1

sbc100 commented 4 years ago

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?

Johnly1986 commented 4 years ago

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 .

sbc100 commented 4 years ago

Strange, it looks like your make.py script is calling emscripten.Building.emcc... is it not?

Johnly1986 commented 4 years ago

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

sbc100 commented 4 years ago

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.

Johnly1986 commented 4 years ago

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.

====================================================================================================================================================================================================================================================================================================================================================================== Stage 8: emcc: -std=c++1z -s NO_EXIT_RUNTIME=1 -s EXPORTED_RUNTIME_METHODS=["UTF8ToString"] -O3 --llvm-lto 3 -s WASM=1 -s NO_DYNAMIC_EXECUTION=1 -s TOTAL_MEMORY=67108864 -s ALLOW_MEMORY_GROWTH=1 -s EXPORT_NAME="opencascade" -s MODULARIZE=1 -s EXTRA_EXPORTED_RUNTIME_METHODS=["FS"] -s EXPORT_ES6=1 -s USE_ES6_IMPORT_META=0 -s AGGRESSIVE_VARIABLE_ELIMINATION=1

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

sbc100 commented 4 years ago

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?

Johnly1986 commented 4 years ago

Yes, it was a warning, but in the end it caused a breakdown. My project is in docker and looking for options to rebuild.

stale[bot] commented 3 years ago

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.