Cutecash Compiling

Matt Graham matt_graham2001 at hotmail.com
Thu Dec 24 00:28:00 EST 2015


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/cutecash/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.

Cheers,

Matt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cutecash-99_201512241500.log
Type: application/octet-stream
Size: 269957 bytes
Desc: not available
URL: <http://lists.gnucash.org/pipermail/gnucash-devel/attachments/20151224/615fa36f/attachment-0001.obj>


More information about the gnucash-devel mailing list