Building Ruby 1.8.2 on HP-UX 10.20

  • Thread starter Gerardo Santana Gómez Garrido
  • Start date
G

Gerardo Santana Gómez Garrido

I get the following error:

-----------8<-------------
cc -Ae -g -DYYMAXDEPTH=3D300 -I. -I. -c ./missing/vsnprintf.c
cpp: "stdio.h", line 316: warning 2001: Redefinition of macro clearerr.
cpp: "stdio.h", line 317: warning 2001: Redefinition of macro feof.
cpp: "stdio.h", line 318: warning 2001: Redefinition of macro ferror.
cc: "/usr/include/stdio.h", line 173: error 1000: Unexpected symbol: "void"=
 
K

Kero

I get the following error:
-----------8<-------------
cc -Ae -g -DYYMAXDEPTH=300 -I. -I. -c ./missing/vsnprintf.c
cpp: "stdio.h", line 316: warning 2001: Redefinition of macro clearerr.
cpp: "stdio.h", line 317: warning 2001: Redefinition of macro feof.
cpp: "stdio.h", line 318: warning 2001: Redefinition of macro ferror.
cc: "/usr/include/stdio.h", line 173: error 1000: Unexpected symbol: "void"=

Is the stdio.h in error itself, or did Ruby override something it shouldn't
have?

Does it go away with 1.8.3 or 1.8.4-preview1 ?

And probably most important, is vsnprintf missing on hpux 10? if not, why
does ./configure seem to think so?

I have not seen this problem with 1.8.1 or 1.8.4-preview1 on HP-UX 11
(though comforting, that may be of very little help to you)

Bye,
Kero.
 
G

Gerardo Santana Gómez Garrido

Thanks Kero

2005/11/20 said:
oid"=3D

Is the stdio.h in error itself, or did Ruby override something it shouldn= 't
have?


missing/vsnprintf.c defines some macros like clearerr and ferror,
which are already declared as functions in stdio.h. Although
vsnprintf.c is not including stdio.h, it seems like cpp includes it
after preprocessing vsnprintf.c and then I get those errors
("Redefinition of macro clearerr" because stdio.h is declaring it as a
function, after being defined as a macro in vsnprintf.c, etc)

I'm new at HP-UX, I'm missing something important for sure. Changing
the flag -Ae for -Aa "solves" the problem for vsnprintf.c. But then I
get other errors when running miniruby.
Does it go away with 1.8.3 or 1.8.4-preview1 ?

I'll try with 1.8.4-preview1 and see
And probably most important, is vsnprintf missing on hpux 10? if not, why
does ./configure seem to think so?

Yes, it is missing.
I have not seen this problem with 1.8.1 or 1.8.4-preview1 on HP-UX 11
(though comforting, that may be of very little help to you)

HP-UX 11 already has vsnprintf AFAIK.

I have just found this:

http://www.ruby-lang.org/ja/install.cgi?cmd=3Dview;name=3DHP-UX

It explains how to solve some problems I ran into. It says something
about vsnprintf and a patch for HP-UX, but I can't read Japanese :(=20
Does any caritative soul want to help me? (from the line starting with
"missing/vsnprintf.c", almost at the end of the file)

Thanks in advance
 
Y

Yukihiro Matsumoto

Hi,

In message "Re: Building Ruby 1.8.2 on HP-UX 10.20"
|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 <stddef.h>
+#if defined(__hpux) && !defined(__GNUC__) || defined(__DECC)
+#include <string.h>
+#endif
+
+#if !defined(__CYGWIN32__) && defined(__hpux) && !defined(__GNUC__)
+#include <stdlib.h>
+#endif
=20
@@ -205,6 +212,2 @@ typedef struct __sFILE {
=20
-#if defined(__hpux) && !defined(__GNUC__) || defined(__DECC)
-#include <string.h>
-#endif
-
/*
@@ -305,6 +308,2 @@ static int BSD__sfvwrite(fp, uio)
=20
-#if !defined(__CYGWIN32__) && defined(__hpux) && !defined(__GNUC__)
-#include <stdlib.h>
-#endif
-
/*
 
G

Gerardo Santana Gómez Garrido

(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=3D300 -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------------
 
G

Gerardo Santana Gómez Garrido

I tried with 1.8.4preview1 and got the same problem. But the error
after compiling with -Aa changed:


/home/santana/sw/ruby-1.8.4/lib/fileutils.rb:1561: [BUG] Bus Error
ruby 1.8.4 (2005-10-29) [hppa2.0-hpux10.20]

sh: 16263 Abort(coredump)
*** Error exit code 134

Stop.



2005/11/20 said:
(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=3D300 -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 clearer= r.
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 said:
Hi,

In message "Re: Building Ruby 1.8.2 on HP-UX 10.20"
 
Y

Yukihiro Matsumoto

Hi,

In message "Re: Building Ruby 1.8.2 on HP-UX 10.20"
|I manually applied the patch to ruby-1.8.3/missing/vsnprintf.c and it
|seems that fixed something, but I got new errors:

Try the attached patch, please.

|Again, if I use -Aa it works, but then I get:

Hmm, it must be a difficult bug to fix. I wish I could have access to
the HP-UX box.

matz.

--- missing/vsnprintf.c 24 Sep 2005 13:34:26 -0000 1.15
+++ missing/vsnprintf.c 20 Nov 2005 23:56:34 -0000
@@ -113,2 +113,9 @@
#include <stddef.h>
+#if defined(__hpux) && !defined(__GNUC__) || defined(__DECC)
+#include <string.h>
+#endif
+
+#if !defined(__CYGWIN32__) && defined(__hpux) && !defined(__GNUC__)
+#include <stdlib.h>
+#endif
=20
@@ -196,2 +203,5 @@ typedef struct __sFILE {
=20
+#undef feof
+#undef ferror
+#undef clearerr
#define feof(p) __sfeof(p)
@@ -205,6 +215,2 @@ typedef struct __sFILE {
=20
-#if defined(__hpux) && !defined(__GNUC__) || defined(__DECC)
-#include <string.h>
-#endif
-
/*
@@ -305,6 +311,2 @@ static int BSD__sfvwrite(fp, uio)
=20
-#if !defined(__CYGWIN32__) && defined(__hpux) && !defined(__GNUC__)
-#include <stdlib.h>
-#endif
-
/*
 
G

Gerardo Santana Gómez Garrido

2005/11/20 said:
Hi,

In message "Re: Building Ruby 1.8.2 on HP-UX 10.20"
|I manually applied the patch to ruby-1.8.3/missing/vsnprintf.c and it
|seems that fixed something, but I got new errors:

Try the attached patch, please.

|Again, if I use -Aa it works, but then I get:

Hmm, it must be a difficult bug to fix. I wish I could have access to
the HP-UX box.

Just in case you haven't noticed yet, I've sent you in private the
information needed to log in to the server.

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top