Building Ruby 1.9 in HP-UX IA 11.31

Hi all,

Has anyone tried to build Ruby 1.9 on the HP-UX 11.31 platform?
I have have attached the full config and gmake log.

This is where the make dies:

./miniruby -I./lib -I.ext/common -I./- -r./ext/purelib.rb -I.
-rrbconfig ./tool/compile_prelude.rb ./prelude.rb ./enc/prelude.rb
./gem_prelude.rb prelude.c
cc -g +Z -I. -I.ext/include/ia64-hpux11.31 -I./include -I.
-DRUBY_EXPORT -o prelude.o -c prelude.c
ar rcu libruby-static.a dln.o encoding.o array.o bignum.o class.o
compar.o complex.o dir.o enum.o enumerator.o error.o eval.o load.o
proc.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 random.o range.o rational.o re.o
regcomp.o regenc.o regerror.o regexec.o regparse.o regsyntax.o ruby.o
safe.o signal.o sprintf.o st.o strftime.o string.o struct.o time.o
transcode.o util.o variable.o version.o compile.o debug.o iseq.o vm.o
vm_dump.o thread.o cont.o ascii.o us_ascii.o unicode.o utf_8.o newline.o
isinf.o strlcpy.o strlcat.o ia64.o prelude.o dmyext.o
ld -b -E dln.o encoding.o array.o bignum.o class.o compar.o complex.o
dir.o enum.o enumerator.o error.o eval.o load.o proc.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 random.o range.o rational.o re.o regcomp.o regenc.o regerror.o
regexec.o regparse.o regsyntax.o ruby.o safe.o signal.o sprintf.o st.o
strftime.o string.o struct.o time.o transcode.o util.o variable.o
version.o compile.o debug.o iseq.o vm.o vm_dump.o thread.o cont.o
ascii.o us_ascii.o unicode.o utf_8.o newline.o isinf.o strlcpy.o
strlcat.o ia64.o prelude.o dmyext.o -lpthread -lrt -ldld -ldl -lm -o
libruby.sl.1.9.1
w -L ‘Init_*’ libruby.sl.1.9.1
Bad flag -L
Usage: w [ -hlsuw ] [ user ]
w [-c] [-p[pset_list]]
gmake: [libruby.sl.1.9.1] Error 1 (ignored)
./miniruby -I./lib -I.ext/common -I./- -r./ext/purelib.rb
./tool/generic_erb.rb -c -o encdb.h ./template/encdb.h.tmpl ./enc enc
encdb.h updated
gmake -f enc.mk RUBY="./miniruby -I./lib -I.ext/common -I./-
-r./ext/purelib.rb " MINIRUBY="./miniruby -I./lib -I.ext/common -I./-
-r./ext/purelib.rb " enc
gmake[1]: Entering directory /home/ext10578/dev/src/ruby-1.9.1-p376' cc -I. -I.ext/include/ia64-hpux11.31 -I./include -I. -D_FILE_OFFSET_BITS=64 -DONIG_ENC_REGISTER=rb_enc_register +Z -g +Z -o enc/encdb.o -c ./enc/encdb.c ld -b -o .ext/ia64-hpux11.31/enc/encdb.sl enc/encdb.o -L. -L. -L. -E -R /home/ext10578/dev/builds/ruby/lib -L/home/ext10578/dev/builds/ruby/lib -lruby -lpthread -lrt -ldld -ldl -lm ld: Bad text origin argument: /home/ext10578/dev/builds/ruby/lib Fatal error. gmake[1]: *** [.ext/ia64-hpux11.31/enc/encdb.sl] Error 1 gmake[1]: Leaving directory/home/ext10578/dev/src/ruby-1.9.1-p376’
gmake: *** [enc] Error 2

On Feb 11, 2010, at 03:58 , Sebastian (syepes) wrote:

Has anyone tried to build Ruby 1.9 on the HP-UX 11.31 platform?
I have have attached the full config and gmake log.

You’d be better off writing ruby-core@

After searching around and doing some more testing I have managed to
build Ruby 1.9 on HP-UX 11.31.

These are some the the additional depots I have in this server:
openssl 0.9.8k
ncurses 5.7
make 3.81

This is the magic line:
CC=“cc -Ae” CFLAGS="-O" CPPFLAGS="-I/usr/local/include"
LIBS="-L/usr/local/lib/hpux32" ./configure
–prefix=/home/ext10578/dev/builds/ruby --disable-install-doc
–enable-pthread --enable-shared --without-gcc --disable-rpath

ruby -v

ruby 1.9.1p376 (2009-12-07 revision 26041) [ia64-hpux11.31]

file ruby
ruby: ELF-32 executable object file - IA64

ldd ruby

    libruby.sl =>   /home/ext10578/dev/builds/ruby/lib/libruby.sl
    libpthread.so.1 =>      /usr/lib/hpux32/libpthread.so.1
    librt.so.1 =>   /usr/lib/hpux32/librt.so.1
    libdl.so.1 =>   /usr/lib/hpux32/libdl.so.1
    libm.so.1 =>    /usr/lib/hpux32/libm.so.1
    libc.so.1 =>    /usr/lib/hpux32/libc.so.1
    libpthread.so.1 =>      /usr/lib/hpux32/libpthread.so.1
    librt.so.1 =>   /usr/lib/hpux32/librt.so.1
    libdl.so.1 =>   /usr/lib/hpux32/libdl.so.1
    libm.so.1 =>    /usr/lib/hpux32/libm.so.1
    libdl.so.1 =>   /usr/lib/hpux32/libdl.so.1

Hope this helps anyone out there using the HP-UX platform.

Just a minor update on building Ruby 1.9 on HP-UX 11.31, in the previous
post the ruby was not built with zlib support (linked) and this is
needed if you want to use rubygems and install gem’s.

Additional depots:
zlib 1.2.3

You’ll need you define this variable in your .profile
export
LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib/hpux32:$LD_LIBRARY_PATH

The new magic line:
CC=“cc -Ae” CFLAGS="-O" CPPFLAGS="-I/usr/local/include"
LDFLAGS="-L/usr/local/lib/hpux32" LIBS=" -L/usr/local/lib/hpux32 -lz"
./configure --prefix=/opt/ruby --disable-install-doc --enable-pthread
–enable-shared --without-gcc --disable-rpath

ldd /opt/ruby/bin/ruby

    libruby.sl =>   /opt/ruby/lib/libruby.sl
    libpthread.so.1 =>      /usr/lib/hpux32/libpthread.so.1
    librt.so.1 =>   /usr/lib/hpux32/librt.so.1
    libdl.so.1 =>   /usr/lib/hpux32/libdl.so.1
    libm.so.1 =>    /usr/lib/hpux32/libm.so.1
    libz.so =>      /usr/local/lib/hpux32/libz.so  <--- Now it's 

linked
libc.so.1 => /usr/lib/hpux32/libc.so.1
libpthread.so.1 => /usr/lib/hpux32/libpthread.so.1
librt.so.1 => /usr/lib/hpux32/librt.so.1
libdl.so.1 => /usr/lib/hpux32/libdl.so.1
libm.so.1 => /usr/lib/hpux32/libm.so.1
libz.so => /usr/local/lib/hpux32/libz.so
libdl.so.1 => /usr/lib/hpux32/libdl.so.1

Have fun.