annotate README.Linux @ 2601:3723512a827a

[project @ 1997-01-06 05:43:16 by jwe]
author jwe
date Mon, 06 Jan 1997 05:44:24 +0000
parents c454cd888ada
children 9cbbbcf5b6f5
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
2601
3723512a827a [project @ 1997-01-06 05:43:16 by jwe]
jwe
parents: 2600
diff changeset
96 If you can't edit the gcc specs file for some reason, another solution
3723512a827a [project @ 1997-01-06 05:43:16 by jwe]
jwe
parents: 2600
diff changeset
97 that should work is to create an empty libieee.a file in the Octave
3723512a827a [project @ 1997-01-06 05:43:16 by jwe]
jwe
parents: 2600
diff changeset
98 src directory using the command:
3723512a827a [project @ 1997-01-06 05:43:16 by jwe]
jwe
parents: 2600
diff changeset
99
3723512a827a [project @ 1997-01-06 05:43:16 by jwe]
jwe
parents: 2600
diff changeset
100 ar cq libieee.a
3723512a827a [project @ 1997-01-06 05:43:16 by jwe]
jwe
parents: 2600
diff changeset
101
2598
36a4daa9e3c7 [project @ 1996-12-19 02:27:21 by jwe]
jwe
parents: 2597
diff changeset
102 My system doesn't have g77
36a4daa9e3c7 [project @ 1996-12-19 02:27:21 by jwe]
jwe
parents: 2597
diff changeset
103 --------------------------
36a4daa9e3c7 [project @ 1996-12-19 02:27:21 by jwe]
jwe
parents: 2597
diff changeset
104
36a4daa9e3c7 [project @ 1996-12-19 02:27:21 by jwe]
jwe
parents: 2597
diff changeset
105 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
106 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
107 There is also a Debian package for g77.
36a4daa9e3c7 [project @ 1996-12-19 02:27:21 by jwe]
jwe
parents: 2597
diff changeset
108
2600
c454cd888ada [project @ 1996-12-19 22:35:54 by jwe]
jwe
parents: 2598
diff changeset
109 Problems with g77 on Debian 1.2 systems (and possibly others)
c454cd888ada [project @ 1996-12-19 22:35:54 by jwe]
jwe
parents: 2598
diff changeset
110 -------------------------------------------------------------
c454cd888ada [project @ 1996-12-19 22:35:54 by jwe]
jwe
parents: 2598
diff changeset
111
c454cd888ada [project @ 1996-12-19 22:35:54 by jwe]
jwe
parents: 2598
diff changeset
112 The location of the compiler binaries has changed, so the g77 0.5.18
c454cd888ada [project @ 1996-12-19 22:35:54 by jwe]
jwe
parents: 2598
diff changeset
113 package can not be used without modification. The problem is that the
c454cd888ada [project @ 1996-12-19 22:35:54 by jwe]
jwe
parents: 2598
diff changeset
114 Debian package was built for gcc 2.7.2 and not 2.7.2.1 and the f771
c454cd888ada [project @ 1996-12-19 22:35:54 by jwe]
jwe
parents: 2598
diff changeset
115 backend is installed in the wrong directory.
c454cd888ada [project @ 1996-12-19 22:35:54 by jwe]
jwe
parents: 2598
diff changeset
116
c454cd888ada [project @ 1996-12-19 22:35:54 by jwe]
jwe
parents: 2598
diff changeset
117 Version 0.5.19 of g77 has just been released. A fixed Debian package
c454cd888ada [project @ 1996-12-19 22:35:54 by jwe]
jwe
parents: 2598
diff changeset
118 may be made available soon. Until then, you can make things work by
c454cd888ada [project @ 1996-12-19 22:35:54 by jwe]
jwe
parents: 2598
diff changeset
119 copying f771 and libf2c.a from /usr/lib/gcc-lib/i486-linux/2.7.2 to
c454cd888ada [project @ 1996-12-19 22:35:54 by jwe]
jwe
parents: 2598
diff changeset
120 /usr/lib/gcc-lib/i486-linux/2.7.2.1.
c454cd888ada [project @ 1996-12-19 22:35:54 by jwe]
jwe
parents: 2598
diff changeset
121
2596
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
122 Upgrading your compiler and libraries
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
123 -------------------------------------
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
124
2598
36a4daa9e3c7 [project @ 1996-12-19 02:27:21 by jwe]
jwe
parents: 2597
diff changeset
125 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
126 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
127 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
128 notes for the compiler and libraries.
36a4daa9e3c7 [project @ 1996-12-19 02:27:21 by jwe]
jwe
parents: 2597
diff changeset
129
2601
3723512a827a [project @ 1997-01-06 05:43:16 by jwe]
jwe
parents: 2600
diff changeset
130 If you decide to install versions of the libraries that are older (or
3723512a827a [project @ 1997-01-06 05:43:16 by jwe]
jwe
parents: 2600
diff changeset
131 newer) than the ones you already have, you should follow the
3723512a827a [project @ 1997-01-06 05:43:16 by jwe]
jwe
parents: 2600
diff changeset
132 directions in the release notes very carefully.
3723512a827a [project @ 1997-01-06 05:43:16 by jwe]
jwe
parents: 2600
diff changeset
133
3723512a827a [project @ 1997-01-06 05:43:16 by jwe]
jwe
parents: 2600
diff changeset
134
2598
36a4daa9e3c7 [project @ 1996-12-19 02:27:21 by jwe]
jwe
parents: 2597
diff changeset
135 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
136 bug-octave@bevo.che.wisc.edu.
2593
3190d595d0da [project @ 1996-12-14 15:45:39 by jwe]
jwe
parents:
diff changeset
137
3190d595d0da [project @ 1996-12-14 15:45:39 by jwe]
jwe
parents:
diff changeset
138 John W. Eaton
3190d595d0da [project @ 1996-12-14 15:45:39 by jwe]
jwe
parents:
diff changeset
139 jwe@bevo.che.wisc.edu
3190d595d0da [project @ 1996-12-14 15:45:39 by jwe]
jwe
parents:
diff changeset
140 University of Wisconsin-Madison
3190d595d0da [project @ 1996-12-14 15:45:39 by jwe]
jwe
parents:
diff changeset
141 Department of Chemical Engineering
3190d595d0da [project @ 1996-12-14 15:45:39 by jwe]
jwe
parents:
diff changeset
142
2600
c454cd888ada [project @ 1996-12-19 22:35:54 by jwe]
jwe
parents: 2598
diff changeset
143 Thu Dec 19 13:07:46 1996