[kaffe] HP-UX and IPv6 still fail

Dalibor Topic robilad@kaffe.org
Thu Sep 25 11:49:02 2003


Dalibor Topic wrote:
> Dalibor Topic wrote:
> 
>> Riccardo wrote:
>>
>>> HP-UX and IPv6 still fail
>>>
>>> I tried compiling kaffe-cvs on another HP=UX 10.20 box, which has an 
>>> older compiler (gcc 2.95) and generally less software installed, 
>>> nevertheless inet6 functions fail to be correctly included from the 
>>> dummy files probably.
>>
>>
>>
>> I've got around to try to fix the HP-UX problems, following yous and 
>> Helmer's lead.
>>
>> So I'm trying to buld kaffe on the HPUX box from TestDrive. Ugh. The 
>> include file for /usr/include/sys/socket.h seems to be badly broken so 
>> the configure script breaks when trying to detect the size of 
>> sin_port. See 
>> http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xbdd191ccb36bd611abdb0090277a778c,00.html 
>> for some information.
>>
>> I'm building me a fresh gcc 3.3.1 (as TestDrive only has gcc 3.2.3) 
>> and hope that the configure script will work with that one.
> 
> 
> Turns out I can't build gcc 3.3.1 with the gcc (3.2.3) that's on the 
> test drive machine. The compiler doesn't seem to be able to include the 
> proper definition for size_t when compiling libiberty/floatformat.c. 
> This breaks both binutils 2.14 and gcc 3.3.1. Great.
> 
> binutils:
> 
> gcc -c -DHAVE_CONFIG_H -g -O2 -I. 
> -I../../binutils-2.14/libiberty/../include -W -Wall -Wtraditional 
> -pedantic ../../binutils-2.14/libiberty/floatformat.c -o floatformat.o
> ../../binutils-2.14/libiberty/floatformat.c:25: syntax error before 
> "size_t"
> ../../binutils-2.14/libiberty/floatformat.c:26: syntax error before 
> "size_t"
> 
> gcc:
> 
> It seems that the fixincludes script from gcc 3.2.3 broke the fixed 
> stddef.h slightly, as size_t gets never defined when compiling the file.
> 
> bash-2.04$ gcc -E -H ../gcc-3.3.1/libiberty/floatformat.c 
> -I../gcc-3.3.1/include | grep size_t
> 
> . ../gcc-3.3.1/include/floatformat.h
> .. ../gcc-3.3.1/include/ansidecl.h
> . /usr/local/lib/gcc-lib/hppa2.0n-hp-hpux11.00/3.2.3/include/math.h
> .. /usr/include/sys/stdsyms.h
> . /usr/local/lib/gcc-lib/hppa2.0n-hp-hpux11.00/3.2.3/include/stddef.h
> extern void *memcpy (void *s1, const void *s2, size_t n);
> extern void *memset (void *s, int c, size_t n);
> Multiple include guards may be useful for:
> /usr/local/lib/gcc-lib/hppa2.0n-hp-hpux11.00/3.2.3/include/stddef.h
> 
> I'm building gcc with hp's c compiler now, I hope that will work better.

O.k., that broke as well ;)

So I ended up rebuilding the latest bintuils with hp's compiler, which 
surprisingly worked, and then using that to build gcc 3.3.1, which 
surprisingly worked as well. That gave me something to work with, which 
explains the flurry of hpux related patches you've seen today.

There are still some compiler warnings left:

../../../../kaffe-1.1.x-cvs/kaffe/kaffevm/intrp/machine.c: In function 
`virtualMachine':
../../../../kaffe-1.1.x-cvs/kaffe/kaffevm/intrp/machine.c:174: warning: 
type-punning to incomplete type might break strict-aliasing rules
../../../../kaffe-1.1.x-cvs/kaffe/kaffevm/intrp/machine.c:180: warning: 
type-punning to incomplete type might break strict-aliasing rules
../../../kaffe-1.1.x-cvs/kaffe/kaffevm/exception.c:48:1: warning: 
"FIRSTFRAME" redefined
In file included from ../../../kaffe-1.1.x-cvs/kaffe/kaffevm/threadData.h:6,
                  from 
../../../kaffe-1.1.x-cvs/kaffe/kaffevm/systems/unix-jthreads/jthread.h:42,
                  from 
../../../kaffe-1.1.x-cvs/kaffe/kaffevm/classMethod.h:21,
                  from 
../../../kaffe-1.1.x-cvs/kaffe/kaffevm/exception.c:27:
../../../kaffe-1.1.x-cvs/kaffe/kaffevm/intrp/stackTrace-impl.h:26:1: 
warning: this is the location of the previous definition
../../../kaffe-1.1.x-cvs/kaffe/kaffevm/stringParsing.c: In function 
`skipChars':
../../../kaffe-1.1.x-cvs/kaffe/kaffevm/stringParsing.c:439: warning: 
subscript has type `char'
../../../kaffe-1.1.x-cvs/kaffe/kaffevm/stringParsing.c: In function 
`skipSpace':
../../../kaffe-1.1.x-cvs/kaffe/kaffevm/stringParsing.c:452: warning: 
subscript has type `char'
../../../kaffe-1.1.x-cvs/kaffe/kaffevm/support.c: In function `callMethodA':
../../../kaffe-1.1.x-cvs/kaffe/kaffevm/support.c:629: warning: 
type-punning to incomplete type might break strict-aliasing rules
../../../kaffe-1.1.x-cvs/kaffe/kaffevm/support.c: In function `callMethodV':
../../../kaffe-1.1.x-cvs/kaffe/kaffevm/support.c:849: warning: 
type-punning to incomplete type might break strict-aliasing rules
/tmp/kaffe/bin/nm: dummyin6.o: no symbols
/tmp/kaffe/bin/nm: getaddrinfo.o: no symbols
/tmp/kaffe/bin/nm: inet_pton.o: no symbols
/tmp/kaffe/bin/nm: inet_ntop.o: no symbols
/tmp/kaffe/bin/nm: memset.o: no symbols
/bin/sh: 29693 Bus error(coredump)
gmake[3]: *** [ClassToInterface.class] Error 138
gmake[2]: *** [all-recursive] Error 1
gmake[1]: *** [all-recursive] Error 1
gmake: *** [all-recursive] Error 1

so if someone feels like tackling any of them, go for it, don't wait for 
me ;) The crash in the shell is particularly worrisome in my opinion.

In order to get there, you'll need binutils 2.14 and gcc 3.3.1. I'm 
using gnu make to build kaffe, and a 'distrubution' of kaffe created on 
a linux box from current CVS by running 'make dist'. One can;t build 
shared libs on HPUX for some reason, so you need to configure kaffe with 
--disable-shared.

I'd be particularly glad to see the type-punning warnings fixed, as I 
have no idea what they are about. Jim, you've fixed some type-punning 
warnings before, could you take a look at those?

Once the warnings are gone, I hope kaffe will run happily on parisc-hpux 
again, and on parisc-linux, too ;)

cheers,
dalibor topic