From: "Gerardo Santana Gómez Garrido" Date: 2005-11-21T03:48:56+09:00 Subject: Re: Building Ruby 1.8.2 on HP-UX 10.20 (Kero: I tried 1.8.3 and it was the same) I manually applied the patch to ruby-1.8.3/missing/vsnprintf.c and it seems that fixed something, but I got new errors: ----------8<------------ cc -Ae -g -DYYMAXDEPTH=300 -I. -I. -c ./missing/vsnprintf.c cpp: "vsnprintf.c", line 197: warning 2001: Redefinition of macro feof. cpp: "vsnprintf.c", line 198: warning 2001: Redefinition of macro ferror. cpp: "vsnprintf.c", line 199: warning 2001: Redefinition of macro clearerr. cc: "missing/vsnprintf.c", line 169: error 1584: Inconsistent type declaration: "FILE". cc: "missing/vsnprintf.c", line 252: error 1588: "_flags" undefined. cc: "missing/vsnprintf.c", line 252: error 1531: Invalid member of struct or union. cc: "missing/vsnprintf.c", line 252: error 1563: Expression in if must be scalar. cc: "missing/vsnprintf.c", line 256: error 1531: Invalid member of struct or union. cc: "missing/vsnprintf.c", line 256: error 1563: Expression in if must be scalar. cc: "missing/vsnprintf.c", line 270: error 1588: "_w" undefined. cc: "missing/vsnprintf.c", line 270: error 1531: Invalid member of struct or union. cc: "missing/vsnprintf.c", line 271: error 1531: Invalid member of struct or union. cc: "missing/vsnprintf.c", line 271: error 1563: Expression in if must be scalar. cc: "missing/vsnprintf.c", line 274: error 1588: "_p" undefined. cc: "missing/vsnprintf.c", line 274: error 1531: Invalid member of struct or union. cc: "missing/vsnprintf.c", line 274: error 1527: Incompatible types in cast: Must cast from scalar to scalar or to void type. cc: "missing/vsnprintf.c", line 275: error 1531: Invalid member of struct or union. cc: "missing/vsnprintf.c", line 275: error 1549: Modifiable lvalue required for assignment operator. cc: "missing/vsnprintf.c", line 275: error 1603: Incompatible operands: assign operator. cc: "missing/vsnprintf.c", line 276: error 1531: Invalid member of struct or union. cc: "missing/vsnprintf.c", line 276: error 1549: Modifiable lvalue required for assignment operator. cc: "missing/vsnprintf.c", line 276: error 1603: Incompatible operands: assign operator. cc: "missing/vsnprintf.c", line 294: error 1531: Invalid member of struct or union. cc: "missing/vsnprintf.c", line 294: error 1549: Modifiable lvalue required for assignment operator. cc: "missing/vsnprintf.c", line 553: error 1588: "_flags" undefined. cc: "missing/vsnprintf.c", line 553: error 1531: Invalid member of struct or union. cc: "missing/vsnprintf.c", line 554: error 1588: "_file" undefined. cc: "missing/vsnprintf.c", line 554: error 1531: Invalid member of struct or union. cc: "missing/vsnprintf.c", line 553: error 1563: Expression in if must be scalar. cc: "missing/vsnprintf.c", line 998: error 1531: Invalid member of struct or union. cc: "missing/vsnprintf.c", line 998: error 1552: First expression of ?: must be arithmetic. cc: "missing/vsnprintf.c", line 1089: error 1588: "_flags" undefined. cc: "missing/vsnprintf.c", line 1089: error 1531: Invalid member of struct or union. cc: "missing/vsnprintf.c", line 1090: error 1588: "_bf" undefined. cc: "missing/vsnprintf.c", line 1090: error 1531: Invalid member of struct or union. cc: "missing/vsnprintf.c", line 1090: error 1529: Cannot select field of non-structure. cc: "missing/vsnprintf.c", line 1090: error 1588: "_p" undefined. cc: "missing/vsnprintf.c", line 1090: error 1531: Invalid member of struct or union. cc: "missing/vsnprintf.c", line 1091: error 1531: Invalid member of struct or union. cc: "missing/vsnprintf.c", line 1091: error 1529: Cannot select field of non-structure. cc: "missing/vsnprintf.c", line 1091: error 1588: "_w" undefined. cc: "missing/vsnprintf.c", line 1091: error 1531: Invalid member of struct or union. cc: "missing/vsnprintf.c", line 1093: error 1531: Invalid member of struct or union. cc: "missing/vsnprintf.c", line 1093: error 1554: Indirection must be through a pointer. cc: "missing/vsnprintf.c", line 1129: error 1588: "_flags" undefined. cc: "missing/vsnprintf.c", line 1129: error 1531: Invalid member of struct or union. cc: "missing/vsnprintf.c", line 1130: error 1588: "_bf" undefined. cc: "missing/vsnprintf.c", line 1130: error 1531: Invalid member of struct or union. cc: "missing/vsnprintf.c", line 1130: error 1529: Cannot select field of non-structure. cc: "missing/vsnprintf.c", line 1130: error 1588: "_p" undefined. cc: "missing/vsnprintf.c", line 1130: error 1531: Invalid member of struct or union. cc: "missing/vsnprintf.c", line 1131: error 1531: Invalid member of struct or union. cc: "missing/vsnprintf.c", line 1131: error 1529: Cannot select field of non-structure. cc: "missing/vsnprintf.c", line 1131: error 1588: "_w" undefined. cc: "missing/vsnprintf.c", line 1131: error 1531: Invalid member of struct or union. cc: "missing/vsnprintf.c", line 1133: error 1531: Invalid member of struct or union. cc: "missing/vsnprintf.c", line 1133: error 1554: Indirection must be through a pointer. *** Error exit code 1 Stop. ---------->8------------ Again, if I use -Aa it works, but then I get: ----------8<------------ /home/santana/sw/ruby-1.8.3/lib/optparse.rb:857:in `accept': negative allocation size (or too big) (NoMemoryError) from /home/santana/sw/ruby-1.8.3/lib/optparse/shellwords.rb:6 from ./ext/extmk.rb:33 *** Error exit code 1 Stop. ---------->8------------ 2005/11/20, Yukihiro Matsumoto : > Hi, > > In message "Re: Building Ruby 1.8.2 on HP-UX 10.20" > on Sun, 20 Nov 2005 05:57:42 +0900, Gerardo Santana G�mez Garrido writes: > > |I get the following error: > > Does this patch help you? > > matz. > > --- missing/vsnprintf.c 24 Sep 2005 13:34:26 -0000 1.15 > +++ missing/vsnprintf.c 20 Nov 2005 18:12:22 -0000 > @@ -113,2 +113,9 @@ > #include > +#if defined(__hpux) && !defined(__GNUC__) || defined(__DECC) > +#include > +#endif > + > +#if !defined(__CYGWIN32__) && defined(__hpux) && !defined(__GNUC__) > +#include > +#endif > > @@ -205,6 +212,2 @@ typedef struct __sFILE { > > -#if defined(__hpux) && !defined(__GNUC__) || defined(__DECC) > -#include > -#endif > - > /* > @@ -305,6 +308,2 @@ static int BSD__sfvwrite(fp, uio) > > -#if !defined(__CYGWIN32__) && defined(__hpux) && !defined(__GNUC__) > -#include > -#endif > - > /* > > -- Gerardo Santana "Between individuals, as between nations, respect for the rights of others is peace" - Don Benito Ju�rez