John Goerzen wrote: > Hi, > > I have been attempting to compile perl 5.004 for Sparc just to try it out. > However, gcc is sig 11'ing on me, at the exact same spot each time: > > cc -c -Dbool=char -DHAS_BOOL -D_REENTRANT -I/usr/local/include > -DSTRUCT_TM_HASZONE -O2 -DVERSION=\"1.02\" -DXS_VERSION=\"1.02\" -fpic > -I../.. POSIX.c > cc: Internal compiler error: program cc1 got fatal signal 11 > make[2]: *** [POSIX.o] Error 1 > make[2]: Leaving directory > `/home/jgoerzen/packages/perl/perl-5.004.04/ext/POSIX' > make[1]: *** [lib/auto/POSIX/POSIX.so] Error 2 > make[1]: Leaving directory `/home/jgoerzen/packages/perl/perl-5.004.04' > make: *** [build] Error 2 > > On an i386, I might think it was hardware. However, this machine has now > done this three times in a row at the exact same spot, so I am not leaning > in that direction anymore at this point. And ideas would be welcome. > > John
Yes, I've got the same error. It's due to macro expansions in bits/string2.h. The POSIX.c defines a very very huge expression (in the "constant" function) based on a switch statement with lot of strcmp inside each case : each strcmp is expanded in a rather huge expression which resolves to only one function call at compile time (the best implementation depending on string types) and gcc seems to merge all tests in one *big* expression. It then has some troubles to optimize it ;-( BTW, to solve your problem, you have to disable string optimizations by adding #define __NO_STRING_INLINES 1 on top of the POSIX.xs file (not POSIX.c since the latter is built automatically from the former). Note: you cannot put this #define just before #include <string.h> in POSIX.xs because it seems it is not the first access to this file. Hope this help. -- Eric Delaunay | "La guerre justifie l'existence des militaires. [EMAIL PROTECTED] | En les supprimant." Henri Jeanson (1900-1970) -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

