Forum: Ruby Building Ruby 1.8.2 on HP-UX 10.20

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
gerardo.santana (Guest)
on 2005-11-19 22:59
(Received via mailing list)
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".
cc: "/usr/include/stdio.h", line 173: error 1000: Unexpected symbol:
"(".
cc: "/usr/include/stdio.h", line 173: error 1000: Unexpected symbol:
"->".
cc: "/usr/include/stdio.h", line 173: error 1000: Unexpected symbol:
"&=".
cc: "/usr/include/stdio.h", line 174: error 1000: Unexpected symbol:
"*".
cc: "/usr/include/stdio.h", line 174: error 1000: Unexpected symbol:
"->".
cc: "/usr/include/stdio.h", line 174: error 1000: Unexpected symbol:
")".
cc: "/usr/include/stdio.h", line 174: error 1000: Unexpected symbol:
")".
cc: "/usr/include/stdio.h", line 31: error 1584: Inconsistent type
declaration: "FILE".
cc: "/usr/include/stdio.h", line 173: error 1506: Parameters allowed
in function definition only.
cc: "/usr/include/stdio.h", line 175: error 1000: Unexpected symbol:
"*".
cc: "/usr/include/stdio.h", line 175: error 1000: Unexpected symbol:
"->".
cc: "/usr/include/stdio.h", line 175: error 1000: Unexpected symbol:
")".
cc: "/usr/include/stdio.h", line 175: error 1000: Unexpected symbol:
")".
cc: "/usr/include/stdio.h", line 174: warning 558: Empty declaration.
cc: "/usr/include/stdio.h", line 253: error 1000: Unexpected symbol:
"FILE".
cc: "/usr/include/stdio.h", line 254: error 1000: Unexpected symbol:
"FILE".
cc: "/usr/include/stdio.h", line 269: error 1000: Unexpected symbol:
"FILE".
cc: "/usr/include/stdio.h", line 270: error 1000: Unexpected symbol:
"*".
cc: "/usr/include/stdio.h", line 339: error 1000: Unexpected symbol:
"*".
cc: "/usr/include/stdio.h", line 339: error 1000: Unexpected symbol:
"->".
cc: "/usr/include/stdio.h", line 340: error 1000: Unexpected symbol:
"*".
cc: error 2017: Cannot recover from earlier errors, terminating.
*** Error exit code 1

Stop.
----------->8-------------

I can "fix it" changing -Ae for -Aa, but when the building process
runs miniruby to run every extconf.rb, it breaks in lib/mkmf.rb saying
a block was not given to checking_for (when checking for the existence
of windows.h), which is non sense.

Any idea?
kero (Guest)
on 2005-11-20 15:48
(Received via mailing list)
> 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.
gerardo.santana (Guest)
on 2005-11-20 18:33
(Received via mailing list)
Thanks Kero

2005/11/20, Kero <removed_email_address@domain.invalid>:
> 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=view;name=HP-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 :(
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
decoux (Guest)
on 2005-11-20 18:49
(Received via mailing list)
>>>>> "G" == =?ISO-8859-1?Q?Gerardo S. G=F3mez Garrido?= <ISO-8859-1> writes:

G> http://www.ruby-lang.org/ja/install.cgi?cmd=view;name=HP-UX

 You have an online translator at

   http://www.excite.co.jp/world/english/web/

 Select the right checkbox

 Sometimes it give something funny :-)


Guy Decoux
matz (Guest)
on 2005-11-20 20:14
(Received via mailing list)
Hi,

In message "Re: Building Ruby 1.8.2 on HP-UX 10.20"
    on Sun, 20 Nov 2005 05:57:42 +0900, Gerardo S. Gómez Garrido
<removed_email_address@domain.invalid> 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 <stddef.h>
+#if defined(__hpux) && !defined(__GNUC__) || defined(__DECC)
+#include <string.h>
+#endif
+
+#if !defined(__CYGWIN32__) && defined(__hpux) && !defined(__GNUC__)
+#include <stdlib.h>
+#endif

@@ -205,6 +212,2 @@ typedef	struct __sFILE {

-#if defined(__hpux) && !defined(__GNUC__) || defined(__DECC)
-#include <string.h>
-#endif
-
 /*
@@ -305,6 +308,2 @@ static int BSD__sfvwrite(fp, uio)

-#if !defined(__CYGWIN32__) && defined(__hpux) && !defined(__GNUC__)
-#include <stdlib.h>
-#endif
-
 /*
gerardo.santana (Guest)
on 2005-11-20 20:50
(Received via mailing list)
(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 M. <removed_email_address@domain.invalid>:
gerardo.santana (Guest)
on 2005-11-21 01:44
(Received via mailing list)
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, Gerardo S. Gómez Garrido <removed_email_address@domain.invalid>:
matz (Guest)
on 2005-11-21 02:00
(Received via mailing list)
Hi,

In message "Re: Building Ruby 1.8.2 on HP-UX 10.20"
    on Mon, 21 Nov 2005 03:48:56 +0900, Gerardo S. Gómez Garrido
<removed_email_address@domain.invalid> writes:

|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

@@ -196,2 +203,5 @@ typedef	struct __sFILE {

+#undef feof
+#undef ferror
+#undef clearerr
 #define	feof(p)		__sfeof(p)
@@ -205,6 +215,2 @@ typedef	struct __sFILE {

-#if defined(__hpux) && !defined(__GNUC__) || defined(__DECC)
-#include <string.h>
-#endif
-
 /*
@@ -305,6 +311,2 @@ static int BSD__sfvwrite(fp, uio)

-#if !defined(__CYGWIN32__) && defined(__hpux) && !defined(__GNUC__)
-#include <stdlib.h>
-#endif
-
 /*
gerardo.santana (Guest)
on 2005-11-21 08:39
(Received via mailing list)
2005/11/20, Yukihiro M. <removed_email_address@domain.invalid>:
> |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
This topic is locked and can not be replied to.