Failure trying to build Ruby 1.8.6 on HP-UX 11

Hi all,

djberge@td191> uname -a
HP-UX td191 B.11.31 U 9000/800 3397116299 unlimited-user license

djberge@td191> what which cc
/usr/bin/cc:
$Revision: 92453-07 linker linker crt0.o B.11.53 060807 $
LINT B.11.X.36086-36089-36092.GP CXREF B.11.X.
36086-36089-36092.GP
HP92453-01 B.11.X.36086-36089-36092.GP HP C Compiler
$ PATCH/11.00:PHCO_27774 Oct 3 2002 09:45:59 $

djberge@td191> echo $CC
cc -Ae -s

When I try to build Ruby 1.8.6 I get this:

cc -Ae -s -DRUBY_EXPORT -DYYMAXDEPTH=300 -I. -I. -c parse.c
cc: “parse.y”, line 4446: warning 527: Integral value implicitly
converted to pointer in assignment.
cc: “parse.y”, line 4449: error 1530: Undefined struct or union.
cc: “parse.y”, line 4451: error 1530: Undefined struct or union.
cc: “parse.y”, line 4451: warning 563: Argument #1 is not the correct
type.
cc: “parse.y”, line 4452: error 1530: Undefined struct or union.
cc: “parse.y”, line 4454: error 1530: Undefined struct or union.
cc: “parse.y”, line 4454: error 1563: Expression in if must be scalar.
cc: “parse.y”, line 4464: error 1530: Undefined struct or union.
cc: “parse.y”, line 4466: error 1530: Undefined struct or union.
cc: “parse.y”, line 4466: error 1530: Undefined struct or union.
cc: “parse.y”, line 4466: error 1563: Expression in if must be scalar.
cc: “parse.y”, line 4468: error 1530: Undefined struct or union.
*** Error exit code 1

I see from older posts (including one of my own) that others have had
this problem. The old solution of sticking “#define inline” in
config.h did not work, though.

Any ideas?

BTW, you can get access to HP-UX (and OpenVMS, Linux, Windows 2003
Server and FreeBSD 6.2) via the HP testdrive program at
http://www.testdrive.hp.com
(which is what I’m using in an attempt to get some platform info for
rubygems).

Regards,

Dan

If I rememeber correctly from my own attempts to build Ruby on
HP-UX, one of the issues is that HP’s make is broken and
incorrectly thinks parse.y is out of date, trying to regenerate it
with HP’s yacc, which is also broken.

Things generally get much better if you use the GNU toolchain (make,
bison, gcc) rather than HP’s. But note that you’ll still need to
disable IPv6 support or else the socket library won’t actually work
(because HP’s IPv6 support is broken).

Also, make sure that the linker patches are up-to-date, or you may
run into linker issues down the road.

-mental

On Aug 21, 12:46 pm, Daniel B. [email protected] wrote:

    HP92453-01 B.11.X.36086-36089-36092.GP HP C Compiler
     $ PATCH/11.00:PHCO_27774  Oct  3 2002 09:45:59 $

djberge@td191> echo $CC
cc -Ae -s

When I try to build Ruby 1.8.6 I get this:

Ok, the problem went away when I installed gperf. The only other
quirks I noticed is that you have to run make twice - the first one
fails, but then the second works - and that ext/curses may cause the
build to fail. I simply removed ext/curses altogether, but I think
older posts have better soltuions.

Regards,

Dan

I am guessing that cc doesn’t integrate directoy with yacc/flex/bison/
etc. parse.y isn’t C code.

MenTaLguY wrote:

If I rememeber correctly from my own attempts to build Ruby on
HP-UX, one of the issues is that HP’s make is broken and
incorrectly thinks parse.y is out of date, trying to regenerate it
with HP’s yacc, which is also broken.

There’s definitely something odd going on, but I managed to build and
install gperf, which solved it.

Things generally get much better if you use the GNU toolchain (make,
bison, gcc) rather than HP’s. But note that you’ll still need to
disable IPv6 support or else the socket library won’t actually work
(because HP’s IPv6 support is broken).

Yes, I can’t say I’m too impressed with the HP-UX libraries or
toolchain. Unfortunately, we do have a couple of HP-UX machines at work,
so I still like to support it when I can.

Also, make sure that the linker patches are up-to-date, or you may
run into linker issues down the road.

I hit one already trying to build zlib. :frowning:

Thanks,

Dan