Thursday, June 7, 2018

Buidling GNU readline 5.1

The basic building strategy and general assumptions have been detailed on a previous post: Staged Building:

 $ pwd
/stage/build

$ ./gnu-build-preparation ../source/.../readline-5.1.tar.gz
...

$ cd readline/readline-5.1-32

$ source ../setenv-5.1 32

Configuration file [version 4]: /stage/build/readline/ld.config-32 
 Platform:     32-bit LSB 80386
 Default Library Path (ELF):   /opt/gnu/lib:/opt/usr/lib:/lib:/usr/lib
 Trusted Directories (ELF):    /lib/secure:/usr/lib/secure  (... default)

Command line:
  crle 

   -c /stage/build/readline/ld.config-32 
   -l /opt/gnu/lib:/opt/usr/lib:/lib:/usr/lib

LD_CONFIG_32=/stage/build/readline/ld.config-32

CONFIG_SHELL=

CC=/usr/bin/gcc CFLAGS=-m32 -march=nocona -mtune=nocona -std=gnu89

CXX=/usr/bin/g++ CXXFLAGS=-m32 -march=nocona -mtune=nocona -std=gnu++98

LD=/usr/bin/ld LDFLAGS=-m32 -march=nocona -mtune=nocona

PATH=/opt/gnu/bin:/opt/usr/bin:/usr/gnu/bin:/usr/bin:/usr/sbin

PKG_CONFIG_PATH=/opt/usr/lib/pkgconfig

Suggested build sequence:

Fine-tune/fix config.h.in, Makefile.in and others...

$ ./configure \
    --build=i386-pc-solaris2.11 \
    --prefix=/opt/... \
    ...

$ gmake -j2

$ su
# source ../setenv-5.1 32

For IPS package:

# gmake DESTDIR=/stage/prototype/readline/5.1/32 install

For immediate use:

# gmake install
# zfs snapshot -r .../opt/...@readline-5.1


$ ./configure \
  --build=i386-pc-solaris2.11 \
  --prefix=/opt/gnu \
  --with-curses
checking build system type... i386-pc-solaris2.11
checking host system type... i386-pc-solaris2.11

Beginning configuration for readline-5.1 for i386-pc-solaris2.11

checking whether make sets $(MAKE)... yes
checking for gcc... /usr/bin/gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /usr/bin/gcc accepts -g... yes
checking for /usr/bin/gcc option to accept ANSI C... none needed
checking how to run the C preprocessor... /usr/bin/gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether /usr/bin/gcc needs -traditional... no
checking for a BSD-compatible install... /usr/bin/ginstall -c
checking for ar... ar
checking for ranlib... ranlib
checking for an ANSI C-conforming const... yes
checking for function prototypes... yes
checking whether char is unsigned... no
checking return type of signal handlers... void
checking for size_t... yes
checking for ssize_t... yes
checking for ANSI C header files... (cached) yes
checking whether stat file-mode macros are broken... no
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking for fcntl... yes
checking for kill... yes
checking for lstat... yes
checking for memmove... yes
checking for putenv... yes
checking for select... yes
checking for setenv... yes
checking for setlocale... yes
checking for strcasecmp... yes
checking for strpbrk... yes
checking for tcgetattr... yes
checking for vsnprintf... yes
checking for isascii... yes
checking for isxdigit... yes
checking for getpwent... yes
checking for getpwnam... yes
checking for getpwuid... yes
checking for working strcoll... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking for unistd.h... (cached) yes
checking for stdlib.h... (cached) yes
checking varargs.h usability... yes
checking varargs.h presence... yes
checking for varargs.h... yes
checking stdarg.h usability... yes
checking stdarg.h presence... yes
checking for stdarg.h... yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking pwd.h usability... yes
checking pwd.h presence... yes
checking for pwd.h... yes
checking for memory.h... (cached) yes
checking termcap.h usability... no
checking termcap.h presence... no
checking for termcap.h... no
checking termios.h usability... yes
checking termios.h presence... yes
checking for termios.h... yes
checking termio.h usability... yes
checking termio.h presence... yes
checking for termio.h... yes
checking sys/pte.h usability... yes
checking sys/pte.h presence... yes
checking for sys/pte.h... yes
checking sys/stream.h usability... yes
checking sys/stream.h presence... yes
checking for sys/stream.h... yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking sys/file.h usability... yes
checking sys/file.h presence... yes
checking for sys/file.h... yes
checking for sys/ptem.h... yes
checking for type of signal functions... posix
checking if signal handlers must be reinstalled when invoked... no
checking for presence of POSIX-style sigsetjmp/siglongjmp... present
checking for lstat... yes
checking whether or not strcoll and strcmp differ... no
checking whether the ctype macros accept non-ascii characters... no
checking whether getpw functions are declared in pwd.h... yes
checking whether termios.h defines TIOCGWINSZ... yes
checking whether signal handlers are of type void... yes
checking for TIOCSTAT in sys/ioctl.h... no
checking for FIONREAD in sys/ioctl.h... no
checking for speed_t in sys/types.h... no
checking for struct winsize in sys/ioctl.h and termios.h... termios.h
checking for struct dirent.d_ino... yes
checking for struct dirent.d_fileno... no
checking for tgetent... no
checking for tgetent in -ltermcap... yes
checking which library has the termcap functions... using libtermcap
checking wctype.h usability... yes
checking wctype.h presence... yes
checking for wctype.h... yes
checking wchar.h usability... yes
checking wchar.h presence... yes
checking for wchar.h... yes
checking langinfo.h usability... yes
checking langinfo.h presence... yes
checking for langinfo.h... yes
checking for mbsrtowcs... yes
checking for mbrtowc... yes
checking for mbrlen... yes
checking for wctomb... yes
checking for wcwidth... yes
checking for wcsdup... yes
checking for mbstate_t... yes
checking for nl_langinfo and CODESET... yes
checking configuration for building shared libraries... supported
configure: creating ./config.status
config.status: creating Makefile
config.status: creating doc/Makefile
config.status: creating examples/Makefile
config.status: creating shlib/Makefile
config.status: creating config.h
config.status: executing default commands


$ gmake -j2
rm -f readline.o
rm -f vi_mode.o
/usr/bin/gcc -c -DHAVE_CONFIG_H    -I. -I. -DRL_LIBRARY_VERSION='"5.1"' -m32 -march=nocona -mtune=nocona -std=gnu89 readline.c
/usr/bin/gcc -c -DHAVE_CONFIG_H    -I. -I. -DRL_LIBRARY_VERSION='"5.1"' -m32 -march=nocona -mtune=nocona -std=gnu89 vi_mode.c
rm -f funmap.o
/usr/bin/gcc -c -DHAVE_CONFIG_H    -I. -I. -DRL_LIBRARY_VERSION='"5.1"' -m32 -march=nocona -mtune=nocona -std=gnu89 funmap.c
rm -f keymaps.o
/usr/bin/gcc -c -DHAVE_CONFIG_H    -I. -I. -DRL_LIBRARY_VERSION='"5.1"' -m32 -march=nocona -mtune=nocona -std=gnu89 keymaps.c
rm -f parens.o
/usr/bin/gcc -c -DHAVE_CONFIG_H    -I. -I. -DRL_LIBRARY_VERSION='"5.1"' -m32 -march=nocona -mtune=nocona -std=gnu89 parens.c
rm -f search.o
/usr/bin/gcc -c -DHAVE_CONFIG_H    -I. -I. -DRL_LIBRARY_VERSION='"5.1"' -m32 -march=nocona -mtune=nocona -std=gnu89 search.c
rm -f rltty.o
/usr/bin/gcc -c -DHAVE_CONFIG_H    -I. -I. -DRL_LIBRARY_VERSION='"5.1"' -m32 -march=nocona -mtune=nocona -std=gnu89 rltty.c
rm -f complete.o
/usr/bin/gcc -c -DHAVE_CONFIG_H    -I. -I. -DRL_LIBRARY_VERSION='"5.1"' -m32 -march=nocona -mtune=nocona -std=gnu89 complete.c
rm -f bind.o
/usr/bin/gcc -c -DHAVE_CONFIG_H    -I. -I. -DRL_LIBRARY_VERSION='"5.1"' -m32 -march=nocona -mtune=nocona -std=gnu89 bind.c
bind.c: In function `rl_function_of_keyseq':
bind.c:682: warning: comparison is always true due to limited range of data type
rm -f isearch.o
/usr/bin/gcc -c -DHAVE_CONFIG_H    -I. -I. -DRL_LIBRARY_VERSION='"5.1"' -m32 -march=nocona -mtune=nocona -std=gnu89 isearch.c
rm -f display.o
/usr/bin/gcc -c -DHAVE_CONFIG_H    -I. -I. -DRL_LIBRARY_VERSION='"5.1"' -m32 -march=nocona -mtune=nocona -std=gnu89 display.c
rm -f signals.o
/usr/bin/gcc -c -DHAVE_CONFIG_H    -I. -I. -DRL_LIBRARY_VERSION='"5.1"' -m32 -march=nocona -mtune=nocona -std=gnu89 signals.c
display.c: In function `rl_character_len':
display.c:1831: warning: comparison is always true due to limited range of data type
rm -f util.o
/usr/bin/gcc -c -DHAVE_CONFIG_H    -I. -I. -DRL_LIBRARY_VERSION='"5.1"' -m32 -march=nocona -mtune=nocona -std=gnu89 util.c
rm -f kill.o
/usr/bin/gcc -c -DHAVE_CONFIG_H    -I. -I. -DRL_LIBRARY_VERSION='"5.1"' -m32 -march=nocona -mtune=nocona -std=gnu89 kill.c
rm -f undo.o
/usr/bin/gcc -c -DHAVE_CONFIG_H    -I. -I. -DRL_LIBRARY_VERSION='"5.1"' -m32 -march=nocona -mtune=nocona -std=gnu89 undo.c
rm -f macro.o
/usr/bin/gcc -c -DHAVE_CONFIG_H    -I. -I. -DRL_LIBRARY_VERSION='"5.1"' -m32 -march=nocona -mtune=nocona -std=gnu89 macro.c
rm -f input.o
/usr/bin/gcc -c -DHAVE_CONFIG_H    -I. -I. -DRL_LIBRARY_VERSION='"5.1"' -m32 -march=nocona -mtune=nocona -std=gnu89 input.c
rm -f callback.o
/usr/bin/gcc -c -DHAVE_CONFIG_H    -I. -I. -DRL_LIBRARY_VERSION='"5.1"' -m32 -march=nocona -mtune=nocona -std=gnu89 callback.c
rm -f terminal.o
rm -f text.o
/usr/bin/gcc -c -DHAVE_CONFIG_H    -I. -I. -DRL_LIBRARY_VERSION='"5.1"' -m32 -march=nocona -mtune=nocona -std=gnu89 terminal.c
/usr/bin/gcc -c -DHAVE_CONFIG_H    -I. -I. -DRL_LIBRARY_VERSION='"5.1"' -m32 -march=nocona -mtune=nocona -std=gnu89 text.c
rm -f nls.o
/usr/bin/gcc -c -DHAVE_CONFIG_H    -I. -I. -DRL_LIBRARY_VERSION='"5.1"' -m32 -march=nocona -mtune=nocona -std=gnu89 nls.c
rm -f misc.o
/usr/bin/gcc -c -DHAVE_CONFIG_H    -I. -I. -DRL_LIBRARY_VERSION='"5.1"' -m32 -march=nocona -mtune=nocona -std=gnu89 misc.c
rm -f compat.o
/usr/bin/gcc -c -DHAVE_CONFIG_H    -I. -I. -DRL_LIBRARY_VERSION='"5.1"' -m32 -march=nocona -mtune=nocona -std=gnu89 compat.c
rm -f xmalloc.o
/usr/bin/gcc -c -DHAVE_CONFIG_H    -I. -I. -DRL_LIBRARY_VERSION='"5.1"' -m32 -march=nocona -mtune=nocona -std=gnu89 xmalloc.c
rm -f history.o
/usr/bin/gcc -c -DHAVE_CONFIG_H    -I. -I. -DRL_LIBRARY_VERSION='"5.1"' -m32 -march=nocona -mtune=nocona -std=gnu89 history.c
rm -f histexpand.o
/usr/bin/gcc -c -DHAVE_CONFIG_H    -I. -I. -DRL_LIBRARY_VERSION='"5.1"' -m32 -march=nocona -mtune=nocona -std=gnu89 histexpand.c
rm -f histfile.o
/usr/bin/gcc -c -DHAVE_CONFIG_H    -I. -I. -DRL_LIBRARY_VERSION='"5.1"' -m32 -march=nocona -mtune=nocona -std=gnu89 histfile.c
rm -f histsearch.o
/usr/bin/gcc -c -DHAVE_CONFIG_H    -I. -I. -DRL_LIBRARY_VERSION='"5.1"' -m32 -march=nocona -mtune=nocona -std=gnu89 histsearch.c
rm -f shell.o
/usr/bin/gcc -c -DHAVE_CONFIG_H    -I. -I. -DRL_LIBRARY_VERSION='"5.1"' -m32 -march=nocona -mtune=nocona -std=gnu89 shell.c
rm -f mbutil.o
/usr/bin/gcc -c -DHAVE_CONFIG_H    -I. -I. -DRL_LIBRARY_VERSION='"5.1"' -m32 -march=nocona -mtune=nocona -std=gnu89 mbutil.c
rm -f tilde.o
/usr/bin/gcc -DHAVE_CONFIG_H    -I. -I. -DRL_LIBRARY_VERSION='"5.1"' -m32 -march=nocona -mtune=nocona -std=gnu89 -DREADLINE_LIBRARY -c ./tilde.c
test -d shlib || mkdir shlib
( cd shlib ; gmake - --jobserver-fds=3,4 -j all )
gmake[1]: Entering directory `/stage/build/readline/readline-5.1-32/shlib'
rm -f readline.so
rm -f vi_mode.so
/usr/bin/gcc -c -DHAVE_CONFIG_H    -I. -I.. -I.. -DRL_LIBRARY_VERSION='"5.1"' -m32 -march=nocona -mtune=nocona -std=gnu89 -fpic -o readline.o ../readline.c
/usr/bin/gcc -c -DHAVE_CONFIG_H    -I. -I.. -I.. -DRL_LIBRARY_VERSION='"5.1"' -m32 -march=nocona -mtune=nocona -std=gnu89 -fpic -o vi_mode.o ../vi_mode.c
mv readline.o readline.so
rm -f funmap.so
/usr/bin/gcc -c -DHAVE_CONFIG_H    -I. -I.. -I.. -DRL_LIBRARY_VERSION='"5.1"' -m32 -march=nocona -mtune=nocona -std=gnu89 -fpic -o funmap.o ../funmap.c
mv vi_mode.o vi_mode.so
rm -f keymaps.so
/usr/bin/gcc -c -DHAVE_CONFIG_H    -I. -I.. -I.. -DRL_LIBRARY_VERSION='"5.1"' -m32 -march=nocona -mtune=nocona -std=gnu89 -fpic -o keymaps.o ../keymaps.c
mv funmap.o funmap.so
rm -f parens.so
/usr/bin/gcc -c -DHAVE_CONFIG_H    -I. -I.. -I.. -DRL_LIBRARY_VERSION='"5.1"' -m32 -march=nocona -mtune=nocona -std=gnu89 -fpic -o parens.o ../parens.c
mv keymaps.o keymaps.so
rm -f search.so
/usr/bin/gcc -c -DHAVE_CONFIG_H    -I. -I.. -I.. -DRL_LIBRARY_VERSION='"5.1"' -m32 -march=nocona -mtune=nocona -std=gnu89 -fpic -o search.o ../search.c
mv parens.o parens.so
rm -f rltty.so
/usr/bin/gcc -c -DHAVE_CONFIG_H    -I. -I.. -I.. -DRL_LIBRARY_VERSION='"5.1"' -m32 -march=nocona -mtune=nocona -std=gnu89 -fpic -o rltty.o ../rltty.c
mv search.o search.so
rm -f complete.so
/usr/bin/gcc -c -DHAVE_CONFIG_H    -I. -I.. -I.. -DRL_LIBRARY_VERSION='"5.1"' -m32 -march=nocona -mtune=nocona -std=gnu89 -fpic -o complete.o ../complete.c
mv rltty.o rltty.so
rm -f bind.so
/usr/bin/gcc -c -DHAVE_CONFIG_H    -I. -I.. -I.. -DRL_LIBRARY_VERSION='"5.1"' -m32 -march=nocona -mtune=nocona -std=gnu89 -fpic -o bind.o ../bind.c
../bind.c: In function `rl_function_of_keyseq':
../bind.c:682: warning: comparison is always true due to limited range of data type
mv complete.o complete.so
rm -f isearch.so
/usr/bin/gcc -c -DHAVE_CONFIG_H    -I. -I.. -I.. -DRL_LIBRARY_VERSION='"5.1"' -m32 -march=nocona -mtune=nocona -std=gnu89 -fpic -o isearch.o ../isearch.c
mv bind.o bind.so
rm -f display.so
/usr/bin/gcc -c -DHAVE_CONFIG_H    -I. -I.. -I.. -DRL_LIBRARY_VERSION='"5.1"' -m32 -march=nocona -mtune=nocona -std=gnu89 -fpic -o display.o ../display.c
mv isearch.o isearch.so
rm -f signals.so
/usr/bin/gcc -c -DHAVE_CONFIG_H    -I. -I.. -I.. -DRL_LIBRARY_VERSION='"5.1"' -m32 -march=nocona -mtune=nocona -std=gnu89 -fpic -o signals.o ../signals.c
../display.c: In function `rl_character_len':
../display.c:1831: warning: comparison is always true due to limited range of data type
mv signals.o signals.so
rm -f util.so
/usr/bin/gcc -c -DHAVE_CONFIG_H    -I. -I.. -I.. -DRL_LIBRARY_VERSION='"5.1"' -m32 -march=nocona -mtune=nocona -std=gnu89 -fpic -o util.o ../util.c
mv display.o display.so
rm -f kill.so
/usr/bin/gcc -c -DHAVE_CONFIG_H    -I. -I.. -I.. -DRL_LIBRARY_VERSION='"5.1"' -m32 -march=nocona -mtune=nocona -std=gnu89 -fpic -o kill.o ../kill.c
mv util.o util.so
rm -f undo.so
/usr/bin/gcc -c -DHAVE_CONFIG_H    -I. -I.. -I.. -DRL_LIBRARY_VERSION='"5.1"' -m32 -march=nocona -mtune=nocona -std=gnu89 -fpic -o undo.o ../undo.c
mv kill.o kill.so
rm -f macro.so
/usr/bin/gcc -c -DHAVE_CONFIG_H    -I. -I.. -I.. -DRL_LIBRARY_VERSION='"5.1"' -m32 -march=nocona -mtune=nocona -std=gnu89 -fpic -o macro.o ../macro.c
mv undo.o undo.so
rm -f input.so
/usr/bin/gcc -c -DHAVE_CONFIG_H    -I. -I.. -I.. -DRL_LIBRARY_VERSION='"5.1"' -m32 -march=nocona -mtune=nocona -std=gnu89 -fpic -o input.o ../input.c
mv macro.o macro.so
rm -f callback.so
/usr/bin/gcc -c -DHAVE_CONFIG_H    -I. -I.. -I.. -DRL_LIBRARY_VERSION='"5.1"' -m32 -march=nocona -mtune=nocona -std=gnu89 -fpic -o callback.o ../callback.c
mv input.o input.so
rm -f terminal.so
/usr/bin/gcc -c -DHAVE_CONFIG_H    -I. -I.. -I.. -DRL_LIBRARY_VERSION='"5.1"' -m32 -march=nocona -mtune=nocona -std=gnu89 -fpic -o terminal.o ../terminal.c
mv callback.o callback.so
rm -f text.so
/usr/bin/gcc -c -DHAVE_CONFIG_H    -I. -I.. -I.. -DRL_LIBRARY_VERSION='"5.1"' -m32 -march=nocona -mtune=nocona -std=gnu89 -fpic -o text.o ../text.c
mv terminal.o terminal.so
rm -f nls.so
/usr/bin/gcc -c -DHAVE_CONFIG_H    -I. -I.. -I.. -DRL_LIBRARY_VERSION='"5.1"' -m32 -march=nocona -mtune=nocona -std=gnu89 -fpic -o nls.o ../nls.c
mv text.o text.so
rm -f misc.so
/usr/bin/gcc -c -DHAVE_CONFIG_H    -I. -I.. -I.. -DRL_LIBRARY_VERSION='"5.1"' -m32 -march=nocona -mtune=nocona -std=gnu89 -fpic -o misc.o ../misc.c
mv nls.o nls.so
rm -f xmalloc.so
/usr/bin/gcc -c -DHAVE_CONFIG_H    -I. -I.. -I.. -DRL_LIBRARY_VERSION='"5.1"' -m32 -march=nocona -mtune=nocona -std=gnu89 -fpic -o xmalloc.o ../xmalloc.c
mv misc.o misc.so
mv xmalloc.o xmalloc.so
rm -f history.so
rm -f histexpand.so
/usr/bin/gcc -c -DHAVE_CONFIG_H    -I. -I.. -I.. -DRL_LIBRARY_VERSION='"5.1"' -m32 -march=nocona -mtune=nocona -std=gnu89 -fpic -o history.o ../history.c
/usr/bin/gcc -c -DHAVE_CONFIG_H    -I. -I.. -I.. -DRL_LIBRARY_VERSION='"5.1"' -m32 -march=nocona -mtune=nocona -std=gnu89 -fpic -o histexpand.o ../histexpand.c
mv history.o history.so
rm -f histfile.so
/usr/bin/gcc -c -DHAVE_CONFIG_H    -I. -I.. -I.. -DRL_LIBRARY_VERSION='"5.1"' -m32 -march=nocona -mtune=nocona -std=gnu89 -fpic -o histfile.o ../histfile.c
mv histexpand.o histexpand.so
rm -f histsearch.so
/usr/bin/gcc -c -DHAVE_CONFIG_H    -I. -I.. -I.. -DRL_LIBRARY_VERSION='"5.1"' -m32 -march=nocona -mtune=nocona -std=gnu89 -fpic -o histsearch.o ../histsearch.c
mv histfile.o histfile.so
rm -f shell.so
/usr/bin/gcc -c -DHAVE_CONFIG_H    -I. -I.. -I.. -DRL_LIBRARY_VERSION='"5.1"' -m32 -march=nocona -mtune=nocona -std=gnu89 -fpic -o shell.o ../shell.c
mv histsearch.o histsearch.so
rm -f mbutil.so
/usr/bin/gcc -c -DHAVE_CONFIG_H    -I. -I.. -I.. -DRL_LIBRARY_VERSION='"5.1"' -m32 -march=nocona -mtune=nocona -std=gnu89 -fpic -o mbutil.o ../mbutil.c
mv shell.o shell.so
rm -f tilde.so
/usr/bin/gcc -c -DHAVE_CONFIG_H    -I. -I.. -I.. -DRL_LIBRARY_VERSION='"5.1"' -m32 -march=nocona -mtune=nocona -std=gnu89 -fpic -DREADLINE_LIBRARY -c -o tilde.o ../tilde.c
mv mbutil.o mbutil.so
rm -f compat.so
/usr/bin/gcc -c -DHAVE_CONFIG_H    -I. -I.. -I.. -DRL_LIBRARY_VERSION='"5.1"' -m32 -march=nocona -mtune=nocona -std=gnu89 -fpic -o compat.o ../compat.c
mv tilde.o tilde.so
rm -f libhistory.so.5
/usr/bin/gcc -shared -Wl,-i -Wl,-h,libhistory.so.5 -m32 -march=nocona -mtune=nocona  -o libhistory.so.5 history.so histexpand.so histfile.so histsearch.so shell.so mbutil.so xmalloc.so
mv compat.o compat.so
rm -f libreadline.so.5
/usr/bin/gcc -shared -Wl,-i -Wl,-h,libreadline.so.5 -m32 -march=nocona -mtune=nocona  -o libreadline.so.5 readline.so vi_mode.so funmap.so keymaps.so parens.so search.so rltty.so complete.so bind.so isearch.so display.so signals.so util.so kill.so undo.so macro.so input.so callback.so terminal.so text.so nls.so misc.so xmalloc.so history.so histexpand.so histfile.so histsearch.so shell.so mbutil.so tilde.so compat.so
gmake[1]: Leaving directory `/stage/build/readline/readline-5.1-32/shlib'
rm -f libreadline.a
rm -f libhistory.a
ar cr libreadline.a readline.o vi_mode.o funmap.o keymaps.o parens.o search.o rltty.o complete.o bind.o isearch.o display.o signals.o util.o kill.o undo.o macro.o input.o callback.o terminal.o text.o nls.o misc.o compat.o xmalloc.o history.o histexpand.o histfile.o histsearch.o shell.o mbutil.o tilde.o
ar cr libhistory.a history.o histexpand.o histfile.o histsearch.o shell.o mbutil.o xmalloc.o
test -n "ranlib" && ranlib libhistory.a
test -n "ranlib" && ranlib libreadline.a


$ su
...

# source ../setenv-5.1 32

...

# gmake install
/bin/sh ./support/mkinstalldirs /opt/gnu/include \
                /opt/gnu/include/readline /opt/gnu/lib \
                /opt/gnu/info /opt/gnu/man/man3
mkdir -p -- /opt/gnu/include/readline /opt/gnu/lib /opt/gnu/info /opt/gnu/man/man3
for f in readline.h chardefs.h keymaps.h history.h tilde.h rlstdc.h rlconf.h rltypedefs.h; do \
                /usr/bin/ginstall -c -m 644 ./$f /opt/gnu/include/readline ; \
        done
( if test -d doc ; then \
                cd doc && \
                gmake  infodir=/opt/gnu/info DESTDIR= install; \
          fi )
gmake[1]: Entering directory `/stage/build/readline/readline-5.1-32/doc'
/bin/sh ../support/mkdirs /opt/gnu/info /opt/gnu/man/man3
if test -n "" ; then \
                /bin/sh ../support/mkdirs  ; \
        fi
if test -f readline.info; then \
                /usr/bin/ginstall -c -m 644 readline.info /opt/gnu/info/readline.info; \
        else \
                /usr/bin/ginstall -c -m 644 ./readline.info /opt/gnu/info/readline.info; \
        fi
if test -f rluserman.info; then \
                /usr/bin/ginstall -c -m 644 rluserman.info /opt/gnu/info/rluserman.info; \
        else \
                /usr/bin/ginstall -c -m 644 ./rluserman.info /opt/gnu/info/rluserman.info; \
        fi
if test -f history.info; then \
                /usr/bin/ginstall -c -m 644 history.info /opt/gnu/info/history.info; \
        else \
                /usr/bin/ginstall -c -m 644 ./history.info /opt/gnu/info/history.info; \
        fi
if /bin/sh -c 'install-info --version' >/dev/null 2>&1; then \
                install-info --dir-file=/opt/gnu/info/dir \
                        /opt/gnu/info/readline.info ; \
                install-info --dir-file=/opt/gnu/info/dir \
                        /opt/gnu/info/history.info ; \
                install-info --dir-file=/opt/gnu/info/dir \
                        /opt/gnu/info/rluserman.info ; \
        else true; fi
/usr/bin/ginstall -c -m 644 ./readline.3 /opt/gnu/man/man3/readline.3
/usr/bin/ginstall -c -m 644 ./history.3 /opt/gnu/man/man3/history.3
if test -n "" ; then \
                if test -f readline.html; then \
                        /usr/bin/ginstall -c -m 644 readline.html /readline.html; \
                else \
                        /usr/bin/ginstall -c -m 644 ./readline.html /readline.html; \
                fi ; \
                if test -f history.html; then \
                        /usr/bin/ginstall -c -m 644 history.html /history.html; \
                else \
                        /usr/bin/ginstall -c -m 644 ./history.html /history.html; \
                fi ; \
                if test -f rluserman.html; then \
                        /usr/bin/ginstall -c -m 644 rluserman.html /rluserman.html; \
                else \
                        /usr/bin/ginstall -c -m 644 ./rluserman.html /rluserman.html; \
                fi ; \
        fi
gmake[1]: Leaving directory `/stage/build/readline/readline-5.1-32/doc'
mv /opt/gnu/lib/libreadline.a /opt/gnu/lib/libreadline.old
mv: cannot stat `/opt/gnu/lib/libreadline.a': No such file or directory
gmake: [install-static] Error 1 (ignored)
/usr/bin/ginstall -c -m 644 libreadline.a /opt/gnu/lib/libreadline.a
test -n "ranlib" && ranlib /opt/gnu/lib/libreadline.a
mv /opt/gnu/lib/libhistory.a /opt/gnu/lib/libhistory.old
mv: cannot stat `/opt/gnu/lib/libhistory.a': No such file or directory
gmake: [install-static] Error 1 (ignored)
/usr/bin/ginstall -c -m 644 libhistory.a /opt/gnu/lib/libhistory.a
test -n "ranlib" && ranlib /opt/gnu/lib/libhistory.a
test -d shlib || mkdir shlib
( cd shlib ; gmake  all )
gmake[1]: Entering directory `/stage/build/readline/readline-5.1-32/shlib'
gmake[1]: Nothing to be done for `all'.
gmake[1]: Leaving directory `/stage/build/readline/readline-5.1-32/shlib'
( cd shlib ; gmake  DESTDIR= install )
gmake[1]: Entering directory `/stage/build/readline/readline-5.1-32/shlib'
/bin/sh ../support/mkdirs /opt/gnu/lib
/bin/sh ../support/shlib-install -O solaris2.11 -d /opt/gnu/lib -b /opt/gnu/bin -i "/usr/bin/ginstall -c -m 644" libhistory.so.5
/bin/sh ../support/shlib-install -O solaris2.11 -d /opt/gnu/lib -b /opt/gnu/bin -i "/usr/bin/ginstall -c -m 644" libreadline.so.5
install: you may need to run ldconfig
gmake[1]: Leaving directory `/stage/build/readline/readline-5.1-32/shlib'


$ sudo zfs snapshot -r .../opt/gnu@readline-5.1