annotate README.Linux @ 2598:36a4daa9e3c7

[project @ 1996-12-19 02:27:21 by jwe]
author jwe
date Thu, 19 Dec 1996 02:27:22 +0000
parents 106ae3df29f5
children c454cd888ada
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2593
3190d595d0da [project @ 1996-12-14 15:45:39 by jwe]
jwe
parents:
diff changeset
1 Since July 1996, most work on Octave has been done using a
2596
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
2 Linux/GNU system, and a number of people who regularly test Octave
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
3 snapshot releases also primarily use Linux/GNU systems.
2593
3190d595d0da [project @ 1996-12-14 15:45:39 by jwe]
jwe
parents:
diff changeset
4
2596
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
5 However, I have recently started to receive a significant number of
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
6 reports from people who say that they can't compile or run Octave on
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
7 Linux/GNU systems. In nearly every case, the problem has turned out
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
8 to be that the compilers or libraries have not been installed
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
9 properly. I suspect that this often results from a botched upgrade,
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
10 or from attempting to install the compilers from the standard source
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
11 distributions. But in some cases, the cause has been a buggy Linux
2597
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2596
diff changeset
12 distribution. Many of these problems go unnoticed because much of the
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2596
diff changeset
13 software for Linux is written in C, not C++.
2593
3190d595d0da [project @ 1996-12-14 15:45:39 by jwe]
jwe
parents:
diff changeset
14
2596
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
15 Octave compiles, but it won't run
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
16 ---------------------------------
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
17
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
18 If you can compile Octave, but it crashes with a segmentation fault
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
19 right away, you probably have incompatible versions of libc and libg++
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
20 installed, or you have a version of the dynamic loader, ld.so, that is
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
21 incompatible with your versions of the libraries, or both.
2593
3190d595d0da [project @ 1996-12-14 15:45:39 by jwe]
jwe
parents:
diff changeset
22
3190d595d0da [project @ 1996-12-14 15:45:39 by jwe]
jwe
parents:
diff changeset
23 On my development system, I am using the following software:
3190d595d0da [project @ 1996-12-14 15:45:39 by jwe]
jwe
parents:
diff changeset
24
3190d595d0da [project @ 1996-12-14 15:45:39 by jwe]
jwe
parents:
diff changeset
25 * Linux kernel 2.0.6
3190d595d0da [project @ 1996-12-14 15:45:39 by jwe]
jwe
parents:
diff changeset
26 * gcc/g++ 2.7.2
3190d595d0da [project @ 1996-12-14 15:45:39 by jwe]
jwe
parents:
diff changeset
27 * libg++/libstdc++ 2.7.1.0
3190d595d0da [project @ 1996-12-14 15:45:39 by jwe]
jwe
parents:
diff changeset
28 * libm 5.0.5
3190d595d0da [project @ 1996-12-14 15:45:39 by jwe]
jwe
parents:
diff changeset
29 * libc 5.2.18
3190d595d0da [project @ 1996-12-14 15:45:39 by jwe]
jwe
parents:
diff changeset
30 * libncurses 3.0
3190d595d0da [project @ 1996-12-14 15:45:39 by jwe]
jwe
parents:
diff changeset
31 * ld.so 1.7.14
3190d595d0da [project @ 1996-12-14 15:45:39 by jwe]
jwe
parents:
diff changeset
32
3190d595d0da [project @ 1996-12-14 15:45:39 by jwe]
jwe
parents:
diff changeset
33 I know from experience that the versions listed above seem to work
2596
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
34 well together. But if you have a newer version of the kernel, you may
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
35 need a newer version of the C library. I don't have time to keep up
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
36 with all the various library versions (life is much too short for
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
37 that), nor do I know which combinations are supposed to work together.
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
38 That sort of information should be clearly stated in the release notes
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
39 for the libraries. If it is not, please ask the maintainers of the
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
40 libraries to clarify the documentation.
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
41
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
42 Octave won't even compile
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
43 -------------------------
2593
3190d595d0da [project @ 1996-12-14 15:45:39 by jwe]
jwe
parents:
diff changeset
44
3190d595d0da [project @ 1996-12-14 15:45:39 by jwe]
jwe
parents:
diff changeset
45 If you can't compile Octave, you should first check to see that your
3190d595d0da [project @ 1996-12-14 15:45:39 by jwe]
jwe
parents:
diff changeset
46 compiler and header files are properly installed. Do you have
3190d595d0da [project @ 1996-12-14 15:45:39 by jwe]
jwe
parents:
diff changeset
47 multiple versions of the g++ include files on your system? Are you
2596
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
48 sure that your copy of g++ is finding the right set? You can find out
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
49 by compiling a simple C++ program with -v:
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
50
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
51 bash$ cat foo.cc
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
52 #include <iostream.h>
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
53 int main (void} { cerr << "yo\n"; return 0; }
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
54
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
55 bash$ g++ -v foo.cc
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
56 gcc -v foo.cc -lg++ -lstdc++ -lm
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
57 Reading specs from /usr/lib/gcc-lib/i486-linux/2.7.2/specs
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
58 gcc version 2.7.2
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
59 /usr/lib/gcc-lib/i486-linux/2.7.2/cpp -lang-c++ -v -undef ...
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
60 #include "..." search starts here:
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
61 #include <...> search starts here:
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
62 /usr/lib/g++-include
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
63 /usr/local/include
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
64 /usr/i486-linux/include
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
65 /usr/lib/gcc-lib/i486-linux/2.7.2/include
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
66 /usr/include
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
67 End of search list.
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
68 ...
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
69
2597
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2596
diff changeset
70 If the location of the correct set of include files is not listed in
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2596
diff changeset
71 the search path, then you might be able to fix that with a symbolic
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2596
diff changeset
72 link. However, if your version of libg++ was not compiled with your
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2596
diff changeset
73 current version of gcc, you are likely to run into more trouble.
2596
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
74
2598
36a4daa9e3c7 [project @ 1996-12-19 02:27:21 by jwe]
jwe
parents: 2597
diff changeset
75 The linker can't find -lieee
36a4daa9e3c7 [project @ 1996-12-19 02:27:21 by jwe]
jwe
parents: 2597
diff changeset
76 ----------------------------
36a4daa9e3c7 [project @ 1996-12-19 02:27:21 by jwe]
jwe
parents: 2597
diff changeset
77
36a4daa9e3c7 [project @ 1996-12-19 02:27:21 by jwe]
jwe
parents: 2597
diff changeset
78 This can happen because your libraries don't match your version of
36a4daa9e3c7 [project @ 1996-12-19 02:27:21 by jwe]
jwe
parents: 2597
diff changeset
79 gcc. Some recent Linux distributions don't include a libieee.a file
36a4daa9e3c7 [project @ 1996-12-19 02:27:21 by jwe]
jwe
parents: 2597
diff changeset
80 because IEEE support is now the default and the library is no longer
36a4daa9e3c7 [project @ 1996-12-19 02:27:21 by jwe]
jwe
parents: 2597
diff changeset
81 needed, but the gcc specs file still adds -lieee to the linker command
36a4daa9e3c7 [project @ 1996-12-19 02:27:21 by jwe]
jwe
parents: 2597
diff changeset
82 if gcc is invoked with the -mieeefp flag. I believe that you should
36a4daa9e3c7 [project @ 1996-12-19 02:27:21 by jwe]
jwe
parents: 2597
diff changeset
83 be able to fix this by editing the gcc specs file. In it, you should
36a4daa9e3c7 [project @ 1996-12-19 02:27:21 by jwe]
jwe
parents: 2597
diff changeset
84 find something like this:
36a4daa9e3c7 [project @ 1996-12-19 02:27:21 by jwe]
jwe
parents: 2597
diff changeset
85
36a4daa9e3c7 [project @ 1996-12-19 02:27:21 by jwe]
jwe
parents: 2597
diff changeset
86 %{!shared: %{mieee-fp:-lieee} %{p:-lgmon} %{pg:-lgmon} \
36a4daa9e3c7 [project @ 1996-12-19 02:27:21 by jwe]
jwe
parents: 2597
diff changeset
87 %{!ggdb:-lc} %{ggdb:-lg}}
36a4daa9e3c7 [project @ 1996-12-19 02:27:21 by jwe]
jwe
parents: 2597
diff changeset
88
36a4daa9e3c7 [project @ 1996-12-19 02:27:21 by jwe]
jwe
parents: 2597
diff changeset
89 changing it to
36a4daa9e3c7 [project @ 1996-12-19 02:27:21 by jwe]
jwe
parents: 2597
diff changeset
90
36a4daa9e3c7 [project @ 1996-12-19 02:27:21 by jwe]
jwe
parents: 2597
diff changeset
91 %{!shared: %{p:-lgmon} %{pg:-lgmon} %{!ggdb:-lc} %{ggdb:-lg}}
36a4daa9e3c7 [project @ 1996-12-19 02:27:21 by jwe]
jwe
parents: 2597
diff changeset
92
36a4daa9e3c7 [project @ 1996-12-19 02:27:21 by jwe]
jwe
parents: 2597
diff changeset
93 should keep gcc from adding -lieee to the link command. You can find
36a4daa9e3c7 [project @ 1996-12-19 02:27:21 by jwe]
jwe
parents: 2597
diff changeset
94 the location of the specs file by running the command gcc -v.
36a4daa9e3c7 [project @ 1996-12-19 02:27:21 by jwe]
jwe
parents: 2597
diff changeset
95
36a4daa9e3c7 [project @ 1996-12-19 02:27:21 by jwe]
jwe
parents: 2597
diff changeset
96 My system doesn't have g77
36a4daa9e3c7 [project @ 1996-12-19 02:27:21 by jwe]
jwe
parents: 2597
diff changeset
97 --------------------------
36a4daa9e3c7 [project @ 1996-12-19 02:27:21 by jwe]
jwe
parents: 2597
diff changeset
98
36a4daa9e3c7 [project @ 1996-12-19 02:27:21 by jwe]
jwe
parents: 2597
diff changeset
99 A binary release of g77 that should work with gcc 2.7.2 is available
36a4daa9e3c7 [project @ 1996-12-19 02:27:21 by jwe]
jwe
parents: 2597
diff changeset
100 from sunsite.unc.edu in the directory /pub/Linux/devel/lang/fortran.
36a4daa9e3c7 [project @ 1996-12-19 02:27:21 by jwe]
jwe
parents: 2597
diff changeset
101 There is also a Debian package for g77.
36a4daa9e3c7 [project @ 1996-12-19 02:27:21 by jwe]
jwe
parents: 2597
diff changeset
102
2596
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
103 Upgrading your compiler and libraries
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
104 -------------------------------------
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
105
2598
36a4daa9e3c7 [project @ 1996-12-19 02:27:21 by jwe]
jwe
parents: 2597
diff changeset
106 Installing libg++ on a Linux system is not as simple as it should be,
36a4daa9e3c7 [project @ 1996-12-19 02:27:21 by jwe]
jwe
parents: 2597
diff changeset
107 because libg++ shares some basic I/O code with the Linux C library,
36a4daa9e3c7 [project @ 1996-12-19 02:27:21 by jwe]
jwe
parents: 2597
diff changeset
108 and they must be compatible. You should get and read the release
36a4daa9e3c7 [project @ 1996-12-19 02:27:21 by jwe]
jwe
parents: 2597
diff changeset
109 notes for the compiler and libraries.
36a4daa9e3c7 [project @ 1996-12-19 02:27:21 by jwe]
jwe
parents: 2597
diff changeset
110
36a4daa9e3c7 [project @ 1996-12-19 02:27:21 by jwe]
jwe
parents: 2597
diff changeset
111 If you have comments or suggestions for this document, please contact
36a4daa9e3c7 [project @ 1996-12-19 02:27:21 by jwe]
jwe
parents: 2597
diff changeset
112 bug-octave@bevo.che.wisc.edu.
2593
3190d595d0da [project @ 1996-12-14 15:45:39 by jwe]
jwe
parents:
diff changeset
113
3190d595d0da [project @ 1996-12-14 15:45:39 by jwe]
jwe
parents:
diff changeset
114 John W. Eaton
3190d595d0da [project @ 1996-12-14 15:45:39 by jwe]
jwe
parents:
diff changeset
115 jwe@bevo.che.wisc.edu
3190d595d0da [project @ 1996-12-14 15:45:39 by jwe]
jwe
parents:
diff changeset
116 University of Wisconsin-Madison
3190d595d0da [project @ 1996-12-14 15:45:39 by jwe]
jwe
parents:
diff changeset
117 Department of Chemical Engineering
3190d595d0da [project @ 1996-12-14 15:45:39 by jwe]
jwe
parents:
diff changeset
118
2598
36a4daa9e3c7 [project @ 1996-12-19 02:27:21 by jwe]
jwe
parents: 2597
diff changeset
119 Tue Dec 17 13:24:52 1996