gnucash master: Multiple changes pushed

John Ralls jralls at ceridwen.us
Mon Jul 7 02:25:34 EDT 2014


On Jul 7, 2014, at 2:07 AM, Sumit Bhardwaj <bhardwajs at gmail.com> wrote:

> Just a quick update so everyone is on the same page: problem is not with macro (autogen.sh) 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.
> 
> Thanks,
> Sumit
> 
> 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

Sumit,

I don't understand how you concluded that the AM_CXXFLAGS are being included when make builds gfec.c, nor do I understand why you think that it's using g++. The command make emitted when it failed was:
>>  gcc -DHAVE_CONFIG_H -I. -I../.. -Wno-error=deprecated-declarations -I../../lib/libc -I../../src -I../../src -I../../src/gnc-module -I../../src/app-utils/calculation -I../../src/core-utils -I../../src/engine -I../../src/libqof/qof -I../../src/backend/xml -pthread -I/usr/include/guile/2.0 -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -pthread -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libdrm -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libxml2 -I/usr/include/libxml2 -DG_LOG_DOMAIN=\"gnc.app-utils\" -Werror -Wdeclaration-after-statement -Wno-pointer-sign -D_FORTIFY_SOURCE=2 -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wno-non-literal-null-conversion -Wno-unused -g -O2 -MT gfec.lo -MD -MP -MF .deps/gfec.Tpo -c gfec.c  -fPIC -DPIC -o .libs/gfec.o 

Clearly showing that it's calling gcc and clearly not including -Wno-deprecated-register.

What does the no-non-literal-null-conversion section of config.log look like with the modified AX_CHECK_COMPILE_FLAG?

Regards,
John Ralls

 
> 
> On Sun, Jul 6, 2014 at 10:09 AM, John Ralls <jralls at ceridwen.us> wrote:
> 
> On Jul 6, 2014, at 6:38 PM, Sumit Bhardwaj <bhardwajs at gmail.com> wrote:
> 
>> Hi John,
>> 
>> That works - to an extent. gcc fails and the current configuration is:
>>  -Werror -Wdeclaration-after-statement -Wno-pointer-sign -D_FORTIFY_SOURCE=2
>> 
>> 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 configure.ac, I have pushed the changes to master  repo on my github (https://github.com/bhardwajs/gnucash).
>> 
>> 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