On 05/06/2015 10:28 PM, Andrew Stitcher wrote:
On Wed, 2015-05-06 at 22:22 +0100, Gordon Sim wrote:
[ 70%] Building C object 
proton-c/bindings/javascript/CMakeFiles/qpid-proton-bitcode.dir/__/__/src/sasl/sasl.c.o
/home/gordon/projects/proton-git/proton-c/src/sasl/sasl.c:224:9: error: 
implicit declaration of function 'strncasecmp' is invalid in C99 
[-Werror,-Wimplicit-function-declaration]
     if (strncasecmp(c, s.start, len)==0 && (c[len]==' ' || c[len]==0) ) return 
true;
         ^
/home/gordon/projects/proton-git/proton-c/src/sasl/sasl.c:363:44: error: 
implicit declaration of function 'strdup' is invalid in C99 
[-Werror,-Wimplicit-function-declaration]
     sasl->config_dir =  sasl_config_path ? strdup(sasl_config_path) : NULL;
                                            ^
/home/gordon/projects/proton-git/proton-c/src/sasl/sasl.c:363:42: error: 
pointer/integer type mismatch in conditional expression ('int' and 'void *') 
[-Werror,-Wconditional-type-mismatch]
     sasl->config_dir =  sasl_config_path ? strdup(sasl_config_path) : NULL;
                                          ^ ~~~~~~~~~~~~~~~~~~~~~~~~   ~~~~
/home/gordon/projects/proton-git/proton-c/src/sasl/sasl.c:414:29: error: 
pointer/integer type mismatch in conditional expression ('int' and 'void *') 
[-Werror,-Wconditional-type-mismatch]
   sasl->password = password ? strdup(password) : NULL;
                             ^ ~~~~~~~~~~~~~~~~   ~~~~
/home/gordon/projects/proton-git/proton-c/src/sasl/sasl.c:433:39: error: 
pointer/integer type mismatch in conditional expression ('int' and 'void *') 
[-Werror,-Wconditional-type-mismatch]
     sasl->included_mechanisms = mechs ? strdup(mechs) : NULL;
                                       ^ ~~~~~~~~~~~~~   ~~~~
/home/gordon/projects/proton-git/proton-c/src/sasl/sasl.c:450:22: error: 
incompatible integer to pointer conversion assigning to 'char *' from 'int' 
[-Werror,-Wint-conversion]
     sasl->config_dir = strdup(dir);
                      ^ ~~~~~~~~~~~
6 errors generated.
ERROR    root: compiler frontend failed to generate LLVM bitcode, halting
make[2]: *** 
[proton-c/bindings/javascript/CMakeFiles/qpid-proton-bitcode.dir/__/__/src/sasl/sasl.c.o]
 Error 1
make[1]: *** 
[proton-c/bindings/javascript/CMakeFiles/qpid-proton-bitcode.dir/all] Error 2


I'm 99% certain I did a clean build a few hours ago, so I suspect its
one of your latest commits Andrew(?) though I haven't actually verified

Looks like sasl.c is not getting string.h anymore. I guess this is
because the gcc compiler gets it through some other header file and
clang is cleaner and doesn't.

Try adding #include <string.h> at the top and see if it goes away.

No, same errors occur with that change (line numbers incremented by one).

Reply via email to