From: kenneth.block [krblock@computer.org] Sent: Tuesday, March 07, 2000 11:51 PM To: Info-VAX@Mvb.Saic.Com Subject: Unix like environment for VMS GNV - GNU's Not VMS! GNV is an open source, GNU based, Unix environment for VMS. It is intended to provide the important subset of Unix/Linux/POSIX necessary to port UNIX software to VMS. See gnv.sourceforge.net for up to date information. The environment currently consists of: bash.exe -- Doug Rupp's port of the GNU BASH Shell make.exe -- GNU Make with patches for VMS and integration with BASH cc.exe -- a Unix like cc driver for Compaq C for VMS ar.exe -- a Unix like wrapper for the lib utility Miscellaneous utilities downloaded from the web complete the environment AS.EXE;7 BASENAME.EXE;1 BZIP2.EXE;1 CAT.EXE;1 CHMOD.EXE;1 CP.EXE;1 DIFF.EXE;1 EGREP.EXE;1 EXPR.EXE;1 GAWK.EXE;1 GREP.EXE;1 GZIP.EXE;1 INSTALL.EXE;1 LS.EXE;1 MKDIR.EXE;1 MV.EXE;1 OBJDUMP.EXE;5 RM.EXE;1 RMDIR.EXE;1 SED.EXE;1 SET_EXE.COM;8 SLEEP.EXE;1 STAT.EXE;1 TAIL.EXE;1 TAR.EXE;1 TOUCH.EXE;1 TR.EXE;1 UNAME.EXE;1 WC.EXE;1 The environment is complete enough to build BASH using standard Unix makefiles. Source for bash and make is available. The distribution is packaged using BZIP2 compression and TAR. You can download these from http://gnv.sourceforge.net/downloads/bzip2.exe and http://gnv.sourceforge.net/downloads/tar.exe. All files are also available though FTP at ftp://gnv.sourceforge.net/pub/gnv, it is just slower. Define foreign commands at the DCL prompt: $bzip2=="$bzip2.exe" $tar=="$tar.exe" To use GNV, download the binaries for make, bash, and all the utilities from http://gnv.sourceforge.net/downloads/gnv.tar-bz2 and the setup script from http://gnv.sourceforge.net/downloads/setup.com. Create a directory, we will call it GNV_INSTALL and unpack the binaries. $create/dir [.GNV_INSTALL] $set def [.GNV_INSTALL] $bzip2 -d gnv.tar-bz2 $tar -xvf gnv.tar Now look at setup.com, you will need to edit it for your configuration. The following is what I have running on a VMS 7.1 system. Change the logical gnu to point to where you installed the binaries. NOTE, this distribution comes with a version of DECC$SHR that is a prerelease version for VMS 7.2. Use this at your own risk. If you have a VMS 7.2 system, you probably do not need this and should comment our all the logicals for replacing system libraries. ============================== setup.com ================================ $define/job/translation=concealed gnu disk$:[user.gnu_install.] $define tcl_root gnu:[lib.] $define dcl$path gnu:[bin] $define vaxc$path gnu:[bin] $bash == "$gnu:[bin]bash.exe" $! $! DECC$EXEC_FILEATTR_INHERITANCE must be defined, otherwise pipes $! in bash are broken $! $define DECC$EXEC_FILEATTR_INHERITANCE 1 $! $! $! You need a decc$shr that is from 7.2 or later $! $! $define/job DECC$SHR gnu:[lib]DECC$SHR;1 $! $! $! All other sharables that you might need will also have to be $! redefined, otherwise references will not refer to the decc$shr $! we just loader. This is not a problem with VMS 7.2 or later. $! $define/job CDE$UNIX_ROUTINES sys$library:CDE$UNIX_ROUTINES; $define/job CMA$TIS_SHR sys$library:CMA$TIS_SHR; $define/job DECW$DXMLIBSHR12 sys$library:DECW$DXMLIBSHR12; $define/job DECW$MRMLIBSHR12 sys$library:DECW$MRMLIBSHR12; $define/job DECW$XLIBSH sys$library:DECW$XLIBSHR; $define/job DECW$XMLIBSHR12 sys$library:DECW$XMLIBSHR12; $define/job DECW$XTLIBSHRR sys$library:DECW$XTLIBSHRR5; $define/job LBRSHR sys$library:LBRSHR; $define/job LIBOTS sys$library:LIBOTS; $define/job LIBRTL sys$library:LIBRTL; ========================== end setup.com ================================ Once you have finished editing setup.com, run it and then bash and you should be all set. $@setup.com $bash bash$ ls /gnu/bin ar.exe chmod.exe gzip.exe rm.exe tail.exe as.exe cp.exe install.exe rmdir.exe tar.exe basename.exe diff.exe ls.exe sed.exe touch.exe bash.exe egrep.exe make.exe set_exe.com tr.exe bzip2.exe expr.exe mkdir.exe sh.exe uname.exe cat.exe gawk.exe mv.exe sleep.exe wc.exe cc.exe grep.exe objdump.exe stat.exe bash$ ls /gnu/lib decc$shr.exe bash$ echo "Welcome to the wonderful world of GNU on VMS" Welcome to the wonderful world of GNU on VMS Building from sources Want to play with the sources? Currently, only sources for bash and make are provided. Work is being done to make autoconf configuration work, so that the standard distributions can be used. Sources are available as tar files, but a CVS repository should be live real soon. For best success, build sources under the /gnu hierarchy. Directory specs with dollar signs in them currently reek havoc. bash$ mkdir /gnu/src bash$ cd /gnu/src BASH is currently the only tool that is cleanly packaged so that it can build with a UNIX style makefiles. You can get the sources at http://gnv.sourceforge.net/downloads/bash.tar-bz2. bash$ bzip2 -d bash.tar-bz2 bash$ tar -xvf bash.tar bash$ cd bash Touch "parser-built" to prevent the makefiles from trying to rebuild the parser, since it does not really need to and we do not have bison and flex. bash$ touch parser-built. You are now ready to build. One last thing to be aware of is that when make invokes a command, it needs to know if it should use BASH or DCL to execute that command. If UNIX_MODE=1, MAKE will use BASH, otherwise it will use DCL. bash$ UNIX_MODE=1;export UNIX_MODE bash$ make CPP="CC -E" AR="ar" SHELL=sh You can also build make, but it uses a special makefile written for VMS. You can get the sources at http://gnv.sourceforge.net/downloads/make.tar-bz2. bash$ bzip2 -d make.tar-bz2 bash$ tar -xvf make.tar bash$ cd make bash$ UNIX_MODE=;export UNIX_MODE bash$ make -f makefile.vms Sources for the cc and ar wrappers and all the miscellaneous tools will be made available as soon as a sane build procedure is available. Contributors It is impossible to thank everybody since this is such a mix of tools, but the following names come to mind. If you feel your name should be added, let me know. Email addresses are not listed for privacy. If you want your email listed, it can be added. Doug Rupp did the port of Bash and most of the tools. Boris Gubenko provided fixes to Compaq's CRTL. Richard Levitte worked on atleast TAR, probably other tools. Martin P.J. Zinser maintains http://www.decus.de:8080/www/vms/sw.html. Patches for make, as well as a number of binaries for this distribution were taken from this site. Kenneth Block integrated Bash and Make. Cleaned up BASH makefiles. Provided cc driver and ar wrapper. Duane Smith provided technical insight into Compaq's CRTL