gnucash master: Multiple changes pushed

Sumit Bhardwaj bhardwajs at
Sun Jul 6 20:07:02 EDT 2014

Just a quick update so everyone is on the same page: problem is not with
macro ( or configure. It seems the call for gfec.c mixes CFLAGS
and CXXFLAGS and then cc1plus or cc1 throws error. Diagnosis below.

I did have to make changes in macros/m4_ax_check_compile_flag.m4. I pushed
those changes to my github as well.

Next step will be to see how make is using/setting the flags. I will try to
look at that later. Do let me know if I am going on wrong track. Any help
in expediting appreciated.


Here is my attempt at getting to the bottom of the problem:
g++   -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations
-Wno-non-literal-null-conversion -Wno-unused -g -O2 -Werror
-D_FORTIFY_SOURCE=2 helloworld.c
throws error while
gcc   -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations
-Wno-non-literal-null-conversion -Wno-unused -g -O2 -Werror
-D_FORTIFY_SOURCE=2 helloworld.c
works correctly. Having helloworld.cpp for g++ doesn't change anything.

Moreover, CFLAGS and CXXFLAGS are set correctly.
AM_CFLAGS =  -Werror -Wdeclaration-after-statement -Wno-pointer-sign
-D_FORTIFY_SOURCE=2  -Wall -Wunused -Wmissing-prototypes
-Wmissing-declarations  -Wno-non-literal-null-conversion -Wno-unused
AM_CXXFLAGS =  -Werror  -Wall -Wno-unused -Wno-deprecated-register

On Sun, Jul 6, 2014 at 10:09 AM, John Ralls <jralls at> wrote:

> On Jul 6, 2014, at 6:38 PM, Sumit Bhardwaj <bhardwajs at> wrote:
> Hi John,
> That works - to an extent. gcc fails and the current configuration is:
>  -Werror -Wdeclaration-after-statement -Wno-pointer-sign
> Configure doesn't fail, but that the flags are far fewer than earlier. Is
> this, what we want to go ahead with?
> If anyone wants to look at the changes in
> macros/m4_ax_check_compile_flag.m4 and, I have pushed the
> changes to master  repo on my github (
> ).
> Cheers,
> Sumit
> P.S. - Apologies for a two-month hiatus. Work drained a lot of time and
> energy. Should be better now. :)
> Real life does have a nasty habit of intruding.... ;-)
> Anyway, what do you mean by "works to an extent"? What we want is for that
> test to fail in configure and for the rest of GC to compile correctly. If
> my hack to AX_CHECK_COMPILE_FLAG does that, excellent, I'll push it. If
> not, please post details so I can figure out the next thing to try -- or
> figure out a fix yourself and make a patch for one of us to push on your
> behalf. We can work with a github pull request if that's more convenient
> for you than a BZ.
> Regards,
> John Ralls

More information about the gnucash-devel mailing list