From: Stuart Holden Date: 2007-10-17T22:08:15+09:00 Subject: Building Ruby on HPUX + readline support Hi, I have successfully managed to build Ruby 1.8.6 on HP-UX, but when using irb it crashes when the cursor keys or escape keys are used. I believe that I need to rebuild Ruby with readline support enabled. In order to do this, I downloaded the gnu readline source and built and installed that to $HOME/lib (I don't have access to write to /usr/lib): export CC="cc ���Ae" ./configure --prefix=$HOME make make install This worked fine. Next, I configured the build process to include readline support: export CC="cc -Ae" ./configure --prefix=/home/host/ruby-1.8.6 --with-readline-dir=$HOME Then ran make. It when compiling readline failed with the following error: compiling readline cc -Ae -I. -I../.. -I../../. -I../.././ext/readline -DHAVE_READLINE_READLINE_H -DHAVE_READLINE_HISTORY_H -DHAVE_RL_FILENAME_COMPLETION_FUNCTION -DHAVE_RL_USERNAME_COMPLETION_FUNCTION -DHAVE_RL_COMPLETION_MATCHES -DHAVE_RL_DEPREP_TERM_FUNCTION -DHAVE_RL_COMPLETION_APPEND_CHARACTER -DHAVE_RL_BASIC_WORD_BREAK_CHARACTERS -DHAVE_RL_COMPLETER_WORD_BREAK_CHARACTERS -DHAVE_RL_BASIC_QUOTE_CHARACTERS -DHAVE_RL_COMPLETER_QUOTE_CHARACTERS -DHAVE_RL_FILENAME_QUOTE_CHARACTERS -DHAVE_RL_ATTEMPTED_COMPLETION_OVER -DHAVE_RL_LIBRARY_VERSION -DHAVE_RL_EVENT_HOOK -DHAVE_RL_CLEANUP_AFTER_SIGNAL -DHAVE_RL_CLEAR_SIGNALS -DHAVE_RL_VI_EDITING_MODE -DHAVE_RL_EMACS_EDITING_MODE -DHAVE_RL_CLEAR_SIGNALS -DHAVE_REPLACE_HISTORY_ENTRY -DHAVE_REMOVE_HISTORY -I/home/host/include +Z -g -c readline.c ld -b -E -L"../.." -L"/home/host/lib" -o ../../.ext/hppa2.0w-hpux11.11/readline.sl readline.o -lreadline -ltermcap -ldld -lcrypt -lm -lc ld: Invalid loader fixup in text space needed in output file for symbol "$00000035" in input file: "/home/host/lib/libreadline.a(bind.o)". Make sure it was compiled with +z/+Z. *** Error exit code 1 Stop. *** Error exit code 1 Taking the advice, I rebuilt readline using the +Z flag: export CC="cc ���Ae +Z" ./configure --prefix=$HOME make make install Again, this worked. So I tried to build ruby again export CC="cc -Ae +Z" ./configure --prefix=/home/host/ruby-1.8.6 --with-readline-dir=$HOME This time, similar error, but complaining about /usr/lib/libtermcap.a. compiling readline ld -b -E -L"../.." -L"/home/host/lib" -o ../../.ext/hppa2.0w-hpux11.11/readline.sl readline.o -lreadline -ltermcap -ldld -lcrypt -lm -lc ld: Invalid loader fixup in text space needed in output file for symbol "$00000008" in input file: "/usr/lib/libtermcap.a(tparm.o)". Make sure it was compiled with +z/+Z. *** Error exit code 1 Stop. *** Error exit code 1 Stop. Unfortunately I do not have access to /usr/lib/libtermcap.a and can't rebuild it. Can anybody offer any advice? Am I on the right track in thinking that the IRB problems are to do with readline support, or have I gone about this completely wrong? Thanks, Stu -- Posted via http://www.ruby-forum.com/.