I see a difference between your Docker output and mine. Yours says Adding directories to PATH: PATH += /emsdk_portable
Whereas mine says: Adding directories to PATH: PATH += /emsdk_portable PATH += /emsdk_portable/clang/fastcomp/build_master_64/bin PATH += /emsdk_portable/emscripten/master Any idea why emsdk_env.sh would not add the last two directories to PATH in your case? Which OS are you using? I'm using Ubuntu 64-bit 14.10 and Docker 1.4.1. Arve On Tue, Jan 6, 2015 at 1:44 AM, Alon Zakai <alonza...@gmail.com> wrote: > Thanks, that fixes the install issue. After some fiddling with users and > groups, I now get > > $ docker build -t chuckdemos . && docker run -p 8000:8000 chuckdemos > Sending build context to Docker daemon 99.34 MB > Sending build context to Docker daemon > Step 0 : FROM aknudsen/emscripten:1.28.0 > ---> 3bb870c168d4 > Step 1 : RUN rm /bin/sh && ln -s /bin/bash /bin/sh > ---> Using cache > ---> a9a395a9e6f0 > Step 2 : ADD . /code > ---> Using cache > ---> 16b7606b2d29 > Step 3 : WORKDIR /code > ---> Using cache > ---> 88e18692a27f > Step 4 : RUN pushd /emsdk_portable && source ./emsdk_env.sh && popd && > pushd src &&make clean && make -j5 CHUCK_DEBUG=1 > CHUCK_EM_SOURCEMAP=1CHUCK_EM_SAFEHEAP=3 emscripten && popd && pushd js && > npm install && grunt > ---> Running in 186fecc685d1 > /emsdk_portable /code > Adding directories to PATH: > PATH += /emsdk_portable > > /code > /code/src /code > bison -dv -b chuck chuck.y > flex -ochuck.yy.c chuck.lex > make: emcc: Command not found > make: emcc: Command not found > make: *** [util_math.o] Error 127 > make: *** Waiting for unfinished jobs.... > make: *** [util_network.o] Error 127 > emcc -I. -Ilo -g -c util_math.c -o util_math.o > emcc -I. -Ilo -g -c util_network.c -o util_network.o > 2015/01/05 16:42:42 The command [/bin/sh -c pushd /emsdk_portable && > source ./emsdk_env.sh && popd && pushd src &&make clean && make -j5 > CHUCK_DEBUG=1 CHUCK_EM_SOURCEMAP=1CHUCK_EM_SAFEHEAP=3 emscripten && popd && > pushd js && npm install && grunt] returned a non-zero code: 2 > $ > $ > $ emcc > WARNING root: no input files > > It can't find emcc. I assume it looks inside the docker container and not > in my system, but just in case I misunderstood something, I verified that > emcc is on the path on my system. > > - Alon > > > On Mon, Jan 5, 2015 at 3:12 PM, Arve Knudsen <arve.knud...@gmail.com> > wrote: > >> Try following the instructions at >> https://docs.docker.com/installation/ubuntulinux/, you might have >> installed an older conflicting package named docker. >> On Jan 5, 2015 10:36 PM, "Alon Zakai" <alonza...@gmail.com> wrote: >> >>> I tried now, but something is wrong on my system, >>> >>> $ sudo apt-get install docker >>> Reading package lists... Done >>> Building dependency tree >>> Reading state information... Done >>> The following NEW packages will be installed: >>> docker >>> 0 upgraded, 1 newly installed, 0 to remove and 6 not upgraded. >>> Need to get 12.2 kB of archives. >>> After this operation, 65.5 kB of additional disk space will be used. >>> Get:1 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/universe >>> docker amd64 1.5-1 [12.2 kB] >>> Fetched 12.2 kB in 0s (39.6 kB/s) >>> Selecting previously unselected package docker. >>> (Reading database ... 420485 files and directories currently installed.) >>> Preparing to unpack .../docker_1.5-1_amd64.deb ... >>> Unpacking docker (1.5-1) ... >>> Processing triggers for man-db (2.6.7.1-1ubuntu1) ... >>> Setting up docker (1.5-1) ... >>> >>> yet >>> >>> $ docker >>> The program 'docker' is currently not installed. You can install it by >>> typing: >>> sudo apt-get install docker >>> >>> Is docker used in some special way that I am not doing? >>> >>> - Alon >>> >>> >>> On Mon, Dec 29, 2014 at 12:05 PM, Arve Knudsen <arve.knud...@gmail.com> >>> wrote: >>> >>>> Alon: Have you tried my Docker setup yet? >>>> >>>> Thanks, >>>> Arve >>>> >>>> On Sun, Dec 21, 2014 at 2:58 AM, Arve Knudsen <arve.knud...@gmail.com> >>>> wrote: >>>> >>>>> Alon, if you check out https://github.com/aknuds1/chuck and run the >>>>> following: 'docker build -t chuckdemos . && docker run -p 8000:8000 >>>>> chuckdemos', you should be able to open a ChucK demo at >>>>> http://localhost:8000/js/examples/basic/whole.html. After loading >>>>> said demo, click 'Play' on the page. You should see in the JavaScript >>>>> console that there's been a memory access error. If this doesn't work for >>>>> you, please let me know. >>>>> >>>>> Thanks, >>>>> Arve >>>>> >>>>> On Thu, Dec 18, 2014 at 10:33 PM, Alon Zakai <alonza...@gmail.com> >>>>> wrote: >>>>> >>>>>> -g4 is needed for source maps, but this can probably be debugged >>>>>> without them. >>>>>> >>>>>> - Alon >>>>>> >>>>>> >>>>>> On Mon, Dec 15, 2014 at 10:59 PM, Arve Knudsen < >>>>>> arve.knud...@gmail.com> wrote: >>>>>>> >>>>>>> Yeah, you can install it easily via apt-get. I followed the >>>>>>> instructions to install the very latest version, as the Ubuntu included >>>>>>> version was a bit old: >>>>>>> https://docs.docker.com/installation/ubuntulinux/. Fig is another >>>>>>> tool, which you should be able to install via the Python package manager >>>>>>> pip (http://www.fig.sh/install.html). I think I have a working Fig >>>>>>> setup now, but haven't figured out how to reach it from the browser yet. >>>>>>> >>>>>>> I did run into a potential problem, which was that I wasn't able to >>>>>>> build ChucK on Linux with -g4, only -g, since clang didn't accept the >>>>>>> -g4 >>>>>>> flag. Is -g4 necessary to produce source maps? >>>>>>> >>>>>>> Arve >>>>>>> >>>>>>> On Tue, Dec 16, 2014 at 1:30 AM, Alon Zakai <alonza...@gmail.com> >>>>>>> wrote: >>>>>>>> >>>>>>>> I actually don't know anything about docker. Is it trivial to set >>>>>>>> up (apt-get)? >>>>>>>> >>>>>>>> - Alon >>>>>>>> >>>>>>>> >>>>>>>> On Sun, Dec 14, 2014 at 3:08 AM, Arve Knudsen < >>>>>>>> arve.knud...@gmail.com> wrote: >>>>>>>>> >>>>>>>>> Nevermind about the internal compiler error, I was compiling on a >>>>>>>>> machine with too little memory, sorry about that. Am working on the >>>>>>>>> Docker/fig config now. >>>>>>>>> >>>>>>>>> Arve >>>>>>>>> >>>>>>>>> On Sat, Dec 13, 2014 at 10:54 PM, Arve Knudsen < >>>>>>>>> arve.knud...@gmail.com> wrote: >>>>>>>>>> >>>>>>>>>> I have a Docker/Fig config for you, but alas it won't build due >>>>>>>>>> to an internal compiler exception when installing Emscripten itself. >>>>>>>>>> See >>>>>>>>>> issue https://github.com/kripken/emscripten/issues/3078. >>>>>>>>>> >>>>>>>>>> Arve >>>>>>>>>> >>>>>>>>>> On Sat, Dec 13, 2014 at 8:49 PM, Arve Knudsen < >>>>>>>>>> arve.knud...@gmail.com> wrote: >>>>>>>>>>> >>>>>>>>>>> Alon, would you be OK with using Docker to test? >>>>>>>>>>> >>>>>>>>>>> Arve >>>>>>>>>>> >>>>>>>>>>> On Sat, Dec 13, 2014 at 1:52 AM, Alon Zakai <alonza...@gmail.com >>>>>>>>>>> > wrote: >>>>>>>>>>> >>>>>>>>>>>> Any chance you can make it possible to run just the emscripten >>>>>>>>>>>> part of the build process? E.g. running 'make' immediately fails >>>>>>>>>>>> on not >>>>>>>>>>>> having 'bison' installed. Also I'd rather not install grunt and >>>>>>>>>>>> other >>>>>>>>>>>> things globally. >>>>>>>>>>>> >>>>>>>>>>>> - Alon >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> On Fri, Dec 12, 2014 at 4:06 PM, Arve Knudsen < >>>>>>>>>>>> arve.knud...@gmail.com> wrote: >>>>>>>>>>>> >>>>>>>>>>>>> I forgot to mention that before running grunt, you must've >>>>>>>>>>>>> installed it globally (npm install -g grunt-cli) and then run >>>>>>>>>>>>> 'npm install' >>>>>>>>>>>>> within the 'js' directory. >>>>>>>>>>>>> >>>>>>>>>>>>> Arve >>>>>>>>>>>>> >>>>>>>>>>>>> On Sat, Dec 13, 2014 at 12:56 AM, Arve Knudsen < >>>>>>>>>>>>> arve.knud...@gmail.com> wrote: >>>>>>>>>>>>> >>>>>>>>>>>>>> Hi >>>>>>>>>>>>>> >>>>>>>>>>>>>> I've built ChucK with -g4 (thus producing a sourcemap) and -s >>>>>>>>>>>>>> SAFE_HEAP=3, and unsafe memory access is detected while >>>>>>>>>>>>>> executing ChucK. >>>>>>>>>>>>>> However, I am unable to debug the segfault and could use your >>>>>>>>>>>>>> help. I tell >>>>>>>>>>>>>> Chrome to halt on exceptions, and when exception halts on the >>>>>>>>>>>>>> segfault, a >>>>>>>>>>>>>> stack trace is produced that looks as follows: >>>>>>>>>>>>>> >>>>>>>>>>>>>> invoke_iiiii (chuck.js:9199) >>>>>>>>>>>>>> _executeCode (__tree:274) >>>>>>>>>>>>>> asm._executeCode (chuck_emit.cpp:915) >>>>>>>>>>>>>> ccallFunc (chuck.js:534) >>>>>>>>>>>>>> (anonymous function) (whole.html:1) >>>>>>>>>>>>>> jQuery.event.dispatch (jquery-1.10.2.js:5095) >>>>>>>>>>>>>> jQuery.event.add.elemData.handle (jquery-1.10.2.js:4766) >>>>>>>>>>>>>> >>>>>>>>>>>>>> However, this stacktrace is of little use since it really >>>>>>>>>>>>>> doesn't make much sense. When I click on the asm._executeCode >>>>>>>>>>>>>> frame, the >>>>>>>>>>>>>> debugger enters the C++ function emit_engine_emit_do_while (line >>>>>>>>>>>>>> 915 of >>>>>>>>>>>>>> chuck.emit.cpp). Said line looks like this: >>>>>>>>>>>>>> >>>>>>>>>>>>>> while( emit->code->stack_cont.size() && >>>>>>>>>>>>>> emit->code->stack_cont.back() ) >>>>>>>>>>>>>> >>>>>>>>>>>>>> First of all, there's no correspondence betwen this function >>>>>>>>>>>>>> and the name of the stack frame ('asm._executeCode'). Second, >>>>>>>>>>>>>> when I click >>>>>>>>>>>>>> on the next frame, it resolves to the function >>>>>>>>>>>>>> __tree_balance_after_insert >>>>>>>>>>>>>> (of file '__tree'). This doesn't make much sense does it?? >>>>>>>>>>>>>> >>>>>>>>>>>>>> When I let execution continue after the exception, a >>>>>>>>>>>>>> completely different looking traceback is printed to the console: >>>>>>>>>>>>>> >>>>>>>>>>>>>> Uncaught abort() at Error >>>>>>>>>>>>>> at jsStackTrace ( >>>>>>>>>>>>>> http://localhost:8000/examples/basic/chuck.js:1049:13) >>>>>>>>>>>>>> at stackTrace ( >>>>>>>>>>>>>> http://localhost:8000/examples/basic/chuck.js:1066:22) >>>>>>>>>>>>>> at abort ( >>>>>>>>>>>>>> http://localhost:8000/examples/basic/chuck.js:561343:25) >>>>>>>>>>>>>> at SAFE_HEAP_LOAD ( >>>>>>>>>>>>>> http://localhost:8000/examples/basic/chuck.js:429:87) >>>>>>>>>>>>>> at _strlen ( >>>>>>>>>>>>>> http://localhost:8000/examples/basic/chuck.js:552513:43) >>>>>>>>>>>>>> at Array.__ZNSt3__111char_traitsIcE6lengthEPKc >>>>>>>>>>>>>> [std::__1::char_traits<char>::length(char const*)] ( >>>>>>>>>>>>>> http://localhost:8000/examples/basic/chuck.js:541966:7) >>>>>>>>>>>>>> at Object.dynCall_ii ( >>>>>>>>>>>>>> http://localhost:8000/examples/basic/chuck.js:553175:74) >>>>>>>>>>>>>> at invoke_ii ( >>>>>>>>>>>>>> http://localhost:8000/examples/basic/chuck.js:8873:32) >>>>>>>>>>>>>> at >>>>>>>>>>>>>> Array.__ZN12_GLOBAL__N_19sporkCodeEP14Chuck_CompilerP8Chuck_VMPKcS5_ >>>>>>>>>>>>>> [(anonymous namespace)::sporkCode(Chuck_Compiler*, Chuck_VM*, >>>>>>>>>>>>>> char const*, >>>>>>>>>>>>>> char const*)] ( >>>>>>>>>>>>>> http://localhost:8000/examples/basic/chuck.js:256286:8) >>>>>>>>>>>>>> at Object.dynCall_iiiii ( >>>>>>>>>>>>>> http://localhost:8000/examples/basic/chuck.js:551097:77) >>>>>>>>>>>>>> >>>>>>>>>>>>>> How can I debug this exception?? Please help. >>>>>>>>>>>>>> >>>>>>>>>>>>>> If you like, you can reproduce by: >>>>>>>>>>>>>> 1. Check out https://github.com/aknuds1/chuck.git >>>>>>>>>>>>>> 2. cd chuck >>>>>>>>>>>>>> 3. pushd src && make -j8 CHUCK_DEBUG_LEVEL=4 >>>>>>>>>>>>>> CHUCK_EM_SAFEHEAP=3 emscripten && popd && pushd js && grunt >>>>>>>>>>>>>> 4. python -m SimpleHTTPServer >>>>>>>>>>>>>> 5. Open http://localhost:8000/examples/basic/whole.html in >>>>>>>>>>>>>> Chrome (evt. some other browser) >>>>>>>>>>>>>> 6. Open the Developer Tools >>>>>>>>>>>>>> 7. Enable 'Pause on exceptions' >>>>>>>>>>>>>> 8. Click the 'Play' button >>>>>>>>>>>>>> >>>>>>>>>>>>>> Thanks, >>>>>>>>>>>>>> Arve >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>> -- >>>>>>>>>>>>> You received this message because you are subscribed to the >>>>>>>>>>>>> Google Groups "emscripten-discuss" group. >>>>>>>>>>>>> To unsubscribe from this group and stop receiving emails from >>>>>>>>>>>>> it, send an email to >>>>>>>>>>>>> emscripten-discuss+unsubscr...@googlegroups.com. >>>>>>>>>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>>>>>>>>> >>>>>>>>>>>> -- >>>>>>>>>>>> You received this message because you are subscribed to the >>>>>>>>>>>> Google Groups "emscripten-discuss" group. >>>>>>>>>>>> To unsubscribe from this group and stop receiving emails from >>>>>>>>>>>> it, send an email to >>>>>>>>>>>> emscripten-discuss+unsubscr...@googlegroups.com. >>>>>>>>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>>>>>>>> >>>>>>>>>>> -- >>>>>>>>> You received this message because you are subscribed to the Google >>>>>>>>> Groups "emscripten-discuss" group. >>>>>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>>>>> send an email to emscripten-discuss+unsubscr...@googlegroups.com. >>>>>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>>>>> >>>>>>>> -- >>>>>>>> You received this message because you are subscribed to the Google >>>>>>>> Groups "emscripten-discuss" group. >>>>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>>>> send an email to emscripten-discuss+unsubscr...@googlegroups.com. >>>>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>>>> >>>>>>> -- >>>>>>> You received this message because you are subscribed to the Google >>>>>>> Groups "emscripten-discuss" group. >>>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>>> send an email to emscripten-discuss+unsubscr...@googlegroups.com. >>>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>>> >>>>>> -- >>>>>> You received this message because you are subscribed to the Google >>>>>> Groups "emscripten-discuss" group. >>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>> send an email to emscripten-discuss+unsubscr...@googlegroups.com. >>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>> >>>>> >>>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "emscripten-discuss" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to emscripten-discuss+unsubscr...@googlegroups.com. >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "emscripten-discuss" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to emscripten-discuss+unsubscr...@googlegroups.com. >>> For more options, visit https://groups.google.com/d/optout. >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "emscripten-discuss" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to emscripten-discuss+unsubscr...@googlegroups.com. >> For more options, visit https://groups.google.com/d/optout. >> > > -- > You received this message because you are subscribed to the Google Groups > "emscripten-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to emscripten-discuss+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-discuss+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.