Building on Windows from scratch, enable-python and some install-impl.sh vs custom.sh suggestions

Wm Tarr wm.tarr at gmail.com
Tue May 13 19:42:17 EDT 2014


On 10/05/2014 10:36, Geert Janssens wrote:
> On Friday 09 May 2014 16:51:06 Wm Tarr wrote:
>> I'm working my way through getting python enabled with "Windows from
>> scratch".
>>
> Great ! Will you document your success ?

When it happens, definitely.   Made a lot of progress today, I can do an 
error free build with enable-python.  There is a lot of hackery to make 
sense of but these two issues came up that I'd like someone else to look at



1. there is a conflict between gcdev\gnucash\build\config.h and 
Python27\include\pyconfig.h
config.h expects pyconfig.h to have the line
#define HAVE_PUTENV 1
rather than
#define HAVE_PUTENV
I hacked pyconfig.h to include the 1 on a life's too short and I'm 
hacking principle.
Depending on what it is in other python's on other OSs it seems to me 
this is easy enough to get around, it is merely a matter of doing it the 
best way, i.e. adjust Python, adjust gnc or ignore the warning in the build.



2.  More seriously (and I think recently introduced) is a duplicate 
variable (I didn't make a note of the error msg) between
\gcdev\gnucash.git\src\engine\Transaction.c
and
\gcdev\gnucash.git\src\engine\test\utest-Transaction.c

I'm guessing this isn't specific to enable-python so much as the extra 
tests being run for the first time by anyone in the last week or so.

my hack was to change utest-Transaction.c

const char *trans_is_closing_str = "book_closing";

to

static const char *trans_is_closing_str = "book_closing";

which seemed to fix it.  I'll leave people closer to that bit of the 
code to decide what is best.


More generally the
checking for /c/Python27/python script directory... 
${prefix}\Lib\site-packages
checking for /c/Python27/python extension module directory... 
${exec_prefix}\Lib\site-packages
just aren't working out on Win.
I'll see how I feel tomorrow but the way I'm looking at it right now I 
think I'm going to sed the Makefile after configure in function 
inst_gnucash() because the results *really* are that ugly and MSYS 
(unlike cygwin) can't seem to sanitise the paths reliably and I've spent 
much too long on this unimportant issue.

It is late.  Apart from 1. and 2. it looks like tidying up is the next step.

It is late so I'll reply to the rest of the posting another day.

-- 
Wm



More information about the gnucash-devel mailing list