1 Platform-Specific Configuration and Operation Notes
2 ===================================================
4 1. configure --without-gnu-malloc on:
6 alpha running OSF/1, Linux, or NetBSD (malloc needs 8-byte alignment;
7 bash malloc has 8-byte alignment now, but I have no alphas to test on)
11 all machines running SunOS YP code: SunOS4, SunOS5, HP/UX, if you
12 have problems with username completion or tilde expansion for
13 usernames found via YP/NIS
15 linux (optional, but don't do it if you're using Doug Lea's malloc)
18 other OSF/1 machines (KSR/1, HP, IBM AIX/ESA)
20 sparc SVR4, SVR4.2 (ICL reference port)
24 NetBSD/sparc (malloc needs 8-byte alignment; bash malloc has 8-byte
25 alignment now, but I have no NetBSD machines to test on)
27 BSD/OS 2.1, 3.x if you want to use loadable builtins
29 If you are using GNU libc, especially on a linux system
31 (Configuring --without-gnu-malloc will still result in lib/malloc/libmalloc.a
32 being built and linked against, but there is only a stub file in the archive.)
34 2. Configure using shlicc2 on BSD/OS 2.1 and BSD/OS 3.x to use loadable
37 3. Bash cannot be built in a directory separate from the source directory
38 using configure --srcdir=... unless the version of `make' you're using
39 does $VPATH handling right. The script support/mkclone can be used to
40 create a `build tree' using symlinks to get around this.
42 4. I've had reports that username completion (as well as tilde expansion
43 and \u prompt expansion) does not work on IRIX 5.3 when linking with
44 -lnsl. This is only a problem when you're running NIS, since
45 apparently -lnsl supports only /etc/passwd and not the NIS functions
46 for retrieving usernames and passwords. Editing the Makefile after
47 configure runs and removing the `-lnsl' from the assignment to `LIBS'
50 5. There is a problem with Red Hat Linux's `makewhatis' script.
51 Running `makewhatis' with bash-2.0 or later versions results
52 in error messages like this:
54 /usr/sbin/makewhatis: cd: manpath: No such file or directory
55 /usr/sbin/makewhatis: manpath/whatis: No such file or directory
56 chmod: manpath/whatis: No such file or directory
57 /usr/sbin/makewhatis: cd: catpath: No such file or directory
58 /usr/sbin/makewhatis: catpath/whatis: No such file or directory
59 chmod: catpath/whatis: No such file or directory
61 The problem is with `makewhatis'. Red Hat (and possibly other
62 Linux distributors) uses a construct like this in the code:
64 eval path=$"$pages"path
66 to do indirect variable expansion. This `happened to work' in
67 bash-1.14 and previous versions, but that was more an accident
68 of implementation than anything else -- it was never supported
69 and certainly is not portable.
71 Bash-2.0 has a new feature that gives a new meaning to $"...".
72 This is explained more completely in item 1 in the COMPAT file.
74 The three lines in the `makewhatis' script that need to be changed
77 eval $topath=$"$topath":$name
79 eval path=$"$pages"path
81 eval path=$"$pages"path
83 The portable way to write this code is
85 eval $topath="\$$topath":$name
86 eval path="\$$pages"path
87 eval path="\$$pages"path
89 You could also experiment with another new bash feature: ${!var}.
90 This does indirect variable expansion, making the use of eval
93 6. There is a problem with syslogd on many Linux distributions (Red Hat
94 and Slackware are two that I have received reports about). syslogd
95 sends a SIGINT to its parent process, which is waiting for the daemon
96 to finish its initialization. The parent process then dies due to
97 the SIGINT, and bash reports it, causing unexpected console output
98 while the system is booting that looks something like
100 starting daemons: syslogd/etc/rc.d/rc.M: line 29: 38 Interrupt ${NET}/syslogd
102 Bash-2.0 reports events such as processes dying in scripts due to
103 signals when the standard output is a tty. Bash-1.14.x and previous
104 versions did not report such events.
106 This should probably be reported as a bug to whatever Linux distributor
107 people see the problem on. In my opinion, syslogd should be changed to
108 use some other method of communication, or the wrapper function (which
109 appeared to be `daemon' when I looked at it some time ago) or script
110 (which appeared to be `syslog') should catch SIGINT, since it's an
111 expected event, and exit cleanly.
113 7. Several people have reported that `dip' (a program for SLIP/PPP
114 on Linux) does not work with bash-2.0 installed as /bin/sh.
116 I don't run any Linux boxes myself, and do not have the dip
117 code handy to look at, but the `problem' with bash-2.0, as
118 it has been related to me, is that bash requires the `-p'
119 option to be supplied at invocation if it is to run setuid
122 This means, among other things, that setuid or setgid programs
123 which call system(3) (a horrendously bad practice in any case)
124 relinquish their setuid/setgid status in the child that's forked
127 The following is an *unofficial* patch to bash-2.0 that causes it
128 to not require `-p' to run setuid or setgid if invoked as `sh'.
129 It has been reported to work on Linux. It will make your system
130 vulnerable to bogus system(3) calls in setuid executables.
132 --- ../bash-2.0.orig/shell.c Wed Dec 18 14:16:30 1996
133 +++ shell.c Fri Mar 7 13:12:03 1997
136 posix_initialize (posixly_correct);
138 - if (running_setuid && privileged_mode == 0)
139 + if (running_setuid && privileged_mode == 0 && act_like_sh == 0)
140 disable_priv_mode ();
142 /* Need to get the argument to a -c option processed in the
144 8. Some people have asked about binding all of the keys in a PC-keyboard-
145 style numeric keypad to readline functions. Here's something I
146 received from the gnu-win32 list that may help. Insert the following
147 lines into ~/.inputrc:
150 "\e[1~":beginning-of-line
152 "\e[2~":kill-whole-line
158 "\e[5~":history-search-forward
160 "\e[6~":history-search-backward
162 9. Hints for building under Minix 2.0 (Contributed by Terry R. McConnell,
163 <tmc@barnyard.syr.edu>)
165 The version of /bin/sh distributed with Minix is not up to the job of
166 running the configure script. The easiest solution is to swap /bin/sh
167 with /usr/bin/ash. Then use chmem(1) to increase the memory allocated
168 to /bin/sh. The following settings are known to work:
170 text data bss stack memory
171 63552 9440 3304 65536 141832 /bin/sh
173 If you have problems with make or yacc it may be worthwhile first to
174 install the GNU versions of these utilities before attempting to build
175 bash. (As of this writing, all of these utilities are available for the
176 i386 as pre-built binaries via anonymous ftp at math.syr.edu in the
177 pub/mcconnell/minix directory. Note that the GNU version of yacc is called
180 Unless you want to see lots of warnings about old-style declarations,
181 do LOCAL_CFLAGS=-wo; export LOCAL_CFLAGS before running configure.
182 (These warnings are harmless, but annoying.)
184 configure will insist that you supply a host type. For example, do
185 ./configure --host=i386-pc-minix.
187 Minix does not support the system calls required for a proper
188 implementation of ulimit(). The `ulimit' builtin will not be available.
190 Configure will fail to notice that many things like uid_t are indeed
191 typedef'd in <sys/types.h>, because it uses egrep for this purpose
192 and minix has no egrep. You could try making a link /usr/bin/egrep -->
193 /usr/bin/grep. Better is to install the GNU version of grep in
194 /usr/local/bin and make the link /usr/local/bin/egrep -->/usr/local/bin/grep.
195 (These must be hard links, of course, since Minix does not support
198 You will see many warnings of the form:
199 warning: unknown s_type: 98
200 I have no idea what this means, but it doesn't seem to matter.
202 10. If you do not have /usr/ccs/bin in your PATH when building on SunOS 5.x
203 (Solaris 2), the configure script will be unable to find `ar' and
204 `ranlib' (of course, ranlib is unnecessary). Make sure your $PATH
205 includes /usr/ccs/bin on SunOS 5.x.
207 11. Building a statically-linked bash on Solaris 2.5.x or 2.6 is complicated.
208 It's not possible to build a completely statically-linked binary, since
209 part of the C library depends on dynamic linking. The following recipe
210 assumes that you're using gcc and the Solaris ld (/usr/ccs/bin/ld).
212 configure --enable-static-link
213 make STATIC_LD= LOCAL_LIBS='-Wl,-B,dynamic -ldl -Wl,-B,static'
215 This should result in a bash binary that depends only on libdl.so:
218 libdl.so.1 => /usr/lib/libdl.so.1
220 If you're using the Sun C Compiler (Sun WorkShop C Compiler version
221 4.2 was what I used), you should be able to get away with using
223 configure --enable-static-link
224 make STATIC_LD= LOCAL_LIBS='-B dynamic -ldl -B static'
226 If you want to completely remove any dependence on /usr, perhaps
227 to put a copy of bash in /sbin and have it available when /usr is
228 not mounted, force the build process to use the shared ld.so library
231 For gcc, this would be something like
233 configure --enable-static-link
234 make STATIC_LD= LOCAL_LIBS='-Wl,-B,dynamic -Wl,-R/etc/lib -ldl -Wl,-B,static'
238 configure --enable-static-link
239 make STATIC_LD= LOCAL_LIBS='-B dynamic -R/etc/lib -ldl -B static'
241 seems to work, at least on Solaris 2.5.1:
244 libdl.so.1 => /etc/lib/libdl.so.1
246 12. Configuring bash to build it in a cross environment. Currently only
247 two native versions can be compiled this way, cygwin32 and x86 BeOS.
248 For BeOS, you would configure it like this:
250 export RANLIB=i586-beos-ranlib
251 export AR=i586-beos-ar
252 export CC=i586-beos-gcc
255 Similarly for cygwin32.