HPUX and ruby 1.8preview2 compile error

I’m trying to compile ruby 1.8-preview2 for HPUX 11.0. I get these errors if I
use GCC 3.2 or cc.

First, in strftime.c:
#ifdef SOLARIS
extern long timezone, altzone;
#else
extern int timezone, altzone;
#endif

should be modified such that HPUX is also defining timezone as a long (like
SOLARIS). The following worked for me on both compilers but it might not be
the right way:

#if defined(SOLARIS) || defined(__hpux)
extern long timezone, altzone;
#else
extern int timezone, altzone;
#endif

When that problem is corrected, then altzone shows up as an unresolved symbol
when trying to link miniruby:

cc:
cc -g -Wl,-E main.o dmyext.o libruby-static.a -ldld -lcrypt -lm -o miniruby
/usr/ccs/bin/ld: Unsatisfied symbols:
altzone (first referenced in libruby-static.a(eval.o)) (data)

gcc 3.2:
gcc -g -O2 -Wl,-E main.o dmyext.o libruby-static.a -ldld -lcrypt -lm
-o miniruby
/usr/ccs/bin/ld: Unsatisfied symbols:
altzone (first referenced in libruby-static.a(eval.o)) (data)
collect2: ld returned 1 exit status

Any suggestions? We’ve been happily using a CVS snapshot from over a year ago
but just found a bug in our snapshot in the marshaling module, so must now
upgrade :frowning:

···


---------------------------------------------- | ----------------------
Brett Williams |

Agilent Technologies brettw@ftc.agilent.com

Any suggestions?

It's corrected in the CVS version, perhaps you must use this version

Guy Decoux

Thanks for the quick response, I will try that immediately.

···

On Mar 27, ts wrote:

Any suggestions?

It’s corrected in the CVS version, perhaps you must use this version