annotate README.Linux @ 2643:c69a267054d1

[project @ 1997-01-29 14:25:57 by jwe]
author jwe
date Wed, 29 Jan 1997 14:25:57 +0000
parents 337a09dd1c06
children 044ff6e8b739
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2602
9cbbbcf5b6f5 [project @ 1997-01-07 06:18:23 by jwe]
jwe
parents: 2601
diff changeset
1 Since July 1996, most work on Octave has been done using a Linux
9cbbbcf5b6f5 [project @ 1997-01-07 06:18:23 by jwe]
jwe
parents: 2601
diff changeset
2 system, and a number of people who regularly test Octave snapshot
9cbbbcf5b6f5 [project @ 1997-01-07 06:18:23 by jwe]
jwe
parents: 2601
diff changeset
3 releases also primarily use Linux 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
2602
9cbbbcf5b6f5 [project @ 1997-01-07 06:18:23 by jwe]
jwe
parents: 2601
diff changeset
7 Linux systems. In nearly every case, the problem has turned out
2596
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
2608
bac14003d9bb [project @ 1997-01-18 00:11:48 by jwe]
jwe
parents: 2602
diff changeset
27 * g77 0.5.18
2593
3190d595d0da [project @ 1996-12-14 15:45:39 by jwe]
jwe
parents:
diff changeset
28 * libg++/libstdc++ 2.7.1.0
3190d595d0da [project @ 1996-12-14 15:45:39 by jwe]
jwe
parents:
diff changeset
29 * libm 5.0.5
3190d595d0da [project @ 1996-12-14 15:45:39 by jwe]
jwe
parents:
diff changeset
30 * libc 5.2.18
3190d595d0da [project @ 1996-12-14 15:45:39 by jwe]
jwe
parents:
diff changeset
31 * libncurses 3.0
3190d595d0da [project @ 1996-12-14 15:45:39 by jwe]
jwe
parents:
diff changeset
32 * ld.so 1.7.14
2608
bac14003d9bb [project @ 1997-01-18 00:11:48 by jwe]
jwe
parents: 2602
diff changeset
33 * binutils 2.6
2593
3190d595d0da [project @ 1996-12-14 15:45:39 by jwe]
jwe
parents:
diff changeset
34
3190d595d0da [project @ 1996-12-14 15:45:39 by jwe]
jwe
parents:
diff changeset
35 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
36 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
37 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
38 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
39 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
40 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
41 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
42 libraries to clarify the documentation.
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
43
2621
337a09dd1c06 [project @ 1997-01-24 21:49:41 by jwe]
jwe
parents: 2608
diff changeset
44 Please note that I am NOT
337a09dd1c06 [project @ 1997-01-24 21:49:41 by jwe]
jwe
parents: 2608
diff changeset
45
2596
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
46 Octave won't even compile
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
47 -------------------------
2593
3190d595d0da [project @ 1996-12-14 15:45:39 by jwe]
jwe
parents:
diff changeset
48
3190d595d0da [project @ 1996-12-14 15:45:39 by jwe]
jwe
parents:
diff changeset
49 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
50 compiler and header files are properly installed. Do you have
3190d595d0da [project @ 1996-12-14 15:45:39 by jwe]
jwe
parents:
diff changeset
51 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
52 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
53 by compiling a simple C++ program with -v:
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$ cat foo.cc
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
56 #include <iostream.h>
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
57 int main (void} { cerr << "yo\n"; return 0; }
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
58
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
59 bash$ g++ -v foo.cc
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
60 gcc -v foo.cc -lg++ -lstdc++ -lm
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
61 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
62 gcc version 2.7.2
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
63 /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
64 #include "..." search starts here:
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
65 #include <...> search starts here:
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
66 /usr/lib/g++-include
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
67 /usr/local/include
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
68 /usr/i486-linux/include
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
69 /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
70 /usr/include
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
71 End of search list.
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
72 ...
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
73
2597
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2596
diff changeset
74 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
75 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
76 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
77 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
78
2598
36a4daa9e3c7 [project @ 1996-12-19 02:27:21 by jwe]
jwe
parents: 2597
diff changeset
79 The linker can't find -lieee
36a4daa9e3c7 [project @ 1996-12-19 02:27:21 by jwe]
jwe
parents: 2597
diff changeset
80 ----------------------------
36a4daa9e3c7 [project @ 1996-12-19 02:27:21 by jwe]
jwe
parents: 2597
diff changeset
81
36a4daa9e3c7 [project @ 1996-12-19 02:27:21 by jwe]
jwe
parents: 2597
diff changeset
82 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
83 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
84 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
85 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
86 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
87 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
88 find something like this:
36a4daa9e3c7 [project @ 1996-12-19 02:27:21 by jwe]
jwe
parents: 2597
diff changeset
89
36a4daa9e3c7 [project @ 1996-12-19 02:27:21 by jwe]
jwe
parents: 2597
diff changeset
90 %{!shared: %{mieee-fp:-lieee} %{p:-lgmon} %{pg:-lgmon} \
36a4daa9e3c7 [project @ 1996-12-19 02:27:21 by jwe]
jwe
parents: 2597
diff changeset
91 %{!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 changing it to
36a4daa9e3c7 [project @ 1996-12-19 02:27:21 by jwe]
jwe
parents: 2597
diff changeset
94
36a4daa9e3c7 [project @ 1996-12-19 02:27:21 by jwe]
jwe
parents: 2597
diff changeset
95 %{!shared: %{p:-lgmon} %{pg:-lgmon} %{!ggdb:-lc} %{ggdb:-lg}}
36a4daa9e3c7 [project @ 1996-12-19 02:27:21 by jwe]
jwe
parents: 2597
diff changeset
96
36a4daa9e3c7 [project @ 1996-12-19 02:27:21 by jwe]
jwe
parents: 2597
diff changeset
97 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
98 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
99
2601
3723512a827a [project @ 1997-01-06 05:43:16 by jwe]
jwe
parents: 2600
diff changeset
100 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
101 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
102 src directory using the command:
3723512a827a [project @ 1997-01-06 05:43:16 by jwe]
jwe
parents: 2600
diff changeset
103
3723512a827a [project @ 1997-01-06 05:43:16 by jwe]
jwe
parents: 2600
diff changeset
104 ar cq libieee.a
3723512a827a [project @ 1997-01-06 05:43:16 by jwe]
jwe
parents: 2600
diff changeset
105
2608
bac14003d9bb [project @ 1997-01-18 00:11:48 by jwe]
jwe
parents: 2602
diff changeset
106 NOTE: you should fix this problem (either by editing the specs file or
bac14003d9bb [project @ 1997-01-18 00:11:48 by jwe]
jwe
parents: 2602
diff changeset
107 by creating the library) *before* running configure and compiling
bac14003d9bb [project @ 1997-01-18 00:11:48 by jwe]
jwe
parents: 2602
diff changeset
108 Octave. Otherwise, configure may incorrectly determine that your
bac14003d9bb [project @ 1997-01-18 00:11:48 by jwe]
jwe
parents: 2602
diff changeset
109 system doesn't have support for some IEEE math functions.
bac14003d9bb [project @ 1997-01-18 00:11:48 by jwe]
jwe
parents: 2602
diff changeset
110
2598
36a4daa9e3c7 [project @ 1996-12-19 02:27:21 by jwe]
jwe
parents: 2597
diff changeset
111 My system doesn't have g77
36a4daa9e3c7 [project @ 1996-12-19 02:27:21 by jwe]
jwe
parents: 2597
diff changeset
112 --------------------------
36a4daa9e3c7 [project @ 1996-12-19 02:27:21 by jwe]
jwe
parents: 2597
diff changeset
113
36a4daa9e3c7 [project @ 1996-12-19 02:27:21 by jwe]
jwe
parents: 2597
diff changeset
114 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
115 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
116 There is also a Debian package for g77.
36a4daa9e3c7 [project @ 1996-12-19 02:27:21 by jwe]
jwe
parents: 2597
diff changeset
117
2600
c454cd888ada [project @ 1996-12-19 22:35:54 by jwe]
jwe
parents: 2598
diff changeset
118 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
119 -------------------------------------------------------------
c454cd888ada [project @ 1996-12-19 22:35:54 by jwe]
jwe
parents: 2598
diff changeset
120
c454cd888ada [project @ 1996-12-19 22:35:54 by jwe]
jwe
parents: 2598
diff changeset
121 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
122 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
123 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
124 backend is installed in the wrong directory.
c454cd888ada [project @ 1996-12-19 22:35:54 by jwe]
jwe
parents: 2598
diff changeset
125
c454cd888ada [project @ 1996-12-19 22:35:54 by jwe]
jwe
parents: 2598
diff changeset
126 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
127 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
128 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
129 /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
130
2596
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
131 Upgrading your compiler and libraries
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
132 -------------------------------------
7020b79afd9c [project @ 1996-12-14 19:12:11 by jwe]
jwe
parents: 2593
diff changeset
133
2598
36a4daa9e3c7 [project @ 1996-12-19 02:27:21 by jwe]
jwe
parents: 2597
diff changeset
134 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
135 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
136 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
137 notes for the compiler and libraries.
36a4daa9e3c7 [project @ 1996-12-19 02:27:21 by jwe]
jwe
parents: 2597
diff changeset
138
2601
3723512a827a [project @ 1997-01-06 05:43:16 by jwe]
jwe
parents: 2600
diff changeset
139 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
140 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
141 directions in the release notes very carefully.
3723512a827a [project @ 1997-01-06 05:43:16 by jwe]
jwe
parents: 2600
diff changeset
142
3723512a827a [project @ 1997-01-06 05:43:16 by jwe]
jwe
parents: 2600
diff changeset
143
2598
36a4daa9e3c7 [project @ 1996-12-19 02:27:21 by jwe]
jwe
parents: 2597
diff changeset
144 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
145 bug-octave@bevo.che.wisc.edu.
2593
3190d595d0da [project @ 1996-12-14 15:45:39 by jwe]
jwe
parents:
diff changeset
146
3190d595d0da [project @ 1996-12-14 15:45:39 by jwe]
jwe
parents:
diff changeset
147 John W. Eaton
3190d595d0da [project @ 1996-12-14 15:45:39 by jwe]
jwe
parents:
diff changeset
148 jwe@bevo.che.wisc.edu
3190d595d0da [project @ 1996-12-14 15:45:39 by jwe]
jwe
parents:
diff changeset
149 University of Wisconsin-Madison
3190d595d0da [project @ 1996-12-14 15:45:39 by jwe]
jwe
parents:
diff changeset
150 Department of Chemical Engineering
3190d595d0da [project @ 1996-12-14 15:45:39 by jwe]
jwe
parents:
diff changeset
151
2608
bac14003d9bb [project @ 1997-01-18 00:11:48 by jwe]
jwe
parents: 2602
diff changeset
152 Wed Jan 15 20:04:54 1997