Comments (11)
Are you using the latest closure compiler from svn, compiled yourself? It has recently gotten several fixes that are important for large files (one in particular filed by us).
from emscripten.
I tried both the latest download and trunk (r1193). They both produced this same error. Do you have the issue number handy which you filed?
from emscripten.
FYI: my ticket http://code.google.com/p/closure-compiler/issues/detail?id=492
from emscripten.
Issue 435, http://code.google.com/p/closure-compiler/issues/detail?id=435
If it doesn't work on their svn, then the best thing is probably to open an issue with them. If you do so, please mention the issue number here.
Perhaps the difference results we are seeing is due to different compilation options. I did llvm_gcc_0_1 in the test runner (no llvm opts, yes to typed arrays, reloop and optimize).
edit: thanks for posting the issue #!
from emscripten.
I also run closure compiler differently than you,
java -jar CLOSURE_COMPILER --compilation_level ADVANCED_OPTIMIZATIONS --variable_map_output_file src.cpp.o.js.vars --js src.cpp.o.js --js_output_file src.cpp.o.cc.js
from emscripten.
Yup, I tried it with those settings from tests/runner.py
too, but it didn't make any difference.
I still haven't got this working without crashing :( What setting maps to "no llvm opts"? Typed arrays, reloop and optimise are all attributes of src/settings.py
, but I couldn't find anything obvious about llvm opts.
from emscripten.
LLVM_OPTS is used in the test runner (tests/runner.py). If set to 1, llvm-opt is run.
Running tests with
python tests/runner.py clang_x_y.test_XXX
will set LLVM_OPT to the value of x (and y is optimizations/typed arrays). I compiled the python demo with llvm_gcc_0_1, so no llvm opts.
What command did you run to build the python demo?
from emscripten.
Right. I was following the readme in tests/python/readme.txt
on how to build from scatch. My shell script is as follows:
#!/bin/bash
# build as per ${EMSCRIPTEN}/tests/python/readme.txt
PYTHON=${HOME}/downloads/Python-2.7.1.tar.bz2
LLVM=${HOME}/downloads/llvm-2.9/cbuild/Release/bin
LLVM_GCC=${HOME}/downloads/llvm-gcc-4.2-2.9.source/cbuild/install/bin
EMSCRIPTEN=${HOME}/reposs/emscripten
# extract Python
rm -rf Python-2.7.1
tar jxf ${PYTHON}
cd Python-2.7.1
mkdir -p bin/pylibs
cd bin
# setup ccproxy
cp ${EMSCRIPTEN}/tests/python/ccproxy.py .
chmod +x ccproxy.py
sed -i "s@\.\.LLVM_GCC_DIR\.\.@${LLVM_GCC}@; s@\.\.LLVM_DIR\.\.@${LLVM}@g" ccproxy.py
# configure
CC=./ccproxy.py ../configure --without-threads --without-pymalloc
sed -i 's@HAVE_GCC_ASM_FOR_X87@PY_NO_SHORT_FLOAT_REPR@' pyconfig.h
sed -i -r 's@(^#define\s+HAVE_SIG.*)@// \1@; s@^// (#define\s+HAVE_SIGNAL_H\s)@\1@' pyconfig.h
# make until failure
make
# manually link and disassemble
cd pylibs
ar x ../libpython2.7.a
cp ../Modules/python.o .
${LLVM}/llvm-link -o=python.bc *.o
${LLVM}/llvm-dis -show-annotations python.bc
# return
cd ../../..
# run byte code through emscripten
${EMSCRIPTEN}/emscripten.py Python-2.7.1/bin/pylibs/python.ll > python2.7.1.js
The resultant python2.7.1.js
is then passed to the closure compiler as per my initial post.
from emscripten.
If you haven't edited settings.js, then that will build with assertions and without OPTIMIZE and RELOOP. That generates larger (and slower) code. So that might be the difference that causes closure to get more confused.
Seems that they know what the issue is over there though, hopefully they can fix it.
Btw, you can compile the python demo using the one-line command I mentioned (through the test runner). That should work for now, unless you need to build manually for some reason.
from emscripten.
Yeah, I worked that one out last night in fact. Was just about to update this issue :) Thanks!
We need some manual steps in the pipeline as we're building a slightly-nonstandard build of Python.
from emscripten.
Note that you can change the stuff in settings.js by passing stuff to emscripten.py. The test runner does it that way. You basically pass a JSON object in a string, with RELOOP: 1 etc.
from emscripten.
Related Issues (20)
- The currently published docker image uses a seemingly incompatible version of CMake HOT 1
- Exception can't be caught with `-sMAIN_MODULE` and `-sEMULATE_FUNCTION_POINTER_CASTS` and give Runtime error HOT 1
- Output emcc HOT 1
- WASMFS Mouting OPFS from js HOT 2
- Node V14 with CommonJS HOT 6
- llvm-strip throws invalid relocation offset when using --strip-debug HOT 8
- stringstream acts incorrectly with double type value when some characters are followed
- ASYNCIFY=1 HOT 8
- WebGPU: Wrong values returned from wgpuBufferGetMapState
- Call my callback function in other thread with proxying.h HOT 1
- Joining a thread after using emscripten_set_main_loop deadlocks HOT 7
- Runtime Link Error HOT 3
- websocket_to_posix_proxy in a container
- [HELP] HOW Enable NODERAWFS with emcmake. HOT 1
- runMetaWithFS always use XHR and fails in nodejs environment HOT 1
- WASM_BIGINT leads to RuntimeError HOT 3
- How to use requestAnimationFrame in place of wgpuInstanceProcessEvents HOT 1
- Wasm2wat Unexpect Opcode HOT 5
- JSPI and pthreads shows RuntimeError - invalid suspender object for suspend
- Exception handling helpers not included in the TypeScript definition file when using option --emit-tsd and -sEXPORT_EXCEPTION_HANDLING_HELPERS
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from emscripten.