Dear list,
Have anybody compile a project using GNU configure with clang as compiler and with the dataflow sanitizer option enabled? I tried compiling several open source projects (e.g., Apache Httpd, Apache APR, Nginx) with dfsan and all fail on the configure step when performing the usual checks for system types, functions, etc.
Interestingly, compiling with other sanitizers such as “memory” or “address” work fine. These are the variables I set for compilation:
CC=<path-to-my-clang installation, compiled with cmake>
CFLAGS=“-fsanitize=dataflow”
Notes: when using dfsan, I have to specify -S for the configure script to pass the C compiler check, otherwise the compiler check fails. With -S flag specified, the GNU configure script fails on the sanity checks for system functions and types. With the other sanitizers I don’t need this and everything works fine. I also tried setting the configure script LDLIBS with the dfsan libraries, again without success.
I tried for days playing with different options of the GNU configure scripts, but no luck so far. I think I’m missing something, since compiling with the other sanitizers work. Any help will be much appreciated!
Thanks,
Fred
Hi Frederico,
Unfortunately, you did not provide enough information to allow
diagnosing your problem.
You did not show us the commands you ran; you did not show us the
error messages.
Dear list,
Have anybody compile a project using GNU configure with clang as compiler
and with the dataflow sanitizer option enabled? I tried compiling several
open source projects (e.g., Apache Httpd, Apache APR, Nginx) with dfsan and
all fail on the configure step when performing the usual checks for system
types, functions, etc.
What was the error message? Did you check config.log?
Interestingly, compiling with other sanitizers such as "memory" or "address"
work fine. These are the variables I set for compilation:
CC=<path-to-my-clang installation, compiled with cmake>
CFLAGS="-fsanitize=dataflow"
Did you run "make install" and use /usr/local/bin/clang, or did you
just point CC at 'Release+Asserts/bin/clang' ?
Notes: when using dfsan, I have to specify -S for the configure script to
How did you specify -S to the configure script? It does not have such an option:
$ ./configure -S
configure: error: unrecognized option: `-S'
Try `./configure --help' for more information
pass the C compiler check, otherwise the compiler check fails. With -S flag
specified, the GNU configure script fails on the sanity checks for system
Did you mean 'with' or 'without' ?
functions and types. With the other sanitizers I don't need this and
everything works fine. I also tried setting the configure script LDLIBS with
the dfsan libraries, again without success.
Csaba
Hi Frederico,
Sorry, I didn't see your second mail when I started replying.
(snip)
> Interestingly, compiling with other sanitizers such as "memory" or
> "address"
> work fine. These are the variables I set for compilation:
>
> CC=<path-to-my-clang installation, compiled with cmake>
> CFLAGS="-fsanitize=dataflow"
Did you run "make install" and use /usr/local/bin/clang, or did you
just point CC at 'Release+Asserts/bin/clang' ?
I did not run install. I included on my PATH both the bin and lib folders
from my local compilation of clang. Is that a problem? I did that because I
was learning clang and had more than one compiled version of it (one
compiled with gnu configure/make and another with cmake). I will probably
stick with the cmake-generated version for now.
This is probably irrelevant now, but I thought: maybe the problem was
that the freshly built clang executable can't find its headers or libs
until it all falls into place during "make install".
Csaba