Discussion:
librapi2 0.14: configure script broken with -Werror=format-security
Frederik Himpe
2009-07-22 21:05:04 UTC
Permalink
librapi2 0.14's configure script does
CFLAGS=`echo $CFLAGS | sed 's|-Werror||'`

However, if you have set -Werror=format-security in your CFLAGS (which is
the default in Mandriva), this results in the broken option
"=format-security", breaking the configure script with:
gcc: =format-security: No such file or directory
when building the pthread tests.
--
Frederik Himpe
Frederik Himpe
2009-07-22 21:26:09 UTC
Permalink
librapi2 0.14's configure script does CFLAGS=`echo $CFLAGS | sed
's|-Werror||'`
However, if you have set -Werror=format-security in your CFLAGS (which
is the default in Mandriva), this results in the broken option
=format-security: No such file or directory when building the pthread
tests.
Actually, in my opinion the configure script should not do such a change
to the CFLAGS. If the user breaks things because of his custom CFLAGS, he
should know how to fix it by removing the offending CFLAG or by
contributing patches to make the warnings/errors go away. Especially in
this case, librapi builds fine with -Werror=format-security, so there's no
need to remove it.
--
Frederik Himpe
Mark Ellis
2009-07-22 22:00:04 UTC
Permalink
Post by Frederik Himpe
librapi2 0.14's configure script does CFLAGS=`echo $CFLAGS | sed
's|-Werror||'`
However, if you have set -Werror=format-security in your CFLAGS (which
is the default in Mandriva), this results in the broken option
=format-security: No such file or directory when building the pthread
tests.
Actually, in my opinion the configure script should not do such a change
to the CFLAGS. If the user breaks things because of his custom CFLAGS, he
should know how to fix it by removing the offending CFLAG or by
contributing patches to make the warnings/errors go away. Especially in
this case, librapi builds fine with -Werror=format-security, so there's no
need to remove it.
Actually I think you'll find this is more common than you think.

In this case, the autoconf pthread checks blow up with -Werror in
CFLAGS, so it must be removed, and restored after this check. If you can
fix this I'm sure the autoconf guys will be delighted.

In the meantime, try replacing the sed with this one.

CFLAGS=`echo $CFLAGS | sed 's|-Werror[^[:space:]]*||'`

Mark

Loading...