gnucash master: Multiple changes pushed

John Ralls jralls at
Mon Jul 7 14:38:41 EDT 2014

On Jul 7, 2014, at 4:03 PM, Sumit Bhardwaj <bhardwajs at> wrote:

> Hi John,
> 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=\"\" -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.
> Apologies for not being clear. This compile shouldn't cause problem if the compiler was gcc. My test
> gcc   -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations  -Wno-non-literal-null-
> conversion -Wno-unused -g -O2 -Werror -D_FORTIFY_SOURCE=2 helloworld.c
> worked without any problems, but the test with g++ threw the error saying -Wno-non-literal-null-conversion is not a valid option.

Yeah, I got that. What I don't understand is why you think that's germane when it's clearly gcc that's failing to compile gfec.c and it's clearly cc1, not cc1plus, that's rejecting the -Wno-non-literal-null-conversion argument.

> What does the no-non-literal-null-conversion section of config.log look like with the modified AX_CHECK_COMPILE_FLAG?
> Here you go:
> configure:25427: g++ -c -g -O2 -std=gnu++11 -Werror -Wno-deprecated-register  conftest.cpp >&5
> configure:25427: $? = 0
> configure:25435: result: yes
> configure:25449: checking whether C compiler accepts -Wno-non-literal-null-conversion
> configure:25468: gcc -c -g -O2 -Werror -Wno-non-literal-null-conversion  conftest.c >&5
> configure:25468: $? = 0
> configure:25476: result: yes
> configure:25484: checking what extra warning flags to pass to the C compiler
> configure:25547: gcc -c  -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations  -Wno-non-literal-null-conversion -Wno-unused -g -O2 -Werror -D_FORTIFY_SOURCE=2  conftest.c >&5
> configure:25547: $? = 0
> configure:25560: result:  -Werror -Wdeclaration-after-statement -Wno-pointer-sign -D_FORTIFY_SOURCE=2

So adding actual code to be compiled doesn't make any difference, it still passes only to fail later. Rats.

John Ralls

More information about the gnucash-devel mailing list