--On January 25, 2014 3:57:29 PM -0800 John Ralls <[email protected]> wrote:

You can also install other versions of gcc using MacPorts.  I'm
currently using gcc 4.7 to build Gnucash (and other things).  I
haven't installed gcc 4.8 or 4.9 but both are available with
MacPorts.  I probably should switch to 4.8 at some point.

Ah, that’s useful to know. IIRC you’re on 10.6.8; I imagine that
you’re building against the native libs and headers in /usr and
frameworks in /System/Library rather than against an SDK. Is that
right?

I'm a little more recent that that. I'm currently running 10.8.5 on my main machine. I have a server that's at 10.6.8, but I never do any compiles there.

The MacPorts philosophy (which some disagree with, which is one reason HomeBrew exists) is that the MacPorts environment should be as nearly as possible completely self-contained. As a result most of the libraries and headers I build against are ones installed by MacPorts, either with gcc or one of the Gnucash dependencies. Remember that I'm building the X version, not the Aqua version. I think it should be possible to build the Aqua version too, but I haven't tried recently. I've been thinking that I probably should give it a try someday.

Picking a random recent compile (business/business-ledger/gncEntryLedger.c) and giving gcc the -H option determined that it's including 55 different header files that are not part of either Gnucash or MacPorts. All of them are from /usr/include. That's out of a total of 670 different files included.

This also warned me that src/engine/GNCId.h needs multiple include guards. Looking at it, I think it really needs to be given a decent burial. It includes one #define that, as far as I can tell, is never used.

I do use XCode to debug Gnucash. I don't build it there, but it works fine as a GUI for the debugger. Somewhat to my surprise, lldb is happy to debug code produced by gcc.

           Mike


_______________________________________________
gnucash-devel mailing list
[email protected]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel

Reply via email to