Looks like an internal compiler error. Can you please build with --save-bc
and give a link to the bitcode that it saves?

- Alon



On Fri, Jan 3, 2014 at 3:18 AM, wolfviking0 <[email protected]> wrote:

> Sorry, I just see the terminal copy / paste was horrible, I add a better
> version of the terminal result.
>
> *Mac-mini-de-Anthony:webcl-book-samples al$ make image_filter_sample DEB=1*
> *************  Mode VALIDATOR : Disabled *************
> *************  Mode DEBUG : Enabled *************
>
>
> */Applications/Xcode.app/Contents/Developer/usr/bin/make: cd
> src/Chapter_8/ImageFilter2D*
> *JAVA_HEAP_SIZE=8096m EMCC_DEBUG=1
> ../../../../webcl-translator/emscripten/emcc \*
> *ImageFilter2D.cpp \*
> *../../../externs/lib/libfreeimage-3.15.4.so
> <http://libfreeimage-3.15.4.so> \*
> *-I../../../externs/include/ \*
> *-O0 -s CL_VALIDATOR=0 -s CL_VAL_PARAM='[]'  -s CL_PRINT_TRACE=1 -s
> DISABLE_EXCEPTION_CATCHING=0 -s WARN_ON_UNDEFINED_SYMBOLS=1 -s CL_PROFILE=1
> -s CL_DEBUG=1 -s CL_GRAB_TRACE=1 -s CL_CHECK_VALID_OBJECT=1 \*
> *--preload-file ImageFilter2D.cl \*
> *-o ../../../build/book_image_filter.js*
> *DEBUG    root: invocation: ../../../../webcl-translator/emscripten/emcc
> ImageFilter2D.cpp ../../../externs/lib/libfreeimage-3.15.4.so
> <http://libfreeimage-3.15.4.so> -I../../../externs/include/ -O0 -s
> CL_VALIDATOR=0 -s CL_VAL_PARAM=[] -s CL_PRINT_TRACE=1 -s
> DISABLE_EXCEPTION_CATCHING=0 -s WARN_ON_UNDEFINED_SYMBOLS=1 -s CL_PROFILE=1
> -s CL_DEBUG=1 -s CL_GRAB_TRACE=1 -s CL_CHECK_VALID_OBJECT=1 --preload-file
> ImageFilter2D.cl -o ../../../build/book_image_filter.js*
> *INFO     root: (Emscripten: Running sanity checks)*
> *DEBUG    root: compiling to bitcode*
> *DEBUG    root: compiling source file: ImageFilter2D.cpp*
> *DEBUG    root: running:
> /Volumes/APPLE_MEDIA/WORKSPACE/compilo/llvm/bin/clang++ -DEMSCRIPTEN
> -D__EMSCRIPTEN__ -fno-math-errno -target le32-unknown-nacl
> -U__native_client__ -U__pnacl__ -U__ELF__ -nostdinc -Xclang -nobuiltininc
> -Xclang -nostdsysteminc -Xclang
> -isystem/Volumes/APPLE_MEDIA/WORKSPACE/webcl/webcl-translator/emscripten/system/local/include
> -Xclang
> -isystem/Volumes/APPLE_MEDIA/WORKSPACE/webcl/webcl-translator/emscripten/system/include/compat
> -Xclang
> -isystem/Volumes/APPLE_MEDIA/WORKSPACE/webcl/webcl-translator/emscripten/system/include/libcxx
> -Xclang
> -isystem/Volumes/APPLE_MEDIA/WORKSPACE/webcl/webcl-translator/emscripten/system/include
> -Xclang
> -isystem/Volumes/APPLE_MEDIA/WORKSPACE/webcl/webcl-translator/emscripten/system/include/emscripten
> -Xclang
> -isystem/Volumes/APPLE_MEDIA/WORKSPACE/webcl/webcl-translator/emscripten/system/include/bsd
> -Xclang
> -isystem/Volumes/APPLE_MEDIA/WORKSPACE/webcl/webcl-translator/emscripten/system/include/libc
> -Xclang
> -isystem/Volumes/APPLE_MEDIA/WORKSPACE/webcl/webcl-translator/emscripten/system/include/gfx
> -Xclang
> -isystem/Volumes/APPLE_MEDIA/WORKSPACE/webcl/webcl-translator/emscripten/system/include/net
> -Xclang
> -isystem/Volumes/APPLE_MEDIA/WORKSPACE/webcl/webcl-translator/emscripten/system/include/SDL
> -U__i386__ -U__i386 -Ui386 -U__STRICT_ANSI__ -D__IEEE_LITTLE_ENDIAN
> -U__SSE__ -U__SSE_MATH__ -U__SSE2__ -U__SSE2_MATH__ -U__MMX__ -U__APPLE__
> -U__linux__ -I../../../externs/include/ -std=c++03 -emit-llvm -c
> ImageFilter2D.cpp -o /tmp/tmpJVgP5o/ImageFilter2D_0.o*
> *ImageFilter2D.cpp:233:15: warning: 'clCreateImage2D' is deprecated
> [-Wdeprecated-declarations]*
> *    clImage = clCreateImage2D(context,*
> *              ^*
> */Volumes/APPLE_MEDIA/WORKSPACE/webcl/webcl-translator/emscripten/system/include/CL/cl.h:1201:1:
> note: 'clCreateImage2D' declared*
> *      here*
> *clCreateImage2D(cl_context              /* context */,*
> *^*
> *ImageFilter2D.cpp:340:23: warning: 'clCreateImage2D' is deprecated
> [-Wdeprecated-declarations]*
> *    imageObjects[1] = clCreateImage2D(context,*
> *                      ^*
> */Volumes/APPLE_MEDIA/WORKSPACE/webcl/webcl-translator/emscripten/system/include/CL/cl.h:1201:1:
> note: 'clCreateImage2D' declared*
> *      here*
> *clCreateImage2D(cl_context              /* context */,*
> *^*
> *2 warnings generated.*
> *DEBUG    root: copying library file:
> ../../../externs/lib/libfreeimage-3.15.4.so <http://libfreeimage-3.15.4.so>*
> *DEBUG    root: will generate JavaScript*
> *DEBUG    root: including libcxx*
> *DEBUG    root: including libcextra*
> *DEBUG    root: including libcxxabi*
> *DEBUG    root: including libc*
> *DEBUG    root: linking: ['/tmp/tmpJVgP5o/ImageFilter2D_0.o',
> '/tmp/tmpJVgP5o/libfreeimage-3.15.4_1.so
> <http://libfreeimage-3.15.4_1.so>',
> '/Users/al/.emscripten_cache/libcxx.bc',
> '/Users/al/.emscripten_cache/libcextra.bc',
> '/Users/al/.emscripten_cache/libcxxabi.bc',
> '/Users/al/.emscripten_cache/libc.bc']*
> *DEBUG    root: emcc: llvm-linking: ['/tmp/tmpJVgP5o/ImageFilter2D_0.o',
> '/tmp/tmpJVgP5o/libfreeimage-3.15.4_1.so
> <http://libfreeimage-3.15.4_1.so>',
> '/Users/al/.emscripten_cache/libcxx.bc',
> '/Users/al/.emscripten_cache/libcextra.bc',
> '/Users/al/.emscripten_cache/libcxxabi.bc',
> '/Users/al/.emscripten_cache/libc.bc'] to
> /tmp/tmpJVgP5o/book_image_filter.bc*
> *DEBUG    root:     linking took 2.11 seconds*
> *DEBUG    root: saving intermediate processing steps to
> /tmp/emscripten_temp*
> *DEBUG    root: emcc: LLVM opts: ['-internalize',
> '-internalize-public-api-list=main,malloc,free', '-globaldce', '-S']*
> *DEBUG    root:     step took 1.72 seconds*
> *DEBUG    root: LLVM => JS*
> *DEBUG    root: emscript: ll=>js*
> *DEBUG    root:   emscript: scan took 0.0778360366821 seconds*
> *DEBUG    root:   emscript: split took 0.122679948807 seconds*
> *DEBUG    root:   emscript: phase 1 took 5.65821695328 seconds*
> *DEBUG    root:   emscript: phase 2 working on 7 chunks using 8 cores
> (intended chunk size: 4.38 MB, meta: 0.00 MB, forwarded: 1.76 MB, total:
> 35.01 MB)*
> *DEBUG    root: .*
> *aborting from js compiler due to exception: TypeError: Cannot read
> property 'intertype' of undefined | TypeError: Cannot read property
> 'intertype' of undefined*
> *    at eval (eval at globalEval
> (/Volumes/APPLE_MEDIA/WORKSPACE/webcl/webcl-translator/emscripten/src/compiler.js:105:8),
> <anonymous>:1626:32)*
> *    at Array.forEach (native)*
> *    at eval (eval at globalEval
> (/Volumes/APPLE_MEDIA/WORKSPACE/webcl/webcl-translator/emscripten/src/compiler.js:105:8),
> <anonymous>:1617:21)*
> *    at Array.forEach (native)*
> *    at eval (eval at globalEval
> (/Volumes/APPLE_MEDIA/WORKSPACE/webcl/webcl-translator/emscripten/src/compiler.js:105:8),
> <anonymous>:1616:19)*
> *    at Array.forEach (native)*
> *    at labelAnalyzer (eval at globalEval
> (/Volumes/APPLE_MEDIA/WORKSPACE/webcl/webcl-translator/emscripten/src/compiler.js:105:8),
> <anonymous>:1512:20)*
> *    at analyzer (eval at globalEval
> (/Volumes/APPLE_MEDIA/WORKSPACE/webcl/webcl-translator/emscripten/src/compiler.js:105:8),
> <anonymous>:1761:3)*
> *    at JSify (eval at globalEval
> (/Volumes/APPLE_MEDIA/WORKSPACE/webcl/webcl-translator/emscripten/src/compiler.js:105:8),
> <anonymous>:126:13)*
> *    at runPhase
> (/Volumes/APPLE_MEDIA/WORKSPACE/webcl/webcl-translator/emscripten/src/compiler.js:284:5)*
> *DEBUG    root: .*
> *DEBUG    root: .*
> *DEBUG    root: .*
> *DEBUG    root: .*
> *DEBUG    root: .*
> *DEBUG    root: .*
> *Traceback (most recent call last):*
> *  File
> "/Volumes/APPLE_MEDIA/WORKSPACE/webcl/webcl-translator/emscripten/emscripten.py",
> line 1336, in <module>*
> *    _main(environ=os.environ)*
> *  File
> "/Volumes/APPLE_MEDIA/WORKSPACE/webcl/webcl-translator/emscripten/emscripten.py",
> line 1324, in _main*
> *    temp_files.run_and_clean(lambda: main(*
> *  File
> "/Volumes/APPLE_MEDIA/WORKSPACE/webcl/webcl-translator/emscripten/tools/tempfiles.py",
> line 39, in run_and_clean*
> *    return func()*
> *  File
> "/Volumes/APPLE_MEDIA/WORKSPACE/webcl/webcl-translator/emscripten/emscripten.py",
> line 1332, in <lambda>*
> *    DEBUG_CACHE=DEBUG_CACHE,*
> *  File
> "/Volumes/APPLE_MEDIA/WORKSPACE/webcl/webcl-translator/emscripten/emscripten.py",
> line 1219, in main*
> *    jcache=jcache, temp_files=temp_files, DEBUG=DEBUG,
> DEBUG_CACHE=DEBUG_CACHE)*
> *  File
> "/Volumes/APPLE_MEDIA/WORKSPACE/webcl/webcl-translator/emscripten/emscripten.py",
> line 292, in emscript*
> *    assert len(output) == 2, 'Did not receive forwarded data in an output
> - process failed? We only got: ' + output[0][-3000:]*
> *AssertionError: Did not receive forwarded data in an output - process
> failed? We only got: *
> * var $18=HEAP32[(($17)>>2)];*
> * var $19=(($18+20)|0);*
> * HEAP32[(($19)>>2)]=38;*
> * var $20=(($18)|0);*
> * var $21=HEAP32[(($20)>>2)];*
> * FUNCTION_TABLE[$21]($16);*
> * label=3;break;*
> * case 3: *
> * var $23=HEAP32[(($8)>>2)];*
> * var $24=$23;*
> * var $25=(($2)|0);*
> * HEAP32[(($25)>>2)]=$24;*
> * var $26=(($2+4)|0);*
> * HEAP32[(($26)>>2)]=4096;*
> * return 1;*
> *  default: assert(0, "bad label: " + label);*
> * }*
>
> *}*
>
>
> *function __ZL16term_destinationP20jpeg_compress_struct($cinfo){*
> * var label=0;*
>
> * label = 1; *
> * while(1)switch(label){*
> * case 1: *
> * var $1=(($cinfo+24)|0);*
> * var $2=HEAP32[(($1)>>2)];*
> * var $3=(($2+4)|0);*
> * var $4=HEAP32[(($3)>>2)];*
> * var $5=(((4096)-($4))|0);*
> * var $6=($4|0)==4096;*
> * if($6){label=4;break;}else{label=2;break;}*
> * case 2: *
> * var $8=(($2+24)|0);*
> * var $9=$8;*
> * var $10=HEAP32[(($9)>>2)];*
> * var $11=(($10+4)|0);*
> * var
> $12=((((HEAPU8[($11)])|(HEAPU8[((($11)+(1))|0)]<<8)|(HEAPU8[((($11)+(2))|0)]<<16)|(HEAPU8[((($11)+(3))|0)]<<24))|0));*
> * var $13=(($2+28)|0);*
> * var $14=HEAP32[(($13)>>2)];*
> * var $15=$14;*
> * var $16=(($2+20)|0);*
> * var $17=HEAP32[(($16)>>2)];*
> * var $18=FUNCTION_TABLE[$12]($15,1,$5,$17);*
> * var $19=($18|0)==($5|0);*
> * if($19){label=4;break;}else{label=3;break;}*
> * case 3: *
> * var $21=$cinfo;*
> * _jpeg_destroy($21);*
> * var $22=(($cinfo)|0);*
> * var $23=HEAP32[(($22)>>2)];*
> * var $24=(($23+20)|0);*
> * HEAP32[(($24)>>2)]=38;*
> * var $25=(($23)|0);*
> * var $26=HEAP32[(($25)>>2)];*
> * FUNCTION_TABLE[$26]($21);*
> * label=4;break;*
> * case 4: *
> * return;*
> *  default: assert(0, "bad label: " + label);*
> * }*
>
> *}*
>
>
> *function __Z8InitJPEGP6Plugini($plugin,$format_id){*
> * var label=0;*
>
>
> * HEAP32[((1111200)>>2)]=$format_id;*
> * var $1=(($plugin)|0);*
> * HEAP32[(($1)>>2)]='{{ FI___ZL6Formatv866 }}';*
> * var $2=(($plugin+4)|0);*
> * HEAP32[(($2)>>2)]='{{ FI___ZL11Descriptionv867 }}';*
> * var $3=(($plugin+8)|0);*
> * HEAP32[(($3)>>2)]='{{ FI___ZL9Extensionv868 }}';*
> * var $4=(($plugin+12)|0);*
> * HEAP32[(($4)>>2)]='{{ FI___ZL7RegExprv869 }}';*
> * var $5=(($plugin+16)|0);*
> * var $6=(($plugin+32)|0);*
> * var $7=$5;*
> * HEAP32[(($7)>>2)]=0; HEAP32[((($7)+(4))>>2)]=0;
> HEAP32[((($7)+(8))>>2)]=0; HEAP32[((($7)+(12))>>2)]=0;*
> * HEAP32[(($6)>>2)]='{{ FI___ZL4LoadP11FreeImageIOPviiS1_870 }}';*
> * var $8=(($plugin+36)|0);*
> * HEAP32[(($8)>>2)]='{{ FI___ZL4SaveP11FreeImageIOP8FIBITMAPPviiS3_871
> }}';*
> * var $9=(($plugin+40)|0);*
> * HEAP32[(($9)>>2)]='{{ FI___ZL8ValidateP11FreeImageIOPv872 }}';*
> * var $10=(($plugin+44)|0);*
> * HEAP32[(($10)>>2)]='{{ FI___ZL8MimeTypev873 }}';*
> * var $11=(($plugin+48)|0);*
> * HEAP32[(($11)>>2)]='{{ FI___ZL19SupportsExportDepthi874 }}';*
> * var $12=(($plugin+52)|0);*
> * HEAP32[(($12)>>2)]='{{ FI___ZL18SupportsExportType15FREE_IMAGE_TYPE875
> }}';*
> * var $13=(($plugin+56)|0);*
> * HEAP32[(($13)>>2)]='{{ FI___ZL19SupportsICCProfilesv876 }}';*
> * var $14=(($plugin+60)|0);*
> * HEAP32[(($14)>>2)]='{{ FI___ZL16SupportsNoPixelsv877 }}';*
> * return;*
> *}*
>
>
> *function __ZL6Formatv866(){*
> * var label=0;*
>
>
> * return 109968;*
> *}*
>
>
> *function __ZL11Descriptionv867(){*
> * var label=0;*
>
>
> * return 111720;*
> *}*
>
>
> *function __ZL9Extensionv868(){*
> * var label=0;*
>
>
> * return 114176;*
> *}*
>
>
> *function __ZL7RegExprv869(){*
> * var label=0;*
>
>
> * return 115912;*
> *}*
>
>
> *Traceback (most recent call last):*
> *  File "../../../../webcl-translator/emscripten/emcc", line 1697, in
> <module>*
> *    final = shared.Building.emscripten(final, append_ext=False,
> extra_args=extra_args)*
> *  File
> "/Volumes/APPLE_MEDIA/WORKSPACE/webcl/webcl-translator/emscripten/tools/shared.py",
> line 1233, in emscripten*
> *    assert os.path.exists(filename + '.o.js') and len(open(filename +
> '.o.js', 'r').read()) > 0, 'Emscripten failed to generate .js: ' +
> str(compiler_output)*
> *AssertionError: Emscripten failed to generate .js: *
> *make: *** [image_filter_sample] Error 1*
>
> --
> 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 [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to