trunk doesn't compile

Casey Cichon casey at wizkid.homelinux.net
Tue Nov 11 23:28:22 EST 2008


Christian Stimming wrote:
> Am Freitag, 31. Oktober 2008 06:00 schrieb Casey Cichon:
>   
>>> .libs/split-register-control.o cc1: warnings being treated as errors
>>> split-register-control.c: In function â:
>>> split-register-control.c:1149: warning: â may be used uninitialized in
>>> this function
>>> make[5]: *** [split-register-control.lo] Error 1
>>> make[5]: Leaving directory
>>> `/home/casey/downloads/gnucash/src/register/ledger-core'
>>>       
>> just changed
>>
>> line number: 1149 src/register/ledger-core/split-register-control.c
>>
>> changed
>> const char *message;
>> to
>> const char *message = NULL;
>>
>> now everything compiles again.
>>     
>
> Thanks for pointing this out. Your proposed fix indeed gets rid of the 
> compiler warning/error, but is the wrong fix in this case. Rather, one had to 
> fix the point where "message" might have been used without having a value 
> assigned. I just committed this as r17677, which should compile again. If it 
> doesn't, don't hesitate to notify us again! Thanks.
>
> Regards,
>
> Christian
>
>   
Did a fresh checkout from subversion into a clean directory.  I'm 
getting the following error during make.

Making all in bin
make[3]: Entering directory `/home/casey/downloads/gnucash/src/bin'
Making all in .
make[4]: Entering directory `/home/casey/downloads/gnucash/src/bin'
if gcc -DHAVE_CONFIG_H -I. -I. -I../.. -DG_LOG_DOMAIN=\"gnc.bin\" 
-I../.. -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   
-DORBIT2=1 -pthread -I/usr/include/libgnomeui-2.0 
-I/usr/include/libart-2.0 -I/usr/include/gconf/2 
-I/usr/include/gnome-keyring-1 -I/usr/include/libgnome-2.0 
-I/usr/include/libbonoboui-2.0 -I/usr/include/libgnomecanvas-2.0 
-I/usr/include/gtk-2.0 -I/usr/include/gnome-vfs-2.0 
-I/usr/lib/gnome-vfs-2.0/include -I/usr/include/orbit-2.0 
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include 
-I/usr/include/libbonobo-2.0 -I/usr/include/bonobo-activation-2.0 
-I/usr/include/libxml2 -I/usr/include/pango-1.0 -I/usr/include/gail-1.0 
-I/usr/include/freetype2 -I/usr/include/atk-1.0 
-I/usr/lib/gtk-2.0/include -I/usr/include/cairo -I/usr/include/libpng12 
-I/usr/include/pixman-1 -I/usr/include/gtk-2.0 
-I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo 
-I/usr/include/pango-1.0 -I/usr/include/glib-2.0 
-I/usr/lib/glib-2.0/include -I/usr/include/freetype2 
-I/usr/include/libpng12 -I/usr/include/pixman-1 
-DPKGSYSCONFDIR=\"/usr/local/etc/gnucash\" 
-DPKGDATADIR=\"/usr/local/share/gnucash\" 
-DGNC_HELPDIR=\"/usr/local/share\" -I../../src -I../../src 
-I../../src/core-utils -I../../src/app-utils -I../../src/gnome-utils 
-I../../src/engine -I../../src/gnome -I../../src/gnome-utils 
-I../../src/gnc-module -I../../lib/libqof/qof -I../../lib/libqof/qof    
-Werror -Wdeclaration-after-statement -Wno-pointer-sign 
-D_FORTIFY_SOURCE=2 -g -O2 -Wall -Wunused -Wmissing-prototypes 
-Wmissing-declarations  -Wno-unused -MT gnucash-bin.o -MD -MP -MF 
".deps/gnucash-bin.Tpo" -c -o gnucash-bin.o gnucash-bin.c; \
        then mv -f ".deps/gnucash-bin.Tpo" ".deps/gnucash-bin.Po"; else 
rm -f ".deps/gnucash-bin.Tpo"; exit 1; fi
/bin/bash ../../libtool --tag=CC --mode=link gcc  -Werror 
-Wdeclaration-after-statement -Wno-pointer-sign -D_FORTIFY_SOURCE=2 -g 
-O2 -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations  
-Wno-unused   -o gnucash-bin  gnucash-bin.o -lguile -lguile-ltdl 
-lqthreads -lpthread -lcrypt -lm -pthread -Wl,--export-dynamic 
-lgthread-2.0 -lrt -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0   
-pthread -lgnomeui-2 -lSM -lICE -lbonoboui-2 -lgnomevfs-2 
-lgnomecanvas-2 -lgnome-2 -lpopt -lbonobo-2 -lbonobo-activation 
-lORBit-2 -lart_lgpl_2 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 
-lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lpango-1.0 -lcairo -lgconf-2 
-lgthread-2.0 -lrt -lgmodule-2.0 -ldl -lgobject-2.0 -lglib-2.0   
-lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm 
-lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl 
-lglib-2.0   ../../lib/libqof/qof/libgnc-qof.la 
../../src/engine/libgncmod-engine.la ../../src/gnome/libgnc-gnome.la 
../../src/gnome-utils/libgncmod-gnome-utils.la 
../../src/app-utils/libgncmod-app-utils.la 
../../src/core-utils/libgnc-core-utils.la 
../../src/gnc-module/libgnc-module.la -lpopt -lm -lpthread  -lm
mkdir .libs
gcc -Werror -Wdeclaration-after-statement -Wno-pointer-sign 
-D_FORTIFY_SOURCE=2 -g -O2 -Wall -Wunused -Wmissing-prototypes 
-Wmissing-declarations -Wno-unused -o .libs/gnucash-bin gnucash-bin.o 
-pthread -Wl,--export-dynamic -pthread  /usr/lib/libguile.so 
/usr/lib/libguile-ltdl.so /usr/lib/libqthreads.so -lcrypt 
/usr/lib/libgnomeui-2.so -lSM -lICE /usr/lib/libbonoboui-2.so 
/usr/lib/libgnomevfs-2.so /usr/lib/libgnomecanvas-2.so 
/usr/lib/libgnome-2.so /usr/lib/libbonobo-2.so 
/usr/lib/libbonobo-activation.so /usr/lib/libORBit-2.so 
/usr/lib/libart_lgpl_2.so /usr/lib/libgconf-2.so 
/usr/lib/libgthread-2.0.so -lrt /usr/lib/libgtk-x11-2.0.so 
/usr/lib/libgdk-x11-2.0.so /usr/lib/libatk-1.0.so 
/usr/lib/libgdk_pixbuf-2.0.so /usr/lib/libpangocairo-1.0.so 
/usr/lib/libpango-1.0.so /usr/lib/libcairo.so /usr/lib/libgobject-2.0.so 
/usr/lib/libgmodule-2.0.so -ldl /usr/lib/libglib-2.0.so 
../../lib/libqof/qof/.libs/libgnc-qof.so 
../../src/engine/.libs/libgncmod-engine.so 
../../src/gnome/.libs/libgnc-gnome.so 
../../src/gnome-utils/.libs/libgncmod-gnome-utils.so 
../../src/app-utils/.libs/libgncmod-app-utils.so 
../../src/core-utils/.libs/libgnc-core-utils.so 
../../src/gnc-module/.libs/libgnc-module.so /usr/lib/libpopt.so 
-lpthread -lm  -Wl,--rpath -Wl,/usr/local/lib/gnucash
/usr/local/lib/gnucash/libgncmod-ledger-core.so: undefined reference to 
`gnc_split_value_print_info'
collect2: ld returned 1 exit status
make[4]: *** [gnucash-bin] Error 1
make[4]: Leaving directory `/home/casey/downloads/gnucash/src/bin'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/casey/downloads/gnucash/src/bin'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/casey/downloads/gnucash/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/casey/downloads/gnucash'
make: *** [all] Error 2
casey at wizkid2:~/downloads/gnucash$


Seems like a completely different error to me and since I figured I 
caused enough trouble already, I haven't done anything to fix this one.

configure options are --enable-compile-warnings --enable-ofx

Casey


More information about the gnucash-devel mailing list