Building GnuCash on 64-bit failed

David Hampton hampton-gnucash at rainbolthampton.net
Sat Nov 26 03:44:15 EST 2005


On Fri, 2005-11-25 at 12:10 -0500, Englisch, Volker (NIH/NCI) wrote:
> > Okay, this should now be fixed..  Can you "svn update"
> > your goffice-update branch and re-try?
> 
> 
> I did that.  Now I am getting the same error that I reported originally 
> with the trunk:
> 
> cc1: warnings being treated as errors
> gog-graph.c: In function 'gog_graph_ref_data':
> gog-graph.c:414: warning: cast from pointer to integer of different size
> gog-graph.c:429: warning: cast from pointer to integer of different size
> gog-graph.c:434: warning: cast from pointer to integer of different size
> gog-graph.c: In function 'gog_graph_unref_data':
> gog-graph.c:469: warning: cast from pointer to integer of different size
> gog-graph.c:480: warning: cast from pointer to integer of different size
> gog-graph.c:483: warning: cast from pointer to integer of different size
> make[6]: *** [gog-graph.lo] Error 1
> make[6]: Leaving directory
> `/home/venglisc/gnucash/g2-devel/goffice/lib/goffice-0.0.4/goffice/graph
> '

This is code that's just plain broken for 64bit systems.  Its trying to
hang a value on to an object using a pointer as its key, but glib
requires all keys to be either a 32 bit integer or a string.  The above
code later tries to read back this value using the same key, but again
the key is of the wrong type on a 64bit platform.

Josh, Derek, any ideas on how to easily convert a 64 bit pointer into a
unique 32 bit pointer or into a string?  That latter can be done easily
by printing it as hex into a character buffer, but its not going to be
blindingly fast.  It should work though.  I've attached an untested
patch below that uses this method and should work on both 32bit and
64bit systems.

David

P.S. You should also update. I committed a couple of fixes for gcc4
errors.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: UDiffs
Type: text/x-patch
Size: 1881 bytes
Desc: not available
Url : http://lists.gnucash.org/pipermail/gnucash-devel/attachments/20051126/f87440b2/UDiffs.bin


More information about the gnucash-devel mailing list