Hi Justus,
It's hard to get anything past you guys... revised patches are attached.
:-) No, you just had bad luck. 64bit is a complex matter that looks simple. BTW, I'm quite happy that a few patches made dillo2 run on 64bit. On Wed, Apr 23, 2008 at 11:53:24PM +0200, Justus Winter wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hey@all :)
I ran into some issues compiling dillo. I solved / worked around them, patches are attached. Here are my findings and my interpretations (let me know in case I am way off somewhere):
dw2 === gcc-4.2 on linux/x86_64 complained about two casts in lout/object.cc:
object.cc:118: error: cast from ???void*??? to ???int??? loses precision
I felt it was nonsense to check the size of void* at runtime and used the preprocessor to choose which instruction to use based on the value of SIZEOF_VOID_P.
After reviewing the thread, and a head scratching phase, I committed the following code. please test it: +/* For some unknown reason, this doesn't compile on some 64bit platforms: + * + * if (sizeof (int) == sizeof (void*)) + * return (int)value; + * else + * return ((int*)value)[0] ^ ((int*)value)[1]; + */ +#if SIZEOF_VOID_P == 4 + return (int)value; +#else + return ((int*)value)[0] ^ ((int*)value)[1]; +#endif
dillo2 ====== There was another complaint by gcc:
dialog.cc:249: error: cast from ???void*??? to ???int??? loses precision
A parameter of type void* for a callback is used to carry a small integer (most likely the number of the button pressed or something). I solved this one by first casting to long and then to int. I saw this somewhere on the net, don't know if this is too hacky.
Committed as: + choice5_answer = VOIDP2INT(number);
dillo2/dpi ========== downloads.cc failed to compile since gcc couldn't find the fltk includes (I chose not to install them to /usr/local/lib), so I poked around in dpi/Makefile.am and managed to include LIBFLTK_CXXFLAGS into cxxflags (/me is an automake n00b).
Yeah, auto* is not simple. Does it work for you with a: +downloads_dpi_CXXFLAGS = @LIBFLTK_CXXFLAGS@ instead? (CVS has this tentative patch).
With my three patches applied dillo compiles and runs fine, however I had to create ~/.dillo and manually start dpid. Did I miss something here?
No, I forgot porting the creation of ~/.dillo from dillo1 to dillo2! (as we all run dillo1 before, ~/.dillo was there :-) dpid didn't start because it most probably wasn't in your path. With regard to a missing SSL, yes, it'd be good not to try to compile https the. Patches are welcomed! :-) -- Cheers Jorge.-