1 Reply Latest reply on Oct 4, 2015 11:47 PM by dipak

    Why I always get unreadable error-message when I build kernel

    lennox

      Hi guys,

      I often get unreadable build error of kernel

      For example, when I write the code at Lines 41 ~43

       

              if (weight==dummy_buf){
                neigh_w=1.0;
              }
      

       

      and then I dump the error message

       

      Error: Failed to build program executable!
      /tmp/OCL3389T5.cl:58:1: error: expected identifier or '('
      <C8>+<U+072E><U+007F>
      ^
      
      
      error: Clang front-end compilation failed!
      Frontend phase failed compilation.
      Error: Compiling CL to IR
      

       

      The information is useless for me because

      1. the intermediate code seems be removed once the building is finished

      2. I cannot find any relation between the message the the segment of code

       

      In other case, I even found white-spaces will cause error,

      for example

      if(weight==dummy_buf){
              }(space)
      

      the error message

      
      Error: Failed to build program executable!
      /tmp/OCL3440T5.cl:43:1: error: unknown type name 'Q'
      Q
      ^
      /tmp/OCL3440T5.cl:43:2: error: expected identifier or '('
      Q
       ^
      
      
      error: Clang front-end compilation failed!
      Frontend phase failed compilation.
      Error: Compiling CL to IR
      

      Again, Icannot find any relation between the source code and the error message.

      If I remove the space, the build will be successful.

       

      How can I get useful error information? Actually, these code can be compiled with GCC.