Cutecash Compiling

Matt Graham matt_graham2001 at hotmail.com
Thu Dec 24 18:54:19 EST 2015


Thanks for the quick reply John!

With respect to warnings as errors, sounds good - I'll change my
compilation of gnucash to use this and try and help out by fixing
warnings that show up.

Sounds like I have misunderstood cutecash. I got the impression that
this was an attempt to bring gnucash (slowly) into C++. re-reading the
wiki page more closesly, what you say makes sense - one of the devs
trying to re-write the gui in C++ and use qt. In the past, you have
made comment that there is moves going on to bring gnucash code into a
more modern language - was this cutecash or something else?

As a side note, the dependencies on Gtk+ and gnomecanvas in my ebuild
are there because I started by just copying the gnucash ebuild => I
don't actually know much about these packages, so I assumed they are
still needed. The result would be that anyone that uses this ebuild
will have portage installing packages they don't need... (but they'd
still get cutecash, since the compilation uses cmake with cutecash on).

However, all of this is a bit redundant - if cutecash is not actively
developed at the moment I think I'll leave it. There are far better
contributions I can make than doing this (especially since I have no
understanding or experience with cmake or qt).

Thanks for your help!

Cheers,

Matt G


On Wed, 2015-12-23 at 22:25 -0800, John Ralls wrote:
> > On Dec 23, 2015, at 9:28 PM, Matt Graham <
> > matt_graham2001 at hotmail.com> wrote:
> > 
> > G’day All,
> > 
> > I’ve been keen to try out cutecash to see how it all goes, and
> > maybe help out (if my noobiness can be overcome...). Got through
> > quite a few problems, and learned a lot about Cmake in the process.
> > I’m currently at a point where I think it isn’t a gentooism that is
> > holding me back...
> > 
> > Firstly, all warnings are being treated as errors. Looking through
> > options provided in CMakeLists.txt of the root gnucash sources
> > directory, there doesn’t seem to be an “OPTION (WITH_WERROR ...”
> > kind of definition for me to be able to disable this activity. As
> > far as i can see this is hardcoded in the compile flags by the line
> > (same file): 
> > 
> > SET( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror -Wdeclaration-after
> > -statement -Wno-pointer-sign -D_FORTIFY_SOURCE=2 -Wall -Wunused 
> > -Wmissing-prototypes -Wmissing-declarations  -Wno-unused")
> > 
> > This is the one for unix, but there is an equivalent for windows
> > (although I think Apple gets away without an equivalent....)
> > 
> > The First question: Was this on purpose, and why? Is there a way in
> > Cmake for me to override this behaviour? e.g. can I pass something
> > like “–D Werror=OFF” as a configuration line to cmake?
> > I would have thought you would want to set a default in this
> > respect then let the user decide how they want the compile to
> > progress. Unless you want to get cutecash to a point where it
> > doesn’t have warnings => sounds like a lot of work...
> > 
> > The specific problem stopping me from building cutecash is a
> > warning “_FORTIFY_SOURCE redefined”. Sounds like this variable has
> > been defined twice somewhere. Not too sure where because the
> > referenced files don’t exist in the source code – they must be
> > getting generated by cmake. Build log is attached. If you know
> > gentoo and want to see my ebuild it is on my public github:
> > https://github.com/mattig7/MattsPackages/blob/master/app-office/cut
> > ecash/cutecash-99.ebuild
> > The commit used for building the attached build log is b3c1203 (in
> > case I change it before you see it).
> > 
> > The Questions: 
> > 1. Is this something to bother solving, or would you get past this
> > by disabling the ‘all warnings are errors’ behaviour?
> > 2. How on earth do we find out where this comes from in Cmake? in
> > this one, I don’t really know where to start other than trying to
> > learn a HUGE amount about Cmake to figure out where all these files
> > are generated from and why.
> 
> We expect that the code will compile without errors or warnings, and
> specify -Werror to enforce that. See below for particulars about the
> error you encountered. But note as well that the master branch is
> very unstable, particularly in this development cycle where we're
> making some very ambitious changes aimed towards making GnuCash a
> true database application able to support multiple simultaneous
> sessions.
> 
> As for CuteCash, it's really an experiment by one developer,
> Christian Stimming. It's in the main repository because it predates
> git; nowadays we'd expect that it would live in its own branch in a
> personal Github repo, but neither of those was possible when it was
> first created. It's not regularly maintained, in part because
> Christian has found other priorities and isn't regularly working on
> GnuCash any more.
> 
> But although you've titled this letter and your ebuild "cutecash",
> you have Gtk+ and libgnomecanvas in the dependencies and not Qt. The
> whole point of CuteCash is that it's a demo of building a subset of
> GnuCash with Qt instead of Gtk+. The capability to build GnuCash
> (with the full Gtk+ GUI) with cmake was added only 11 days ago and is
> for the moment somewhat experimental. Anyone not experienced with
> cmake should use autotools. 
> 
> The particular error in your log appears not to be in GnuCash code:
> > cd /var/tmp/portage/app-office/cutecash-99/work/cutecash
> > -99_build/src/gnc-module && /usr/bin/x86_64-pc-linux-gnu-gcc  
> > -DG_LOG_DOMAIN=\"gnc.module\" -DHAVE_CONFIG_H -Dgnc_module_EXPORTS 
> >   -DNDEBUG -O2 -march=native  -Werror -Wdeclaration-after-statement
> > -Wno-pointer-sign -D_FORTIFY_SOURCE=2 -Wall -Wunused -Wmissing
> > -prototypes -Wmissing-declarations  -Wno-unused -Wno
> > -error=deprecated-declarations -std=gnu99 -O2 -fPIC 
> > -I/var/tmp/portage/app-office/cutecash-99/work/cutecash-99/src/gnc
> > -module -I/var/tmp/portage/app-office/cutecash-99/work/cutecash
> > -99_build/src -I/var/tmp/portage/app-office/cutecash
> > -99/work/cutecash-99/src -I/var/tmp/portage/app-office/cutecash
> > -99/work/cutecash-99/src/libqof/qof -I/usr/include/glib-2.0 
> > -I/usr/lib64/glib-2.0/include -I/var/tmp/portage/app
> > -office/cutecash-99/work/cutecash-99/lib/libc    -o CMakeFiles/gnc
> > -module.dir/swig-gnc-module.c.o -c /var/tmp/portage/app
> > -office/cutecash-99/work/cutecash-99_build/src/gnc-module/swig-gnc
> > -module.c
> > <command-line>:0:0: error:
> > "_FORTIFY_SOURCE" redefined [-Werror]
> > <built-in>: note: this is the
> > location of the previous definition
> > <command-line>:0:0: error:
> > "_FORTIFY_SOURCE" redefined [-Werror]
> > <built-in>: note: this is the
> > location of the previous definition
> > cc1: all warnings being treated as errors
> > 
> 
> gcc is complaining that _FORTIFY_SOURCE is defined twice *in the
> command line*. That's manifestly not true, so something else is going
> on. 
> 
> Regards,
> John Ralls
> 
> 



More information about the gnucash-devel mailing list