From: "HOLOWKO,LARS (A-Germany,ex1)" Date: 2001-01-16T17:57:42+09:00 Subject: [ruby-talk:9368] Ruby 1.6.2 compilation problems on HP-UX 11 with gcc 2.95.2 with optimizations Trying to build Ruby like this ./configure --prefix=/opt/gnu make results in: [...] gcc -I. -O -I. -I. -I/opt/gnu/include -c ./missing/flock.c gcc -I. -O -I. -I. -I/opt/gnu/include -c ./missing/isinf.c gcc -I. -O -I. -I. -I/opt/gnu/include -c ./missing/finite.c gcc -O -I. -I. -I/opt/gnu/include -c dmyext.c ar rcu libruby.a array.o bignum.o class.o compar.o dir.o dln.o enum.o error.o eval.o file.o gc.o hash.o inits.o io.o marshal.o math.o numeric.o object.o pack.o parse.o process.o prec.o random.o range.o re.o regex.o ruby.o signal.o sprintf.o st.o string.o struct.o time.o util.o variable.o version.o flock.o isinf.o finite.o dmyext.o gcc -O -I. -I. -I/opt/gnu/include -c main.c gcc -O -Wl,-E main.o dmyext.o libruby.a -ldld -lcrypt -lm -o miniruby make: *** [rbconfig.rb] Segmentation fault (core dumped) Compiling with -O2 -g doesn't help either. The only thing I can do to build ruby is to omit any optimization flags which isn't recommended in a production environment. So it looks like a gcc bug. When I selectively compile the c-files with optimization, I sometimes get a different result: *.c with -O2 eval.c, gc.c and [m-q]*.c [s-z]*.c without opt results in a working executable. But when I compile e.g. eval.c with -O2 I get this error message during linkage: gcc -O -Wl,-E main.o dmyext.o libruby.a -ldld -lcrypt -lm -o miniruby ./mkconfig.rb:48: stack level too deep (SystemStackError) from ./mkconfig.rb:29:in `foreach' from ./mkconfig.rb:29 make: *** [rbconfig.h] Error 1 Any idea or did someone have more success on HP-UX 11 with gcc or may someone out there provide a optimized binary of ruby compiled with the a comercial compiler, to which I don't have access to? Regards, Lars