
1: Compiling and Installing Gauche 2: 3: $Id: INSTALL.in,v 1.3 2007/03/16 09:21:28 shirok Exp $ 4: Note: The Gauche system is a work in progress and frequently updated. 5: Check out the latest information on the site: 6: http://practical-scheme.net/gauche/ 7: 8: 9: Quick Start 10: --------------------------------------------------- 11: 12: 13: % ./configure [--enable-threads=pthreads] 14: % make 15: % make test 16: % make install 17: 18: Things will be installed under /usr/local/bin, /usr/local/lib/gauche, 19: and /usr/local/share/gauche. 20: If you want to use multithread support, pass --enable-threads=pthreads 21: option to configure. It is supported on several platforms. 22: 23: If you have installed Gauche 0.5 or later, and want to install 24: new version of Gauche with the same configuration option, 25: you can use the following command instead of 'configure'. 26: % gauche-config --reconfigure | sh 27: When the option '--reconfigure' is given, Gauche-config prints out 28: the command line when it is configured. Pass the output to 29: shell and you can reconfigure with the same options. 30: 31: 32: Choosing Character Encoding 33: --------------------------------------------------- 34: 35: 36: By default, Gauche is compiled with utf-8 as a native character encoding. 37: You can give a --enable-multibyte=ENCODING option to switch the native 38: encoding. Note that if you want to use ISO8859-1 GR characters in 39: the program text, you have to specify no multibyte encoding, or 40: Gauche takes such characters as the first byte of multibyte charaters. 41: 42: ./configure --enable-multibyte=utf-8 ;; UTF-8 (default) 43: ./configure --enable-multibyte=euc-jp ;; EUC-JP 44: ./configure --enable-multibyte=sjis ;; Shift JIS 45: ./configure --enable-multibyte=no ;; No multibyte string 46: 47: 48: Gauche can recognize and converts typical japanese character 49: encodings, but delegates other conversion work to iconv library 50: (when available). If your system does not have iconv installed, 51: you can specify the location of your external 52: iconv library by --with-iconv option. 53: 54: ./configure --with-iconv=DIR 55: 56: 57: For example, if your say --with-iconv=/usr/local, Gauche looks 58: for the header iconv.h from /usr/local/include and the library 59: libiconv from /usr/local/lib. 60: In case if your iconv library is named other than libiconv, say, 61: libmyconv, you can also specify --with-iconv-lib=myconv to tell 62: Gauche to link against the library. 63: 64: You can obtain Bruno Haible's libiconv library from here: 65: http://www.gnu.org/software/libiconv/ 66: 67: 68: Local library paths 69: --------------------------------------------------- 70: 71: 72: If you want to use some libraries installed in non-standard location 73: to build Gauche, you can use the following option to specify the 74: locations. 75: 76: --with-local=PATH:PATH2:... 77: 78: This addts PATH/include, PATH2/include, ... to the include paths, 79: and PATH/lib, PATH2/lib, ... to the library search paths. 80: 81: For example, if you want to use gdbm library in /usr/local, 82: you can say: 83: 84: --with-local=/usr/local 85: 86: 87: IPv6 support 88: --------------------------------------------------- 89: 90: 91: Gauche has experimental support for IPv6. 92: It is turned off by default, 93: but you can include it by giving the following configure option. 94: 95: --enable-ipv6 96: 97: Of course your OS has to have the support of IPv6. 98: The current implementation is tested on FreeBSD. 99: See the gauche.net section of the reference manual for details. 100: 101: 102: Selecting SLIB location 103: --------------------------------------------------- 104: 105: 106: SLIB is a portable Scheme library containing various useful functions, 107: entirely written in Scheme. Gauche can use SLIB features if you have 108: it on your system. 109: 110: The configure script tries to find where SLIB is installed. It looks 111: for some typical directories like /usr/local/slib or /usr/share/slib. 112: If you installed your SLIB in some non-standard location, you can tell 113: it to the configure script as follows: 114: 115: ./configure --with-slib=PATH 116: 117: where PATH is the path you installed your SLIB. 118: 119: Gauche works without SLIB, anyway. If you're not interested, you 120: don't need to care about this. 121: 122: SLIB needs a catalog file to be created in the Gauche library 123: directory before use. If Gauche finds SLIB during installation, 124: the install procedure creates the catalog file. 125: If you install slib after installing Gauche, it tries to create 126: the catalog file when you use slib first time, and you may get 127: an error if you don't have a permission to write into the 128: Gauche library directory. Run gosh in the right permission 129: and evaluate something like the following will solve the problem. 130: 131: (use slib) 132: (require 'logical) 133: 134: 135: Run-time library path 136: --------------------------------------------------- 137: 138: 139: In some cases, your have to run Gauche under the environment 140: you don't have much control. One of such cases is when you 141: want to run CGI script on the ISP's machine. It may become 142: a problem that your build of Gauche depends on some dynamically 143: loaded libraries that are installed in non-standard location. 144: 145: For example, suppose you install a new libiconv.so in /home/yours/lib 146: on the ISP's server and compile Gauche with --with-iconv=/home/yours/lib. 147: You have set up correct environment variables such as LD_LIBRARY_PATH, 148: so you can invoke Gauche interpreter gosh without a problem. Now, 149: you write a CGI script. Unfortunately, the ISP's web server 150: doesn't set LD_LIBRARY_PATH as you desired, and your script never 151: runs on the server, for the interpreter can't find libiconv.so 152: in the system default path. 153: 154: Some compilers have an option that writes exact path of shared 155: libraries that the binary depends on. A configure option --with-rpath 156: utilizes the feature. When an option --with-rpath=DIR is given, 157: configure sets up a build process so that the shared libraries 158: are looked from DIR. This works only on gcc, however. 159: 160: 161: Customizing install location 162: --------------------------------------------------- 163: 164: 165: Call configure with those parameters to specify where to install. 166: 167: % ./configure --prefix=$PREFIX --exec-prefix=$EXEC_PREFIX 168: 169: 170: If --prefix option is omitted, /usr/local is assumed as PREFIX. 171: If --exec-prefix option is omitted, EXEC_PREFIX is set the same as PREFIX. 172: 173: 174: The files are installed in those locations: 175: 176: $EXEC_PREFIX/bin/* 177: The interpreter (gosh) and configuration script (gauche-config). 178: 179: $EXEC_PREFIX/lib/* 180: Library (libgauche.a). 181: 182: $PREFIX/share/gauche/VERSION/include/* 183: Header files required to create applications using libgauche. 184: 185: $PREFIX/share/gauche/VERSION/lib/* 186: Machine-independent Scheme files. 187: 188: $PREFIX/share/info/* 189: info files. 190: 191: $EXEC_PREFIX/lib/gauche/VERSION/ARCHITECTURE/* 192: Machine-dependent files (.so files, gosh, gauche-config, and libgauche.a) 193: 194: $PREFIX/share/gauche/site/lib/* 195: $EXEC_PREFIX/lib/gauche/site/VERSION/ARCHITECTURE/* 196: These are default locations where user installed machine-indenpedent/ 197: dependent files will go. 198: 199: 200: Optimization options 201: --------------------------------------------------- 202: 203: 204: You can pass extra options at make time, using make macro OPTFLAGS. 205: 'Configure' sets a default, but if you want to explore different 206: options, just run 'make' as follows: 207: 208: make OPTFLAGS="--some-compiler-option --other-option" 209: 210: 211: Uninstallation 212: --------------------------------------------------- 213: 214: 215: You can remove installed Gauche software by running 216: 217: make uninstall 218: 219: on top of the source tree. 220: 221: 222: Machine-dependent information 223: --------------------------------------------------- 224: 225: 226: * MacOS X - For 10.2.x and earlier, you need to install the dlcompat 227: library (libdl) from Fink project (http://fink.sourceforge.net) 228: before configuring Gauche. You don't need it if you have OSX 229: 10.3 or later. If the dlcompat library is installed in non-standard 230: location, you have to tell configure the place by --with-local. 231: Besides, GC now requires pthreads on MacOS X, so you need 232: --enable-threads=pthreads. 233: 234: For example, if you have dlfcn.h in $HOME/include and libdl.a 235: in $HOME/lib, you should do: 236: 237: ./configure --with-local=$HOME --enable-threads=pthreads 238: 239: * IRIX with 64bit binary - If you want to compile for 64bit ABI instead 240: of the default 32bit ABI, run configure like this: 241: 242: CC="cc -64" AS="as -64" ./configure 243: 244: * Linux/Crusoe TM5800 - It is reported that recent Linux kernel thinks 245: TM5800 as i686-compatible, and compilation of Gauche fails at 246: gc where the i686's prefetch instruction is used. A quick fix 247: is to edit gc/Makefile AFTER configure, to remove the following 248: flag: 249: 250: -DUSE_I686_PREFETCH 251: 252: Then make it. 253: