home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / octave-1.1.1p1-base.tgz / octave-1.1.1p1-base.tar / fsf / octave / INSTALL.OCTAVE < prev    next >
Text File  |  1995-02-23  |  14KB  |  353 lines

  1. This file documents the installation of Octave.
  2.  
  3.    Octave is free software; you can redistribute it and/or modify it
  4. under the terms of the GNU General Public License as published by the
  5. Free Software Foundation.
  6.  
  7. Installing Octave
  8. *****************
  9.  
  10.    Here is the procedure for installing Octave from scratch on a Unix
  11. system.  For instructions on how to install the binary distributions of
  12. Octave, see *Note Binary Distributions::.
  13.  
  14.    * Run the shell script `configure'.  This will determine the features
  15.      your system has (or doesn't have) and create a file named Makefile
  16.      from each of the files named Makefile.in.
  17.  
  18.      Here is a summary of the configure options that are most
  19.      frequently used when building Octave:
  20.  
  21.     `--prefix=PREFIX'
  22.           Install Octave in subdirectories below PREFIX.  The default
  23.           value of PREFIX is `/usr/local'.
  24.  
  25.     `--srcdir=DIR'
  26.           Look for Octave sources in the directory DIR.
  27.  
  28.     `--with-f2c'
  29.           Use f2c even if Fortran compiler is available.
  30.  
  31.     `--enable-dld'
  32.           Use DLD to make Octave capable of dynamically linking
  33.           externally compiled functions.  This only works on systems
  34.           that have a working port of DLD.
  35.  
  36.     `--enable-lite-kernel'
  37.           Compile smaller kernel.  This currently requires DLD so that
  38.           Octave can load functions at run time that are not loaded at
  39.           compile time.
  40.  
  41.     `--help'
  42.           Print a summary of the options recognized by the configure
  43.           script.
  44.  
  45.      See the file INSTALL for more information about the command line
  46.      options used by configure.  That file also contains instructions
  47.      for compiling in a directory other than where the source is
  48.      located.
  49.  
  50.    * Run make.
  51.  
  52.      You will need a recent version of GNU make.  Modifying Octave's
  53.      Makefiles to work with other make programs is probably not worth
  54.      your time.  We recommend you get and compile GNU make instead.
  55.  
  56.      For plotting, you will need to have gnuplot installed on your
  57.      system.  Gnuplot is a command-driven interactive function plotting
  58.      program.  Gnuplot is copyrighted, but freely distributable.  The
  59.      `gnu' in gnuplot is a coincidence--it is not related to the GNU
  60.      project or the FSF in any but the most peripheral sense.
  61.  
  62.      For version 1.1.1, you must have the GNU C++ compiler (gcc)
  63.      version 2.6.3 or later to compile Octave.  You will also need
  64.      version 2.6.1 of the GNU C++ class library (libg++).  If you plan
  65.      to modify the parser you will also need GNU bison and fles.  If
  66.      you modify the documentation, you will need GNU Texinfo, along
  67.      with the patch for the makeinfo program that is distributed with
  68.      Octave.
  69.  
  70.      GNU make, gcc, and libg++, gnuplot, bison, flex, and Texinfo are
  71.      all available from many anonymous ftp archives, including
  72.      ftp.che.utexas.edu, ftp.uu.net, prep.ai.mit.edu, and
  73.      wuarchive.wustl.edu.
  74.  
  75.      If you don't have a Fortran compiler, or if your Fortran compiler
  76.      doesn't work like the traditional Unix f77, you will need to have
  77.      the Fortran to C translator f2c.  You can get f2c from any number
  78.      of anonymous ftp archives.  The most recent version of f2c is
  79.      always available from research.att.com.
  80.  
  81.      On an otherwise idle SPARCstation II, it will take somewhere
  82.      between 60 and 90 minutes to compile everything, depending on
  83.      whether you are compiling the Fortran libraries with f2c or using
  84.      the Fortran compiler directly.  You will need about 50 megabytes
  85.      of disk storage to work with (considerably less if you don't
  86.      compile with debugging symbols).  To do that, use the command
  87.  
  88.           make CFLAGS=-O CXXFLAGS=-O LDFLAGS=
  89.  
  90.      instead of just `make'.
  91.  
  92.    * If you encounter errors while compiling Octave, first check the
  93.      list of known problems below to see if there is a workaround or
  94.      solution for your problem.  If not, see the file BUGS for
  95.      information about how to report bugs.
  96.  
  97.    * Once you have successfully compiled Octave, run `make install'.
  98.  
  99.      This will install a copy of octave, its libraries, and its
  100.      documentation in the destination directory.  As distributed,
  101.      Octave is installed in the following directories:
  102.  
  103.     `PREFIX/bin'
  104.           Octave and other binaries that people will want to run
  105.           directly.
  106.  
  107.     `PREFIX/lib'
  108.           Libraries like libcruft.a and liboctave.a.
  109.  
  110.     `PREFIX/include/octave'
  111.           Include files distributed with Octave.
  112.  
  113.     `PREFIX/man/man1'
  114.           Unix-style man pages describing Octave.
  115.  
  116.     `PREFIX/info'
  117.           Info files describing Octave.
  118.  
  119.     `PREFIX/lib/octave/VERSION/m'
  120.           Function files distributed with Octave.  This includes the
  121.           Octave version, so that multiple versions of Octave may be
  122.           installed at the same time.
  123.  
  124.     `PREFIX/lib/octave/VERSION/exec/HOST_TYPE'
  125.           Executables to be run by Octave rather than the user.
  126.  
  127.     `PREFIX/lib/octave/VERSION/oct/HOST_TYPE'
  128.           Object files that will be dynamically loaded.
  129.  
  130.     `PREFIX/lib/octave/VERSION/imagelib'
  131.           Image files that are distributed with Octave.
  132.  
  133.      where PREFIX defaults to `/usr/local', VERSION stands for the
  134.      current version number of the interpreter, and HOST_TYPE is the
  135.      type of computer on which Octave is installed (for example,
  136.      `i486-unknown-gnu').
  137.  
  138. Installation Problems
  139. =====================
  140.  
  141.    This section contains a list of problems (and some apparent problems
  142. that don't really mean anything is wrong) that may show up during
  143. installation of Octave.
  144.  
  145.    * On AIX (and possibly other) systems, GCC 2.6.2 generates invalid
  146.      assembly code when compiling some parts of Octave.  On AIX
  147.      systems, it is possible to get a working binary by not using the
  148.      compiler flag `-fno-implicit-templates'.  You can specify this as
  149.      an option to make by using a command like
  150.  
  151.           make NO_IMPLICIT_TEMPLATES=
  152.  
  153.    * You may need to edit some files in the gcc include subdirectory to
  154.      add prototypes for functions there.  For example, Ultrix 4.2 needs
  155.      proper declarations for the `signal()' and the `SIG_IGN' macro in
  156.      the file `signal.h'.
  157.  
  158.      On some systems the `SIG_IGN' macro is defined to be something like
  159.      this:
  160.  
  161.           #define  SIG_IGN  (void (*)())1
  162.  
  163.      when it should really be something like:
  164.  
  165.           #define  SIG_IGN  (void (*)(int))1
  166.  
  167.      to match the prototype declaration for `signal()'.
  168.  
  169.      The gcc fixincludes/fixproto script should probably fix this when
  170.      gcc installs its modified set of header files, but I don't think
  171.      that's been done yet.
  172.  
  173.    * There is a bug with the makeinfo program that is distributed with
  174.      texinfo-3.1 that causes the indices in Octave's on-line manual to
  175.      be generated incorrectly.  If you need to recreate the on-line
  176.      documentation, you should get the makeinfo program that is
  177.      distributed with texinfo-3.1 and apply the patch for makeinfo that
  178.      is distributed with Octave.  See the file MAKEINFO.PATCH for more
  179.      details.
  180.  
  181.    * If you don't have NPSOL but you still want to be able to solve
  182.      NLPs, or if you don't have QPSOL but you still want to solve QPs,
  183.      you'll need to find replacements or order them from Stanford.  If
  184.      you know of a freely redistributable replacement, please let us
  185.      know--we might be interested in distributing it with Octave.
  186.  
  187.      You can get more information about NPSOL and QPSOL from
  188.  
  189.           Stanford University
  190.           Office of Technology Licensing
  191.           857 Serra Street
  192.           Stanford CA 94305-6225
  193.           Tel: (415) 723-0651
  194.           Fax: (415) 725-7295
  195.  
  196.      Octave may soon support FSQP, an NLP solver from Andre Tits
  197.      (andre@src.umd.edu) of the University of Maryland.  FSQP is
  198.      available free of charge to academic sites, but can not be
  199.      redistributed to third parties.
  200.  
  201.    * Some of the Fortran subroutines may fail to compile with older
  202.      versions of the Sun Fortran compiler.  If you get errors like
  203.  
  204.           zgemm.f:
  205.               zgemm:
  206.           warning: unexpected parent of complex expression subtree
  207.           zgemm.f, line 245: warning: unexpected parent of complex expression subtree
  208.           warning: unexpected parent of complex expression subtree
  209.           zgemm.f, line 304: warning: unexpected parent of complex expression subtree
  210.           warning: unexpected parent of complex expression subtree
  211.           zgemm.f, line 327: warning: unexpected parent of complex expression subtree
  212.           pcc_binval: missing IR_CONV in complex op
  213.           make[2]: *** [zgemm.o] Error 1
  214.  
  215.      when compiling the Fortran subroutines in the `libcruft'
  216.      subdirectory, you should either upgrade your compiler or try
  217.      compiling with optimization turned off.
  218.  
  219.    * On NeXT systems, if you get errors like this:
  220.  
  221.           /usr/tmp/cc007458.s:unknown:Undefined local symbol LBB7656
  222.           /usr/tmp/cc007458.s:unknown:Undefined local symbol LBE7656
  223.  
  224.      when compiling `Array.cc' and `Matrix.cc', try recompiling these
  225.      files without `-g'.
  226.  
  227.    * Some people have reported that calls to shell_cmd and the pager do
  228.      not work on SunOS systems.  This is apparently due to having
  229.      `G_HAVE_SYS_WAIT' defined to be 0 instead of 1 when compiling
  230.      libg++.
  231.  
  232.    * On NeXT systems, linking to `libsys_s.a' may fail to resolve the
  233.      following functions
  234.  
  235.           _tcgetattr
  236.           _tcsetattr
  237.           _tcflow
  238.  
  239.      which are part of `libposix.a'.  Unfortunately, linking Octave with
  240.      `-posix' results in the following undefined symbols.
  241.  
  242.           .destructors_used
  243.           .constructors_used
  244.           _objc_msgSend
  245.           _NXGetDefaultValue
  246.           _NXRegisterDefaults
  247.           .objc_class_name_NXStringTable
  248.           .objc_class_name_NXBundle
  249.  
  250.      One kludge around this problem is to extract `termios.o' from
  251.      `libposix.a', put it in Octave's `src' directory, and add it to
  252.      the list of files to link together in the Makefile.  Suggestions
  253.      for better ways to solve this problem are welcome!
  254.  
  255.    * With g++ 2.6.3 (and possibly other 2.6.x versions) on some Intel
  256.      x86 systems, compiling `Array-d.cc' fails with the messages like
  257.  
  258.           as: /tmp/cc005254.s:4057: Local symbol LBB103 never defined.
  259.           as: /tmp/cc005254.s:4057: Local symbol LBE103 never defined.
  260.  
  261.      A possible workaround for this is to compile without `-g'.
  262.  
  263.    * If Octave crashes immediately with a floating point exception, it
  264.      is likely that it is failing to initialize the IEEE floating point
  265.      values for infinity and NaN.
  266.  
  267.      If your system actually does support IEEE arithmetic, you should
  268.      be able to fix this problem by modifying the function
  269.      `octave_ieee_init' in the file `sysdep.cc' to correctly initialize
  270.      Octave's internal infinity and NaN variables.
  271.  
  272.      If your system does not support IEEE arithmetic but Octave's
  273.      configure script incorrectly determined that it does, you can work
  274.      around the problem by editing the file `config.h' to not define
  275.      `HAVE_ISINF', `HAVE_FINITE', and `HAVE_ISNAN'.
  276.  
  277.      In any case, please report this as a bug since it might be
  278.      possible to modify Octave's configuration script to automatically
  279.      determine the proper thing to do.
  280.  
  281. Binary Distributions
  282. ====================
  283.  
  284.    This section contains instructions for creating and installing a
  285. binary distribution.
  286.  
  287. Installing Octave from a Binary Distribution
  288. --------------------------------------------
  289.  
  290.    * To install Octave from a binary distribution, execute the command
  291.  
  292.           sh ./doinstall.sh
  293.  
  294.      in the top level directory of the distribution.
  295.  
  296.      Binary distributions are normally compiled assuming that Octave
  297.      will be installed in the following subdirectories of `/usr/local'.
  298.  
  299.     `bin'
  300.           Octave and other binaries that people will want to run
  301.           directly.
  302.  
  303.     `man/man1'
  304.           Unix-style man pages describing Octave.
  305.  
  306.     `info'
  307.           Info files describing Octave.
  308.  
  309.     `lib/octave/VERSION/m'
  310.           Function files distributed with Octave.  This includes the
  311.           Octave version, so that multiple versions of Octave may be
  312.           installed at the same time.
  313.  
  314.     `lib/octave/VERSION/exec/HOST_TYPE'
  315.           Executables to be run by Octave rather than the user.
  316.  
  317.     `lib/octave/VERSION/imagelib'
  318.           Image files that are distributed with Octave.
  319.  
  320.      where VERSION stands for the current version number of the
  321.      interpreter, and HOST_TYPE is the type of computer on which Octave
  322.      is installed (for example, `i486-unknown-gnu').
  323.  
  324.      If these directories don't exist, the script `doinstall.sh' will
  325.      create them for you.
  326.  
  327.      If this is possible for you to install Octave in `/usr/local', or
  328.      if you would prefer to install it in a different directory, you can
  329.      specify the name of the top level directory as an argument to the
  330.      doinstall.sh script.  For example:
  331.  
  332.           sh ./doinstall.sh /some/other/directory
  333.  
  334.      Octave will then be installed in subdirectories of the directory
  335.      `/some/other/directory'
  336.  
  337. Creating a Binary Distribution
  338. ------------------------------
  339.  
  340.    Here is how to build a binary distribution for others.
  341.  
  342.    * Build Octave in the same directory as the source.  This is required
  343.      since the `binary-dist' targets in the Makefiles will not work if
  344.      you compile outside the source tree.
  345.  
  346.    * Use `CFLAGS=-O CXXFLAGS=-O LDFLAGS=' as arguments for Make because
  347.      most people who get the binary distributions are probably not
  348.      going to be interested in debugging Octave.
  349.  
  350.    * Type `make binary-dist'.  This will build everything and then pack
  351.      it up for distribution.
  352.  
  353.