X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;ds=sidebyside;f=NOTES;h=b6b06a437b49878c4a2d12a35a14bd18d5992277;hb=HEAD;hp=1e4d5611d789d5f52ec0392bef354347fbacd2f9;hpb=b72432fdcc59300c6fe7c9d6c8a31ad3447933f5;p=platform%2Fupstream%2Fbash.git diff --git a/NOTES b/NOTES index 1e4d561..b6b06a4 100644 --- a/NOTES +++ b/NOTES @@ -6,7 +6,7 @@ Platform-Specific Configuration and Operation Notes alpha running OSF/1, Linux, or NetBSD (malloc needs 8-byte alignment; bash malloc has 8-byte alignment now, but I have no alphas to test on) - next running NeXT/OS + next running NeXT/OS; machines running Openstep all machines running SunOS YP code: SunOS4, SunOS5, HP/UX, if you have problems with username completion or tilde expansion for @@ -20,16 +20,16 @@ Platform-Specific Configuration and Operation Notes sparc SVR4, SVR4.2 (ICL reference port) DG/UX Cray + Haiku OS NetBSD/sparc (malloc needs 8-byte alignment; bash malloc has 8-byte alignment now, but I have no NetBSD machines to test on) BSD/OS 2.1, 3.x if you want to use loadable builtins - If you are using GNU libc, especially on a linux system - -(Configuring --without-gnu-malloc will still result in lib/malloc/libmalloc.a -being built and linked against, but there is only a stub file in the archive.) + Motorola m68k machines running System V.3. There is a file descriptor + leak caused by using the bash malloc because closedir(3) needs to read + freed memory to find the file descriptor to close 2. Configure using shlicc2 on BSD/OS 2.1 and BSD/OS 3.x to use loadable builtins @@ -47,9 +47,9 @@ being built and linked against, but there is only a stub file in the archive.) configure runs and removing the `-lnsl' from the assignment to `LIBS' fixes the problem. -5. There is a problem with Red Hat Linux's `makewhatis' script. - Running `makewhatis' with bash-2.0 or later versions results - in error messages like this: +5. There is a problem with the `makewhatis' script in older (pre-7.0) + versions of Red Hat Linux. Running `makewhatis' with bash-2.0 or + later versions results in error messages like this: /usr/sbin/makewhatis: cd: manpath: No such file or directory /usr/sbin/makewhatis: manpath/whatis: No such file or directory @@ -202,12 +202,17 @@ being built and linked against, but there is only a stub file in the archive.) 10. If you do not have /usr/ccs/bin in your PATH when building on SunOS 5.x (Solaris 2), the configure script will be unable to find `ar' and `ranlib' (of course, ranlib is unnecessary). Make sure your $PATH - includes /usr/ccs/bin on SunOS 5.x. + includes /usr/ccs/bin on SunOS 5.x. This generally manifests itself + with libraries not being built and make reporting errors like + `cr: not found' when library construction is attempted. + +11. Building a statically-linked bash on Solaris 2.5.x, 2.6, 7, or 8 is + complicated. -11. Building a statically-linked bash on Solaris 2.5.x or 2.6 is complicated. It's not possible to build a completely statically-linked binary, since part of the C library depends on dynamic linking. The following recipe - assumes that you're using gcc and the Solaris ld (/usr/ccs/bin/ld). + assumes that you're using gcc and the Solaris ld (/usr/ccs/bin/ld) on + Solaris 2.5.x or 2.6: configure --enable-static-link make STATIC_LD= LOCAL_LIBS='-Wl,-B,dynamic -ldl -Wl,-B,static' @@ -225,7 +230,7 @@ being built and linked against, but there is only a stub file in the archive.) If you want to completely remove any dependence on /usr, perhaps to put a copy of bash in /sbin and have it available when /usr is - not mounted, force the build process to use the shared ld.so library + not mounted, force the build process to use the shared dl.so library in /etc/lib. For gcc, this would be something like @@ -243,6 +248,24 @@ being built and linked against, but there is only a stub file in the archive.) thor(2)$ ldd bash libdl.so.1 => /etc/lib/libdl.so.1 + On Solaris 7 (Solaris 8, using the version of gcc on the free software + CD-ROM), the following recipe appears to work for gcc: + + configure --enable-static-link + make STATIC_LD='-Wl,-Bstatic' LOCAL_LIBS='-Wl,-Bdynamic -Wl,-R/etc/lib -ldl -Wl,-Bstatic' + + thor.ins.cwru.edu(2)$ ldd bash + libdl.so.1 => /etc/lib/libdl.so.1 + + Make the analogous changes if you are running Sun's C Compiler. + + I have received word that adding -L/etc/lib (or the equivalent + -Wl,-L/etc/lib) might also be necessary, in addition to the -R/etc/lib. + + On later versions of Solaris, it may be necessary to add -lnsl before + -ldl; statically-linked versions of bash using libnsl are not guaranteed + to work correctly on future versions of Solaris. + 12. Configuring bash to build it in a cross environment. Currently only two native versions can be compiled this way, cygwin32 and x86 BeOS. For BeOS, you would configure it like this: @@ -253,3 +276,77 @@ being built and linked against, but there is only a stub file in the archive.) configure i586-beos Similarly for cygwin32. + +13. Bash-2.05 has reverted to the bash-2.03 behavior of honoring the current + locale setting when processing ranges within pattern matching bracket + expressions ([A-Z]). This is what POSIX.2 and SUSv2 specify. + + The behavior of the matcher in bash-2.05 depends on the current LC_COLLATE + setting. Setting this variable to `C' or `POSIX' will result in the + traditional behavior ([A-Z] matches all uppercase ASCII characters). + Many other locales, including the en_US locale (the default on many US + versions of Linux) collate the upper and lower case letters like this: + + AaBb...Zz + + which means that [A-Z] matches every letter except `z'. + + The portable way to specify upper case letters is [:upper:] instead of + A-Z; lower case may be specified as [:lower:] instead of a-z. + + Look at the manual pages for setlocale(3), strcoll(3), and, if it is + present, locale(1). If you have locale(1), you can use it to find + your current locale information even if you do not have any of the + LC_ variables set. + + My advice is to put + + export LC_COLLATE=C + + into /etc/profile and inspect any shell scripts run from cron for + constructs like [A-Z]. This will prevent things like + + rm [A-Z]* + + from removing every file in the current directory except those beginning + with `z' and still allow individual users to change the collation order. + Users may put the above command into their own profiles as well, of course. + +14. Building on Interix (nee OpenNT), which Microsoft bought from Softway + Systems and has seemingly abandoned (thanks to Kevin Moore for this item). + + 1. cp cross-build/opennt.cache config.cache + + 2. If desired, edit pathnames.h to set the values of SYS_PROFILE and + DEFAULT_HOSTS_FILE appropriately. + + 3. export CONFIG_SHELL=$INTERIX_ROOT/bin/sh + + 4. ./configure --prefix=$INTERIX_ROOT/usr/local (or wherever you + want it). + + 5. make; make install; enjoy + +15. Configure with `CC=xlc' if you don't have gcc on AIX 4.2 and later + versions. `xlc' running in `cc' mode has trouble compiling error.c. + +16. Configure --disable-multibyte on NetBSD versions (1.4 through at least + 1.6.1) that include wctype.h but do not define wctype_t. + +17. Do NOT use bison-1.75. It builds a non-working parser. The most + obvious effect is that constructs like "for i; do echo $i; done" don't + loop over the positional parameters. + +18. I have received reports that using -O2 with the MIPSpro results in a + binary that fails in strange ways. Using -O1 seems to work. + +19. There is special handling to ensure the shell links against static + versions of the included readline and history libraries on Mac OS X; + Apple ships inadequate dynamic libreadline and libhistory "replacements" + as standard libraries. + +20. If you're on a system like SGI Irix, and you get an error about not + being able to refer to a dynamic symbol + (ld: non-dynamic relocations refer to dynamic symbol PC), add + -DNEED_EXTERN_PC to the LOCAL_CFLAGS variable in lib/readline/Makefile.in + and rebuild.