On Sun, Nov 19, 2017 at 10:43:21PM +0100, Willy Tarreau wrote: > Your workaround has disabled locking so you'll get random bugs if you enable > threads. Could you please send the output of "cc -v" ? That should help > figure how this situation is possible. In the mean time you can build with > "USE_THREAD=" to disable threads.
OK I found what happens. For an unknown reason you have no optimization settings, and apparently by default Clang doesn't even perform constant optimizations (ie: when you write "if (0) do_something()" it still wants to emit the code for "do_something()". So the check on the argument size still works but the compiler is unhappy with the error message used to stop the build. Does your build command line force the CPU variable or the CPU_CFLAGS variable ? I suspect it's this. By not forcing it, you'll stay on "generic" and it will use "-O2" by default, avoiding this problem. We still need to improve this (possibly by detecting clang and lack of optimization if needed), otherwise the questionn will come back from time to time. Thanks, Willy

