Comments (3)
Man, you have a long way to go...
First of all, this has nothing to do with viz.js but with Emscripten in general. You must install fastcomp backend and change ~/.emscripten accordingly.
Read:
http://kripken.github.io/emscripten-site/docs/building_from_source/LLVM-Backend.html
http://kripken.github.io/emscripten-site/docs/building_from_source/building_fastcomp_manually_from_source.html#building-fastcomp-from-source
I do not recommend to use emsdk on Ubuntu, since all other packages except fastcomp don't need to be built.
sudo apt-get install nodejs nodejs-legacy gcc g++
You should remove regular clang and llvm, they will mess up with Emscripten-specific.
Besides, please notice "nodejs-legacy" instead of "node". You certainly do not want to install "Amateur Packet Radio Node".
from viz-js.
Thank you for your reply.
I build fastcomp from source
and After run make
, I saw the message below
~/work/labs/visualize_dot/viz.js@cherry-com(20048)$ make
cd libexpat-src/lib; /home/cherry/work/labs/visualize_dot/viz.js/emscripten/emcc -Oz -o lib-em.bc -I. -I.. -DHAVE_BCOPY -DHAVE_CONFIG_H xmlparse.c xmlrole.c xmltok.c
xmlparse.c:1568:18: warning: implicit conversion from enumeration type 'enum XML_Status' to different enumeration type 'enum XML_Error' [-Wenum-conversion]
result = XML_STATUS_SUSPENDED;
~ ^~~~~~~~~~~~~~~~~~~~
./expat.h:51:30: note: expanded from macro 'XML_STATUS_SUSPENDED'
#define XML_STATUS_SUSPENDED XML_STATUS_SUSPENDED
^~~~~~~~~~~~~~~~~~~~
xmlparse.c:1578:18: warning: implicit conversion from enumeration type 'enum XML_Status' to different enumeration type 'enum XML_Error' [-Wenum-conversion]
result = XML_STATUS_OK;
~ ^~~~~~~~~~~~~
./expat.h:49:23: note: expanded from macro 'XML_STATUS_OK'
#define XML_STATUS_OK XML_STATUS_OK
^~~~~~~~~~~~~
xmlparse.c:1608:12: warning: implicit conversion from enumeration type 'enum XML_Error' to different enumeration type 'enum XML_Status' [-Wenum-conversion]
return result;
~~~~~~ ^~~~~~
3 warnings generated.
opt: Unknown command line argument '-disable-loop-vectorization'. Try: '/home/cherry/tmp/myfastcomp/emscripten-fastcomp/build/bin/opt -help'
opt: Did you mean '-disable-vectorize'?
opt: Unknown command line argument '-disable-slp-vectorization'. Try: '/home/cherry/tmp/myfastcomp/emscripten-fastcomp/build/bin/opt -help'
opt: Did you mean '-disable-vectorize'?
Traceback (most recent call last):
File "/home/cherry/work/labs/visualize_dot/viz.js/emscripten/emcc", line 1122, in <module>
shared.Building.llvm_opt(temp_file, llvm_opts, new_temp_file)
File "/home/cherry/work/labs/visualize_dot/viz.js/emscripten/tools/shared.py", line 1367, in llvm_opt
assert os.path.exists(target), 'Failed to run llvm optimizations: ' + output
AssertionError: Failed to run llvm optimizations:
make: *** [libexpat-src/lib/lib-em.bc] Error 1
~/work/labs/visualize_dot/viz.js@cherry-com(20049)$
- and my ~/.emscripten file is below
Is there anything to do??
I am discouraged.... It is very hard to draw dot graph ...
Thank you :)
1
2 # Note: If you put paths relative to the home directory, do not forget os.path.expanduser
3
4 import os
5
6 # this helps projects using emscripten find it
7 EMSCRIPTEN_ROOT = os.path.expanduser(os.getenv('EMSCRIPTEN') or '/home/cherry/work/labs/visualize_dot/viz.js/emscripten') # directory
8 LLVM_ROOT = os.path.expanduser('/home/cherry/tmp/myfastcomp/emscripten-fastcomp/build/bin') # directory
9
10 # If not specified, defaults to sys.executable.
11 #PYTHON = 'python'
12
13 # See below for notes on which JS engine(s) you need
14 NODE_JS = os.path.expanduser(os.getenv('NODE') or '/usr/bin/node') # executable
15 SPIDERMONKEY_ENGINE = [os.path.expanduser(os.getenv('SPIDERMONKEY') or 'js')] # executable
16 V8_ENGINE = os.path.expanduser(os.getenv('V8') or 'd8') # executable
17
18 JAVA = 'java' # executable
19
20 TEMP_DIR = '/tmp'
21
22 CRUNCH = os.path.expanduser(os.getenv('CRUNCH') or 'crunch') # executable
23
24 #CLOSURE_COMPILER = '..' # define this to not use the bundled version
25
26 ########################################################################################################
27
28
29 # Pick the JS engine to use for running the compiler. This engine must exist, or
30 # nothing can be compiled.
31 #
32 # Recommendation: If you already have node installed, use that. Otherwise, build v8 or
33 # spidermonkey from source. Any of these three is fine, as long as it's
34 # a recent version (especially for v8 and spidermonkey).
35
36 COMPILER_ENGINE = NODE_JS
37 #COMPILER_ENGINE = V8_ENGINE
38 #COMPILER_ENGINE = SPIDERMONKEY_ENGINE
39
40
41 # All JS engines to use when running the automatic tests. Not all the engines in this list
42 # must exist (if they don't, they will be skipped in the test runner).
43 #
44 # Recommendation: If you already have node installed, use that. If you can, also build
45 # spidermonkey from source as well to get more test coverage (node can't
46 # run all the tests due to node issue 1669). v8 is currently not recommended
47 # here because of v8 issue 1822.
48
49 JS_ENGINES = [NODE_JS] # add this if you have spidermonkey installed too, SPIDERMONKEY_ENGINE]
50
from viz-js.
It can be a compatibility bug between emscripten and the freshly built fastcomp. Try updating emscripten to the most recent version and re-make:
cd /home/cherry/work/labs/visualize_dot/viz.js/emscripten
git pull origin master
cd ..
make
from viz-js.
Related Issues (20)
- Add type definitions HOT 4
- Publish lang-dot package
- Figure out why pkg-config doesn't work as expected for Expat
- Investigate distributing a non-WASM build
- Investigate support for separate WebAssembly instantiation
- Support -x (reduce) option
- Image support in v3 HOT 6
- RuntimeError with long label starting with newline HOT 1
- Android Project HOT 1
- Types can not be imported with current package.json HOT 2
- Dynamic font Family HOT 2
- Strict mode but merge labels HOT 1
- Text not rendering in nodes HOT 11
- Question about usage without Webassembly and some other questions HOT 1
- I need to remove tooltip i.e title for entire graph. How can it be done HOT 4
- Having trouble with new image support - can't use same image URL in two different places HOT 3
- Positions will never change HOT 3
- DockerFile uses Expat 2.5.0 which is vulnerable for CVE-2023-52425 HOT 2
- Different Results with same Graph HOT 2
- Status of the viz-js OSS project 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 viz-js.