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)
- Include `alext.h` header for AL HOT 4
- register_vector from version 3.1.54 onwards no longer works with get() HOT 11
- Why linker strips about 90% of used files / classes? HOT 6
- Running browser.test_wasmfs_opfs_jspi twice causes tack overflow error HOT 5
- Password input with no echo is not working HOT 9
- Setting `--closure 1` causes `JSC_UNDEFINED_VARIABLE` errors HOT 3
- std::atomic<std::shared_ptr<T>> not compiling with emcc 3.1.42 / clang 17.0.0 HOT 5
- --emit-tsd crashes when used in standalone wasm mode
- Block size specification for audio worklet HOT 3
- Unexpected error of proxyAsync with emscripten_init_websocket_to_posix_socket_bridge HOT 3
- WebGPU new Surface API HOT 1
- Memory Profiler Incorrectly Reporting Data as Free HOT 1
- Using the closure compiler at link time corrupts references to variables in EM_JS blocks HOT 4
- `SUPPORT_BIG_ENDIAN=1` causes internal compiler error `ReferenceError: maybeExport is not defined` HOT 7
- Please set EMSCRIPTEN as an INTERNAL variable in the Emscripten.cmake toolchain file HOT 1
- emsdk 3.1.57: undefined symbol: saveSetjmp/testSetjmp HOT 4
- lto2.test_asyncify_indirect_lists_add is currently failing on the releases waterfall HOT 6
- Int64 return functions with dynamic linking crashes on exception
- `--emit-tsd` doesn't account for `-s WASM_ASYNC_COMPILATION=0` with `-s MODULARIZE=1`
- Should remove remove (reduce usage of) withStackSave? HOT 1
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.