{"action":"created","issue":{"url":"https://api.github.com/repos/ThibaultReuille/graphiti/issues/4","labels_url":"https://api.github.com/repos/ThibaultReuille/graphiti/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/ThibaultReuille/graphiti/issues/4/comments","events_url":"https://api.github.com/repos/ThibaultReuille/graphiti/issues/4/events","html_url":"https://github.com/ThibaultReuille/graphiti/issues/4","id":39679806,"number":4,"title":"Build emscripten version","user":{"login":"netantho","id":994942,"avatar_url":"https://avatars.githubusercontent.com/u/994942?v=3","gravatar_id":"","url":"https://api.github.com/users/netantho","html_url":"https://github.com/netantho","followers_url":"https://api.github.com/users/netantho/followers","following_url":"https://api.github.com/users/netantho/following{/other_user}","gists_url":"https://api.github.com/users/netantho/gists{/gist_id}","starred_url":"https://api.github.com/users/netantho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/netantho/subscriptions","organizations_url":"https://api.github.com/users/netantho/orgs","repos_url":"https://api.github.com/users/netantho/repos","events_url":"https://api.github.com/users/netantho/events{/privacy}","received_events_url":"https://api.github.com/users/netantho/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2014-08-07T00:22:26Z","updated_at":"2015-06-05T20:27:38Z","closed_at":"2014-08-12T02:11:36Z","body":"Hi,\r\n\r\nI tried to build the emscripten version of graphiti on Mac.\r\nHere is more or less what I did:\r\n```\r\ncd ..\r\ngit clone https://github.com/kripken/emscripten.git\r\n\r\nvim graphiti/Makefile:\r\n  EM_CC=../emscripten/em++\r\n\r\nmake web\r\n\r\ncd /tmp\r\nwget http://llvm.org/releases/3.3/clang+llvm-3.3-x86_64-apple-darwin12.tar.gz\r\ntar xvzf clang+llvm-3.3-x86_64-apple-darwin12.tar.gz\r\nvim ~/.emscripten\r\n  LLVM_ROOT = os.path.expanduser(os.getenv('LLVM') or '/private/tmp/clang+llvm-3.3-x86_64-apple-darwin12/bin') # directory\r\n\r\nexport EMCC_FAST_COMPILER=0\r\nmake web\r\n```\r\n\r\nI get the following error:\r\n```\r\n--- Compiling with Emscripten ---\r\n../emscripten/em++ -std=c++11 -I./ -I../ -I../raindance -I../raindance/Lib -I../raindance/Lib/glm-0.9.5.4 Main.cc -s FULL_ES2=1 -s TOTAL_MEMORY=268435456 -o Web/graphiti.js -s EXPORTED_FUNCTIONS=\" [ '_create', '_destroy', '_initialize', '_start', '_registerScript', '_setAttribute', '_addNode', '_removeNode', '_countNodes', '_getNodeID', '_setNodeLabel', '_getNodeLabel', '_setNodeMark', '_getNodeMark', '_setNodeWeight', '_getNodeWeight', '_setNodeAttribute', '_addLink', '_removeLink', '_countLinks', '_getLinkID', '_getLinkNode1', '_getLinkNode2', '_setLinkAttribute', '_countSelectedNodes', '_getSelectedNode', ]\"\r\nclang: warning: argument unused during compilation: '-nostdinc++'\r\nIn file included from Main.cc:29:\r\nIn file included from ./Graphiti.hh:3:\r\nIn file included from ../raindance/Raindance.hh:4:\r\nIn file included from ../raindance/Core/Context.hh:3:\r\n../raindance/Core/Clock.hh:24:78: warning: format specifies type 'int' but the argument has type 'suseconds_t' (aka 'long')\r\n      [-Wformat]\r\n        LOG(\"[CLOCK] Clock created at (%ld s, %d us).\\n\", m_ZeroTime.tv_sec, m_ZeroTime.tv_usec);\r\n                                              ~~                             ^~~~~~~~~~~~~~~~~~\r\n                                              %ld\r\n../raindance/Core/Log.hh:6:43: note: expanded from macro 'LOG'\r\n# define LOG(fmt, ...) do { printf(fmt, ##__VA_ARGS__); } while(false)\r\n                                          ^\r\n1 warning generated.\r\nwarning: unresolved symbol: glGetTexImage\r\n\r\nfs.js:427\r\n  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);\r\n                 ^\r\nError: ENOENT, no such file or directory 'Web/graphiti.js.map'\r\n    at Object.fs.openSync (fs.js:427:18)\r\n    at Object.fs.writeFileSync (fs.js:966:15)\r\n    at generateMap (/Users/averez/Hack/opendns/dataviz/emscripten/tools/source-maps/sourcemapper.js:150:6)\r\n    at Object.<anonymous> (/Users/averez/Hack/opendns/dataviz/emscripten/tools/source-maps/sourcemapper.js:204:5)\r\n    at Module._compile (module.js:456:26)\r\n    at Object.Module._extensions..js (module.js:474:10)\r\n    at Module.load (module.js:356:32)\r\n    at Function.Module._load (module.js:312:12)\r\n    at Function.Module.runMain (module.js:497:10)\r\n    at startup (node.js:119:16)\r\nTraceback (most recent call last):\r\n  File \"/Users/averez/Hack/opendns/dataviz/emscripten/emcc\", line 2014, in <module>\r\n    if debug_level >= 4: generate_source_map(target)\r\n  File \"/Users/averez/Hack/opendns/dataviz/emscripten/emcc\", line 1859, in generate_source_map\r\n    '--offset', str(offset)])\r\n  File \"/Users/averez/Hack/opendns/dataviz/emscripten/tools/jsrun.py\", line 43, in run_js\r\n    raise Exception('Expected the command ' + str(command) + ' to finish with return code ' + str(assert_returncode) + ', but it returned with code ' + str(proc.returncode) + ' instead! Output: ' + str(ret)[:error_limit])\r\nException: Expected the command ['/usr/local/bin/node', '/Users/averez/Hack/opendns/dataviz/emscripten/tools/source-maps/sourcemapper.js', '/tmp/tmpedwSg9/graphiti.bc.link.ll.o.js', '--sourceRoot', '/Users/averez/Hack/opendns/dataviz/graphiti', '--mapFileBaseName', 'Web/graphiti.js', '--offset', '0'] to finish with return code 0, but it returned with code 8 instead! Output:\r\nmake: *** [web] Error 1\r\n```\r\n\r\nI don't have a Web folder generated.\r\n\r\nDocs about the emscripten build would be helpful.\r\n\r\nThanks!\r\n"},"comment":{"url":"https://api.github.com/repos/ThibaultReuille/graphiti/issues/comments/109430883","html_url":"https://github.com/ThibaultReuille/graphiti/issues/4#issuecomment-109430883","issue_url":"https://api.github.com/repos/ThibaultReuille/graphiti/issues/4","id":109430883,"user":{"login":"tpacker","id":3965344,"avatar_url":"https://avatars.githubusercontent.com/u/3965344?v=3","gravatar_id":"","url":"https://api.github.com/users/tpacker","html_url":"https://github.com/tpacker","followers_url":"https://api.github.com/users/tpacker/followers","following_url":"https://api.github.com/users/tpacker/following{/other_user}","gists_url":"https://api.github.com/users/tpacker/gists{/gist_id}","starred_url":"https://api.github.com/users/tpacker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tpacker/subscriptions","organizations_url":"https://api.github.com/users/tpacker/orgs","repos_url":"https://api.github.com/users/tpacker/repos","events_url":"https://api.github.com/users/tpacker/events{/privacy}","received_events_url":"https://api.github.com/users/tpacker/received_events","type":"User","site_admin":false},"created_at":"2015-06-05T20:27:37Z","updated_at":"2015-06-05T20:27:37Z","body":"I am having related problems building the web version of OpenGraphiti.  I downloaded and built the most recent code yesterday.  Had a few issues along the way, but finally got it to build, run, and show my own data.  Now, as I move on to the Web version, it builds with warnings:\r\n\r\n\r\n$ cd /path/to/opengraphiti/dataviz/graphiti\r\n$ make webrun\r\n( cd ../raindance && make )\r\nmake[1]: Entering directory '/path/to/opengraphiti/dataviz/raindance'\r\n--- Packing Raindance resources ---\r\n./pack.sh\r\n- Packing Shaders\r\n- Packing Shaders/Primitives\r\n- Packing Shaders/Widgets\r\n- Packing Shaders/Charts\r\n- Packing Textures\r\n- Packing Textures/Shapes\r\nmake[1]: Leaving directory '/path/to/opengraphiti/dataviz/raindance'\r\n--- Packing OpenGraphiti resources ---\r\n./pack.sh\r\n--- Compiling web version with Emscripten ---\r\nmkdir -p Web\r\n/path/to/opengraphiti/emsdk_portable/emscripten/master/em++ --bind -std=c++11 -I./ -I../ -I../raindance/Lib/glm-0.9.5.4 Main.cc -s FULL_ES2=1 -s TOTAL_MEMORY=268435456 -o Web/graphiti.html\r\nINFO     root: (Emscripten: Running sanity checks)\r\nwarning: unresolved symbol: glGetTexImage\r\nwarning: unresolved symbol: glutSetWindow\r\n--- Appending launcher script to Web/graphiti.html ---\r\necho \"<script async src='../Javascript/main.js'></script>\" >> Web/graphiti.html\r\n\r\n\r\nand runs only partially. I can see the UI when I put my .json file at the bottom of the graphiti.html file, but no data.  If I don't put a link to my .json file in the .html file then the window is all black.  There are console errors either way:\r\n\r\n\r\n[CANVAS] Creating FrameBuffer Object 1327x806 ...\r\ngraphiti.html (line 1233)\r\n[post-exception status] Exception thrown, see JavaScript console\r\n\t\r\n\r\nconsole.error(text);\r\n\r\ngraphiti.html (line 1245)\r\nuncaught exception: SimulateInfiniteLoop\r\nmissing function: glutSetWindow\r\n\t\r\n\r\nconsole.error(text);\r\n\r\ngraphiti.html (line 1245)\r\n-1\r\ngraphiti.html (line 1233)\r\n-1\r\n\t\r\n\r\nconsole.error(text);\r\n\r\ngraphiti.html (line 1245)\r\n[post-exception status] Exception thrown, see JavaScript console\r\n\t\r\n\r\nconsole.error(text);\r\n\r\ngraphiti.html (line 1245)\r\nuncaught exception: abort(-1) at jsStackTrace@file:///path/to/opengraphiti/dataviz/graphiti/Web/graphiti.js:1161:13\r\nstackTrace@file:///path/to/opengraphiti/dataviz/graphiti/Web/graphiti.js:1178:22\r\nabort@file:///path/to/opengraphiti/dataviz/graphiti/Web/graphiti.js:237505:44\r\n_glutSetWindow@file:///path/to/opengraphiti/dataviz/graphiti/Web/graphiti.js:10883:58\r\n__ZN9RainDance13postRedisplayEv [RainDance::postRedisplay()]@file:///path/to/opengraphiti/dataviz/graphiti/Web/graphiti.js:20761:3\r\n__ZN8Graphiti4idleEv [Graphiti::idle()]@file:///path/to/opengraphiti/dataviz/graphiti/Web/graphiti.js:22947:2\r\n__ZN4GLUTL4idleEv [GLUT(idle)]@file:///path/to/opengraphiti/dataviz/graphiti/Web/graphiti.js:20850:2\r\ndynCall_v@file:///path/to/opengraphiti/dataviz/graphiti/Web/graphiti.js:232874:3\r\nRuntime.dynCall@file:///path/to/opengraphiti/dataviz/graphiti/Web/graphiti.js:280:14\r\ncallback@file:///path/to/opengraphiti/dataviz/graphiti/Web/graphiti.js:8521:11\r\nBrowser.safeSetTimeout/<@file:///path/to/opengraphiti/dataviz/graphiti/Web/graphiti.js:7594:13\r\n\r\n\r\nIs there a tutorial for getting Web to work?  "}}