CFLAGS=-Werror problems
Mark Johnson
mrj001 at shaw.ca
Tue Jan 17 10:05:25 EST 2006
Agreed. Once, I looked at the config.log, I saw that this was what was
happening. I changed my CFLAGS, and it is working.
Once I had this problem, I thought this was the reason for those
configure flags.
-Werror wasn't in my CFLAGS by default. I think that the build may have
put it there, since I used the same shell for a previous build. I'm
checking CFLAGS now before running configure.
Thanks,
Mark
Christian Stimming wrote:
> The C snippets in the ./configure file unfortunatly almost always fail
> miserably if your environment's CFLAGS contain -Werror. Somehow all
> those autoconf macro writers only tested for compiler errors, not for
> warning.
>
> That is the actual reason for the --with-error-on-warning configure
> flag: That flag will *not* add -Werror at the *beginning* of
> ./configure but instead at the very *end* of ./configure, after all
> configure test programs have been compiled without that flag.
>
> I would recommend removing -Werror from any of your default CFLAGS
> because as I said it will break almost any ./configure script in any
> existing project.
>
> Christian
>
> Mark Johnson schrieb:
>
>> OOPS, must have hit reply instead of Reply All.
>>
>> I believe that that is my CFLAGS in the configure 27271: gcc -g ...
>> line.
>>
>> It was the -Wunused -Werror that caused the problem. One warns about
>> the unused variable (p in the test for fdopen). The other makes
>> warnings into errors.
>> Mark
>>
>>> Mark Johnson <mrj001 at shaw.ca> writes:
>>>
>>>>> Can you cut-and-paste the portions of config.log about this test?
>>>>>
>>>> I found the following three lines in config.log, and that solved it
>>>> for me:
>>>> configure:27271: gcc -c -g -march=i486 -mcpu=pentium2 -g -Wall
>>>> -Wunused -Werror -D__USE_POSIX conftest.c >&5
>>>> conftest.c: In function `main':
>>>> conftest.c:99: warning: unused variable `p'
>>>>
>>>> The CFLAGS I passed interacted with the unused variable p and
>>>> fooled configure into thinking there was no fdopen. I changed my
>>>> CFLAGS and configure ran successfully.
>>>>
>>>> Mark
>>>
>
More information about the gnucash-devel
mailing list