1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937
|
This file documents the installation of Octave.
Octave is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation.
*Note*: This file is automatically generated from
'doc/interpreter/install.txi' in the Octave sources. To update the
documentation make changes to the .txi source file rather than this
derived file.
1 Installing Octave
*******************
The procedure for installing Octave from source on a Unix-like system is
described next. Building on other platforms will follow similar steps.
Note that this description applies to Octave releases. Building the
development sources from the Mercurial archive requires additional steps
as described in the development source itself.
1.1 Build Dependencies
======================
Octave is a fairly large program with many build dependencies. You may
be able to find pre-packaged versions of the dependencies distributed as
part of your system, or you may have to build some or all of them
yourself.
1.1.1 Obtaining the Dependencies Automatically
----------------------------------------------
On some systems you can obtain many of Octave's build dependencies
automatically. The commands for doing this vary by system. Similarly,
the names of pre-compiled packages vary by system and do not always
match exactly the names listed in *note Build Tools:: and *note External
Packages::.
You will usually need the development version of an external
dependency so that you get the libraries and header files for building
software, not just for running already compiled programs. These
packages typically have names that end with the suffix '-dev' or
'-devel'.
On systems with 'apt-get' (Debian, Ubuntu, etc.), you may be able to
install most of the tools and external packages using a command similar
to
apt-get build-dep octave
The specific package name may be 'octave3.2' or 'octave3.4'. The set of
required tools and external dependencies does not change frequently, so
it is not important that the version match exactly, but you should use
the most recent one available.
On systems with 'yum' (Fedora, Red Hat, etc.), you may be able to
install most of the tools and external packages using a command similar
to
yum-builddep octave
The 'yum-builddep' utility is part of the 'yum-utils' package.
For either type of system, the package name may include a version
number. The set of required tools and external dependencies does not
change frequently, so it is not important that the version exactly match
the version you are installing, but you should use the most recent one
available.
1.1.2 Build Tools
-----------------
The following tools are required:
C++, C, and Fortran compilers
The Octave sources are primarily written in C++, but some portions
are also written in C and Fortran. The Octave sources are intended
to be portable. Recent versions of the GNU compiler collection
(GCC) should work (<https://gcc.gnu.org>). If you use GCC, you
should avoid mixing versions. For example, be sure that you are
not using the obsolete 'g77' Fortran compiler with modern versions
of 'gcc' and 'g++'.
GNU Make
Tool for building software (<https://www.gnu.org/software/make>).
Octave's build system requires GNU Make. Other versions of Make
will not work. Fortunately, GNU Make is highly portable and easy
to install.
AWK, sed, and other Unix utilities
Basic Unix system utilities are required for building Octave. All
will be available with any modern Unix system and also on Windows
with either Cygwin or MinGW and MSYS.
Additionally, the following tools may be needed:
Bison
Parser generator (<https://www.gnu.org/software/bison>). You will
need Bison if you modify the 'oct-parse.yy' source file or if you
delete the files that are generated from it.
Flex
Lexer analyzer (<https://www.gnu.org/software/flex>). You will
need Flex if you modify the 'lex.ll' source file or if you delete
the files that are generated from it.
Autoconf
Package for software configuration
(<https://www.gnu.org/software/autoconf>). Autoconf is required if
you modify Octave's 'configure.ac' file or other files that it
requires.
Automake
Package for Makefile generation
(<https://www.gnu.org/software/automake>). Automake is required if
you modify Octave's 'Makefile.am' files or other files that they
depend on.
Libtool
Package for building software libraries
(<https://www.gnu.org/software/libtool>). Libtool is required by
Automake.
gperf
Perfect hash function generator
(<https://www.gnu.org/software/gperf>). You will need gperf if you
modify the 'octave.gperf' file or if you delete the file that is
generated from it.
Texinfo
Package for generating online and print documentation
(<https://www.gnu.org/software/texinfo>). You will need Texinfo to
build Octave's documentation or if you modify the documentation
source files or the docstring of any Octave function.
1.1.3 External Packages
-----------------------
The following external packages are required:
BLAS
Basic Linear Algebra Subroutine library. Accelerated BLAS
libraries such as OpenBLAS (<https://www.openblas.net/>) or ATLAS
(<http://math-atlas.sourceforge.net>) are recommended for best
performance. The reference implementation
(<http://www.netlib.org/blas>) is slow, unmaintained, and suffers
from certain bugs in corner case inputs.
LAPACK
Linear Algebra Package (<http://www.netlib.org/lapack>).
PCRE
The Perl Compatible Regular Expression library
(<https://www.pcre.org>).
The following external package is optional but strongly recommended:
GNU Readline
Command-line editing library (<https://www.gnu.org/s/readline>).
If you wish to build Octave without GNU readline installed, you must
use the '--disable-readline' option when running the configure script.
The following external software packages are optional but
recommended:
ARPACK
Library for the solution of large-scale eigenvalue problems
(<https://forge.scilab.org/index.php/p/arpack-ng>). ARPACK is
required to provide the functions 'eigs' and 'svds'.
cURL
Library for transferring data with URL syntax
(<https://curl.haxx.se>). cURL is required to provide the
'urlread' and 'urlwrite' functions and the 'ftp' class.
FFTW3
Library for computing discrete Fourier transforms
(<http://www.fftw.org>). FFTW3 is used to provide better
performance for functions that compute discrete Fourier transforms
('fft', 'ifft', 'fft2', etc.)
FLTK
Portable GUI toolkit (<http://www.fltk.org>). FLTK can be used to
provide windows for Octave's OpenGL-based graphics functions.
fontconfig
Library for configuring and customizing font access
(<https://www.freedesktop.org/wiki/Software/fontconfig>).
Fontconfig is used to manage fonts for Octave's OpenGL-based
graphics functions.
FreeType
Portable font engine (<https://www.freetype.org>). FreeType is
used to perform font rendering for Octave's OpenGL-based graphics
functions.
GLPK
GNU Linear Programming Kit (<https://www.gnu.org/software/glpk>).
GPLK is required for the function 'glpk'.
gl2ps
OpenGL to PostScript printing library
(<https://www.geuz.org/gl2ps/>). gl2ps is required for printing
when using OpenGL-based graphics toolkits (currently either FLTK or
Qt).
gnuplot
Interactive graphics program (<http://www.gnuplot.info>). gnuplot
can be used as a graphics renderer for Octave; prior to Octave 4.0,
gnuplot was the default graphics renderer.
GraphicsMagick++
Image processing library (<http://www.graphicsmagick.org>).
GraphicsMagick++ is used to provide the 'imread' and 'imwrite'
functions.
HDF5
Library for manipulating portable data files
(<https://www.hdfgroup.org/HDF5>). HDF5 is required for Octave's
'load' and 'save' commands to read and write HDF data files.
Java Development Kit
Java programming language compiler and libraries. The OpenJDK free
software implementation is recommended
(<http://openjdk.java.net/>), although other JDK implementations
may work. Java is required to be able to call Java functions from
within Octave.
LLVM
Compiler framework, (<https://www.llvm.org>). LLVM is required for
Octave's experimental just-in-time (JIT) compilation for speeding
up the interpreter.
OpenGL
API for portable 2-D and 3-D graphics (<https://www.opengl.org>).
An OpenGL implementation can be used to provide a renderer for
Octave's graphics functions. Octave's OpenGL-based graphics
functions usually outperform the gnuplot-based graphics functions
because plot data can be rendered directly instead of sending data
and commands to gnuplot for interpretation and rendering. Since
Octave 4.0, the default graphics renderer ("qt") has been
OpenGL-based.
PortAudio
PortAudio (<http://www.portaudio.com/>) provides a very simple API
for recording and/or playing sound using a simple callback function
or a blocking read/write interface. It is required for the audio
processing functions 'audioplayer', 'audiorecorder', and
'audiodevinfo'.
Qhull
Computational geometry library (<http://www.qhull.org>). Qhull is
required to provide the functions 'convhull', 'convhulln',
'delaunay', 'delaunayn', 'voronoi', and 'voronoin'.
QRUPDATE
QR factorization updating library
(<https://sourceforge.net/projects/qrupdate>). QRUPDATE is used to
provide improved performance for the functions 'qrdelete',
'qrinsert', 'qrshift', and 'qrupdate'.
QScintilla
Source code highlighter and manipulator; a Qt port of Scintilla
(<http://www.riverbankcomputing.co.uk/software/qscintilla>).
QScintilla is used for syntax highlighting and code completion in
the GUI.
Qt
GUI and utility libraries (<https://www.qt.io>). Qt is required
for building the GUI. It is a large framework, but the only
components required are the GUI, core, and network modules. Since
Octave 4.0, the default graphics renderer ("qt") has been Qt-based,
which has been OpenGL-based.
SuiteSparse
Sparse matrix factorization library
(<http://faculty.cse.tamu.edu/davis/suitesparse.html>).
SuiteSparse is required to provide sparse matrix factorizations and
solution of linear equations for sparse systems.
SUNDIALS
The SUite of Nonlinear and DIfferential/ALgebraic Equation Solvers
(<https://computation.llnl.gov/projects/sundials>) is required for
the Ordinary Differential Equations (ODE) solvers 'ode15i' and
'ode15s'.
zlib
Data compression library (<https://zlib.net>). The zlib library is
required for Octave's 'load' and 'save' commands to handle
compressed data, including MATLAB v5 MAT files.
1.2 Running Configure and Make
==============================
* Run the shell script 'configure'. This will determine the features
your system has (or doesn't have) and create a file named
'Makefile' from each of the files named 'Makefile.in'.
Here is a summary of the configure options that are most frequently
used when building Octave:
'--help'
Print a summary of the options recognized by the configure
script.
'--prefix=PREFIX'
Install Octave in subdirectories below PREFIX. The default
value of PREFIX is '/usr/local'.
'--srcdir=DIR'
Look for Octave sources in the directory DIR.
'--disable-64'
Disable using 64-bit integers for indexing arrays and use
32-bit integers instead. On systems with 32-bit pointers,
this option is always disabled. If the configure script
determines that your BLAS library uses 32-bit integers, then
operations using the following libraries are limited to arrays
with dimensions that are smaller than 2^{31} elements:
* BLAS
* LAPACK
* QRUPDATE
* SuiteSparse
* ARPACK
Additionally, the following libraries use 'int' internally, so
maximum problem sizes are always limited:
* GLPK
* Qhull
*Note Compiling Octave with 64-bit Indexing::, for more
details about building Octave with more complete support for
large arrays.
'--enable-address-sanitizer-flags'
Enable compiler options '-fsanitize=address' and
'-fomit-frame-pointer' for memory access checking. This
option is primarily used for debugging Octave. Building
Octave with this option has a negative impact on performance
and is not recommended for general use. It may also interfere
with proper functioning of the GUI.
'--disable-docs'
Disable building all forms of the documentation (Info, PDF,
HTML). The default is to build documentation, but your system
will need functioning Texinfo and TeX installs for this to
succeed.
'--enable-float-truncate'
This option allows for truncation of intermediate floating
point results in calculations. It is only necessary for
certain platforms.
'--enable-readline'
Use the readline library to provide for editing of the command
line in terminal environments. This option is on by default.
'--enable-shared'
Create shared libraries (this is the default). If you are
planning to use the dynamic loading features, you will
probably want to use this option. It will make your '.oct'
files much smaller and on some systems it may be necessary to
build shared libraries in order to use dynamically linked
functions.
You may also want to build a shared version of 'libstdc++', if
your system doesn't already have one.
'--with-blas=<lib>'
By default, configure looks for the best BLAS matrix libraries
on your system, including optimized implementations such as
the free ATLAS 3.0, as well as vendor-tuned libraries. (The
use of an optimized BLAS will generally result in
several-times faster matrix operations.) Use this option to
specify a particular BLAS library that Octave should use.
'--with-lapack=<lib>'
By default, configure looks for the best LAPACK matrix
libraries on your system, including optimized implementations
such as the free ATLAS 3.0, as well as vendor-tuned libraries.
(The use of an optimized LAPACK will generally result in
several-times faster matrix operations.) Use this option to
specify a particular LAPACK library that Octave should use.
'--with-magick=<lib>'
Select the library to use for image I/O. The two possible
values are "GraphicsMagick" (default) or "ImageMagick".
'--with-sepchar=<char>'
Use <char> as the path separation character. This option can
help when running Octave on non-Unix systems.
'--without-amd'
Don't use AMD, disable some sparse matrix functionality.
'--without-camd'
Don't use CAMD, disable some sparse matrix functionality.
'--without-colamd'
Don't use COLAMD, disable some sparse matrix functionality.
'--without-ccolamd'
Don't use CCOLAMD, disable some sparse matrix functionality.
'--without-cholmod'
Don't use CHOLMOD, disable some sparse matrix functionality.
'--without-curl'
Don't use the cURL library, disable the ftp objects, 'urlread'
and 'urlwrite' functions.
'--without-cxsparse'
Don't use CXSPARSE, disable some sparse matrix functionality.
'--without-fftw3'
Use the included FFTPACK library for computing Fast Fourier
Transforms instead of the FFTW3 library.
'--without-fftw3f'
Use the included FFTPACK library for computing Fast Fourier
Transforms instead of the FFTW3 library when operating on
single precision (float) values.
'--without-glpk'
Don't use the GLPK library for linear programming.
'--without-hdf5'
Don't use the HDF5 library, disable reading and writing of
HDF5 files.
'--without-opengl'
Don't use OpenGL, disable native graphics toolkit for
plotting. You will need 'gnuplot' installed in order to make
plots.
'--without-qhull'
Don't use Qhull, disable 'delaunay', 'convhull', and related
functions.
'--without-qrupdate'
Don't use QRUPDATE, disable QR and Cholesky update functions.
'--without-umfpack'
Don't use UMFPACK, disable some sparse matrix functionality.
'--without-zlib'
Don't use the zlib library, disable data file compression and
support for recent MAT file formats.
'--without-framework-carbon'
Don't use framework Carbon headers, libraries, or specific
source code even if the configure test succeeds (the default
is to use Carbon framework if available). This is a platform
specific configure option for Mac systems.
'--without-framework-opengl'
Don't use framework OpenGL headers, libraries, or specific
source code even if the configure test succeeds. If this
option is given then OpenGL headers and libraries in standard
system locations are tested (the default value is
'--with-framework-opengl'). This is a platform specific
configure option for Mac systems.
See the file 'INSTALL' for more general information about the
command line options used by configure. That file also contains
instructions for compiling in a directory other than the one where
the source is located.
* Run make.
You will need a recent version of GNU Make as Octave relies on
certain features not generally available in all versions of make.
Modifying Octave's makefiles to work with other make programs is
probably not worth your time; instead, we simply recommend
installing GNU Make.
There are currently three options for plotting in Octave: the
external program gnuplot, the internal graphics engine using OpenGL
coupled with either FLTK or Qt widgets. Gnuplot is a
command-driven interactive function plotting program.
To compile Octave, you will need a recent version of 'g++' or other
ANSI C++ compiler. In addition, you will need a Fortran 77
compiler or 'f2c'. If you use 'f2c', you will need a script like
'fort77' that works like a normal Fortran compiler by combining
'f2c' with your C compiler in a single script.
If you plan to modify the parser you will also need GNU 'bison' and
'flex'. If you modify the documentation, you will need GNU
Texinfo.
GNU Make, 'gcc' (and 'libstdc++'), 'gnuplot', 'bison', 'flex', and
Texinfo are all available from many anonymous ftp archives. The
primary site is <ftp://ftp.gnu.org>, but it is often very busy. A
list of sites that mirror the software on <ftp://ftp.gnu.org> is
available by anonymous ftp from
<ftp://ftp.gnu.org/pub/gnu/GNUinfo/FTP>.
Octave requires approximately 1.4 GB of disk storage to unpack and
compile from source (significantly less, 400 MB, if you don't
compile with debugging symbols). To compile without debugging
symbols try the command
make CFLAGS=-O CXXFLAGS=-O LDFLAGS=
instead of just 'make'.
* If you encounter errors while compiling Octave, first see *note
Installation Problems:: for a list of known problems and if there
is a workaround or solution for your problem. If not, see the file
BUGS for information about how to report bugs.
* Once you have successfully compiled Octave, run 'make install'.
This will install a copy of Octave, its libraries, and its
documentation in the destination directory. As distributed, Octave
is installed in the following directories. In the table below,
PREFIX defaults to '/usr/local', VERSION stands for the current
version number of the interpreter, and ARCH is the type of computer
on which Octave is installed (for example, 'i586-unknown-gnu').
'PREFIX/bin'
Octave and other binaries that people will want to run
directly.
'PREFIX/lib/octave-VERSION'
Libraries like liboctave.a and liboctinterp.a.
'PREFIX/include/octave-VERSION/octave'
Include files distributed with Octave.
'PREFIX/share'
Architecture-independent data files.
'PREFIX/share/man/man1'
Unix-style man pages describing Octave.
'PREFIX/share/info'
Info files describing Octave.
'PREFIX/share/octave/VERSION/m'
Function files distributed with Octave. This includes the
Octave version, so that multiple versions of Octave may be
installed at the same time.
'PREFIX/libexec/octave/VERSION/exec/ARCH'
Executables to be run by Octave rather than the user.
'PREFIX/lib/octave/VERSION/oct/ARCH'
Object files that will be dynamically loaded.
'PREFIX/share/octave/VERSION/imagelib'
Image files that are distributed with Octave.
1.3 Compiling Octave with 64-bit Indexing
=========================================
Note: the following only applies to systems that have 64-bit pointers.
Configuring Octave with '--enable-64' cannot magically make a 32-bit
system have a 64-bit address space.
On 64-bit systems, Octave uses 64-bit integers for indexing arrays by
default. If the configure script determines that your BLAS library uses
32-bit integers, then operations using the following libraries are
limited to arrays with dimensions that are smaller than 2^{31} elements:
* BLAS
* LAPACK
* QRUPDATE
* SuiteSparse
* ARPACK
Additionally, the following libraries use 'int' internally, so
maximum problem sizes are always limited:
* GLPK
* Qhull
Except for GLPK and Qhull, these libraries may also be configured to
use 64-bit integers, but most systems do not provide packages built this
way. If you wish to experiment with large arrays, the following
information may be helpful.
To determine the integer size of the BLAS library used by Octave, the
following code can be executed:
clear all;
N = 2^31;
## The following line requires about 8 GB of RAM!
a = b = ones (N, 1, "single");
c = a' * b
If the BLAS library uses 32-bit integers, an error will be thrown:
error: integer dimension or index out of range for Fortran
INTEGER type
Otherwise, if the BLAS library uses 64-bit integers, the result is:
c = 2^31 = 2147483648
Note that the test case above usually requires twice the memory, if A
and B are not assigned by 'a = b = ...'. Note further, that the data
type 'single' has a precision of about 23 binary bits. In this
particular example no rounding errors occur.
The following instructions were tested with the development version
of Octave and GCC 4.3.4 on an x86_64 Debian system and may be out of
date now. Please report any problems or corrections on the Octave bug
tracker.
The versions listed below are the versions used for testing. If
newer versions of these packages are available, you should try to use
them, although there may be some differences.
All libraries and header files will be installed in subdirectories of
'$prefix64' (you must choose the location of this directory).
* BLAS and LAPACK (<http://www.netlib.org/lapack>)
Reference versions for both libraries are included in the reference
LAPACK 3.2.1 distribution from <http://www.netlib.org/>.
- Copy the file 'make.inc.example' and name it 'make.inc'. The
options '-fdefault-integer-8' and '-fPIC' (on 64-bit CPU) have
to be added to the variable 'OPTS' and 'NOOPT'.
- Once you have compiled this library make sure that you use it
for compiling Suite Sparse and Octave. In the following we
assume that you installed the LAPACK library as
$prefix64/lib/liblapack.a.
* QRUPDATE (<https://sourceforge.net/projects/qrupdate>)
In the 'Makeconf' file:
- Add '-fdefault-integer-8' to 'FFLAGS'.
- Adjust the BLAS and LAPACK variables as needed if your 64-bit
aware BLAS and LAPACK libraries are in a non-standard
location.
- Set 'PREFIX' to the top-level directory of your install tree.
- Run 'make solib' to make a shared library.
- Run 'make install' to install the library.
* SuiteSparse (<http://faculty.cse.tamu.edu/davis/suitesparse.html>)
Pass the following options to 'make' to enable 64-bit integers for
BLAS library calls. On 64-bit Windows systems, use
'-DLONGBLAS="long long"' instead.
CFLAGS='-DLONGBLAS=long'
CXXFLAGS='-DLONGBLAS=long'
The SuiteSparse makefiles don't generate shared libraries. On some
systems, you can generate them by doing something as simple as
top=$(pwd)
for f in *.a; do
mkdir tmp
cd tmp
ar vx ../$f
gcc -shared -o ../${f%%.a}.so *.o
cd $top
rm -rf tmp
done
Other systems may require a different solution.
* ARPACK (<https://forge.scilab.org/index.php/p/arpack-ng/>)
- Add '-fdefault-integer-8' to 'FFLAGS' when running configure.
- Run 'make' to build the library.
- Run 'make install' to install the library.
* ATLAS instead of reference BLAS and LAPACK
Suggestions on how to compile ATLAS would be most welcome.
* GLPK
* Qhull (<http://www.qhull.org>)
Both GLPK and Qhull use 'int' internally so maximum problem sizes
may be limited.
* Octave
Octave's 64-bit index support is activated with the configure
option '--enable-64'.
./configure \
LD_LIBRARY_PATH="$prefix64/lib" \
CPPFLAGS="-I$prefix64/include" LDFLAGS="-L$prefix64/lib" \
--enable-64
You must ensure that all Fortran sources except those in the
'liboctave/external/ranlib' directory are compiled such that
INTEGERS are 8-bytes wide. If you are using gfortran, the
configure script should automatically set the Makefile variable
'F77_INTEGER_8_FLAG' to '-fdefault-integer-8'. If you are using
another compiler, you must set this variable yourself. You should
NOT set this flag in 'FFLAGS', otherwise the files in
'liboctave/external/ranlib' will be miscompiled.
* Other dependencies
Probably nothing special needs to be done for the following
dependencies. If you discover that something does need to be done,
please submit a bug report.
- pcre
- zlib
- hdf5
- fftw3
- cURL
- GraphicsMagick++
- OpenGL
- freetype
- fontconfig
- fltk
1.4 Installation Problems
=========================
This section contains a list of problems (and some apparent problems
that don't really mean anything is wrong) that may show up during
installation of Octave.
* On some SCO systems, 'info' fails to compile if 'HAVE_TERMIOS_H' is
defined in 'config.h'. Simply removing the definition from
'info/config.h' should allow it to compile.
* If 'configure' finds 'dlopen', 'dlsym', 'dlclose', and 'dlerror',
but not the header file 'dlfcn.h', you need to find the source for
the header file and install it in the directory 'usr/include'.
This is reportedly a problem with Slackware 3.1. For Linux/GNU
systems, the source for 'dlfcn.h' is in the 'ldso' package.
* Building '.oct' files doesn't work.
You should probably have a shared version of 'libstdc++'. A patch
is needed to build shared versions of version 2.7.2 of 'libstdc++'
on the HP-PA architecture. You can find the patch at
<ftp://ftp.cygnus.com/pub/g++/libg++-2.7.2-hppa-gcc-fix>.
* On some DEC alpha systems there may be a problem with the 'libdxml'
library, resulting in floating point errors and/or segmentation
faults in the linear algebra routines called by Octave. If you
encounter such problems, then you should modify the configure
script so that 'SPECIAL_MATH_LIB' is not set to '-ldxml'.
* On FreeBSD systems Octave may hang while initializing some internal
constants. The fix appears to be to use
options GPL_MATH_EMULATE
rather than
options MATH_EMULATE
in the kernel configuration files (typically found in the directory
'/sys/i386/conf'). After making this change, you'll need to
rebuild the kernel, install it, and reboot.
* If you encounter errors like
passing `void (*)()' as argument 2 of
`octave_set_signal_handler(int, void (*)(int))'
or
warning: ANSI C++ prohibits conversion from `(int)'
to `(...)'
while compiling 'sighandlers.cc', you may need to edit some files
in the 'gcc' include subdirectory to add proper prototypes for
functions there. For example, Ultrix 4.2 needs proper declarations
for the 'signal' function and the 'SIG_IGN' macro in the file
'signal.h'.
On some systems the 'SIG_IGN' macro is defined to be something like
this:
#define SIG_IGN (void (*)())1
when it should really be something like:
#define SIG_IGN (void (*)(int))1
to match the prototype declaration for the 'signal' function. This
change should also be made for the 'SIG_DFL' and 'SIG_ERR' symbols.
It may be necessary to change the definitions in 'sys/signal.h' as
well.
The 'gcc' 'fixincludes' and 'fixproto' scripts should probably fix
these problems when 'gcc' installs its modified set of header
files, but I don't think that's been done yet.
*You should not change the files in '/usr/include'*. You can find
the 'gcc' include directory tree by running the command
gcc -print-libgcc-file-name
The directory of 'gcc' include files normally begins in the same
directory that contains the file 'libgcc.a'.
* Some of the Fortran subroutines may fail to compile with older
versions of the Sun Fortran compiler. If you get errors like
zgemm.f:
zgemm:
warning: unexpected parent of complex expression subtree
zgemm.f, line 245: warning: unexpected parent of complex
expression subtree
warning: unexpected parent of complex expression subtree
zgemm.f, line 304: warning: unexpected parent of complex
expression subtree
warning: unexpected parent of complex expression subtree
zgemm.f, line 327: warning: unexpected parent of complex
expression subtree
pcc_binval: missing IR_CONV in complex op
make[2]: *** [zgemm.o] Error 1
when compiling the Fortran subroutines in the 'liboctave/external'
subdirectory, you should either upgrade your compiler or try
compiling with optimization turned off.
* On NeXT systems, if you get errors like this:
/usr/tmp/cc007458.s:unknown:Undefined local
symbol LBB7656
/usr/tmp/cc007458.s:unknown:Undefined local
symbol LBE7656
when compiling 'Array.cc' and 'Matrix.cc', try recompiling these
files without '-g'.
* Some people have reported that calls to system() and the pager do
not work on SunOS systems. This is apparently due to having
'G_HAVE_SYS_WAIT' defined to be 0 instead of 1 when compiling
'libg++'.
* On systems where the reference BLAS library is used the following
matrix-by-vector multiplication incorrectly handles NaN values of
the form 'NaN * 0'.
[NaN, 1; 0, 0] * [0; 1]
=>
[ 1
0 ]
correct result =>
[ NaN
0 ]
Install a different BLAS library such as OpenBLAS or ATLAS to
correct this issue.
* On NeXT systems, linking to 'libsys_s.a' may fail to resolve the
following functions
_tcgetattr
_tcsetattr
_tcflow
which are part of 'libposix.a'. Unfortunately, linking Octave with
'-posix' results in the following undefined symbols.
.destructors_used
.constructors_used
_objc_msgSend
_NXGetDefaultValue
_NXRegisterDefaults
.objc_class_name_NXStringTable
.objc_class_name_NXBundle
One kluge around this problem is to extract 'termios.o' from
'libposix.a', put it in Octave's 'src' directory, and add it to the
list of files to link together in the makefile. Suggestions for
better ways to solve this problem are welcome!
* If Octave crashes immediately with a floating point exception, it
is likely that it is failing to initialize the IEEE floating point
values for infinity and NaN.
If your system actually does support IEEE arithmetic, you should be
able to fix this problem by modifying the function
'octave_ieee_init' in the file 'lo-ieee.cc' to correctly initialize
Octave's internal infinity and NaN variables.
If your system does not support IEEE arithmetic but Octave's
configure script incorrectly determined that it does, you can work
around the problem by editing the file 'config.h' to not define
'HAVE_ISINF', 'HAVE_FINITE', and 'HAVE_ISNAN'.
In any case, please report this as a bug since it might be possible
to modify Octave's configuration script to automatically determine
the proper thing to do.
* If Octave is unable to find a header file because it is installed
in a location that is not normally searched by the compiler, you
can add the directory to the include search path by specifying (for
example) 'CPPFLAGS=-I/some/nonstandard/directory' as an argument to
'configure'. Other variables that can be specified this way are
'CFLAGS', 'CXXFLAGS', 'FFLAGS', and 'LDFLAGS'. Passing them as
options to the configure script also records them in the
'config.status' file. By default, 'CPPFLAGS' and 'LDFLAGS' are
empty, 'CFLAGS' and 'CXXFLAGS' are set to "-g -O2" and 'FFLAGS' is
set to "-O".
|