# HG changeset patch # User jwe # Date 950947630 0 # Node ID 0ae310231c463d6d8978ed9e34b2c138d7628d66 # Parent 26662775f4e90529785217049c1bf5ec5893df4d [project @ 2000-02-19 08:07:08 by jwe] diff -r 26662775f4e9 -r 0ae310231c46 README.Linux --- a/README.Linux Sat Feb 12 02:24:46 2000 +0000 +++ b/README.Linux Sat Feb 19 08:07:10 2000 +0000 @@ -1,3 +1,10 @@ +NOTE: This file was originally written several years ago, when many +people were complaining that Octave would not work for them on Linux +systems. Generally, the problems were not actually bugs in Octave. +More recently, the compilers are better, most distributions are more +complete, and it seems harder to install incompatible sets of +libraries or header files (but some people still manage to do it). + Since July 1996, most work on Octave has been done using a Linux system, and a number of people who regularly test Octave snapshot releases also primarily use Linux systems. Because of this, I believe @@ -7,12 +14,11 @@ problems have happened because of a botched upgrade or even a buggy Linux distribution. -If you can, you should probably install Octave from one of the binary -distributions available from ftp.che.wisc.edu, or using one of the -Debian or RPM packages that are available at other sites. For -example, Dirk Eddelbuettel maintains the Debian -Octave package and usually has them ready within a day or so of new -Octave releases. They are available via the WWW at +If you can, you should probably install Octave using one of the Debian +or RPM packages for Octave that are available with the major Linux +distributions. For example, Dirk Eddelbuettel +maintains the Debian Octave package and usually has them ready within +a day or so of new Octave releases. They are available via the WWW at http://www.debian.org/packages.html. If for some reason you can't (or choose not to) install Octave from @@ -24,9 +30,10 @@ --------------------------------- If you can compile Octave, but it crashes with a segmentation fault -right away, you probably have incompatible versions of libc and libg++ -installed, or you have a version of the dynamic loader, ld.so, that is -incompatible with your versions of the libraries, or both. +right away, you probably have incompatible versions of libc and +libstdc++ installed, or you have a version of the dynamic loader, +ld.so, that is incompatible with your versions of the libraries, or +both. Octave won't even compile ------------------------- @@ -42,7 +49,7 @@ int main (void) { cerr << "yo\n"; return 0; } bash$ g++ -v foo.cc -gcc -v foo.cc -lg++ -lstdc++ -lm +gcc -v foo.cc -lstdc++ -lm Reading specs from /usr/lib/gcc-lib/i486-linux/2.7.2/specs gcc version 2.7.2 /usr/lib/gcc-lib/i486-linux/2.7.2/cpp -lang-c++ -v -undef ... @@ -58,78 +65,9 @@ If the location of the correct set of include files is not listed in the search path, then you might be able to fix that with a symbolic -link. However, if your version of libg++ was not compiled with your +link. However, if your version of libstdc++ was not compiled with your current version of gcc, you are likely to run into more trouble. -The linker can't find -lieee ----------------------------- - -This can happen because your libraries don't match your version of -gcc. Some recent Linux distributions don't include a libieee.a file -because IEEE support is now the default and the library is no longer -needed, but the gcc specs file still adds -lieee to the linker command -if gcc is invoked with the -mieeefp flag. I believe that you should -be able to fix this by editing the gcc specs file. In it, you should -find something like this: - - %{!shared: %{mieee-fp:-lieee} %{p:-lgmon} %{pg:-lgmon} \ - %{!ggdb:-lc} %{ggdb:-lg}} - -changing it to - - %{!shared: %{p:-lgmon} %{pg:-lgmon} %{!ggdb:-lc} %{ggdb:-lg}} - -should keep gcc from adding -lieee to the link command. You can find -the location of the specs file by running the command gcc -v. - -If you can't edit the gcc specs file for some reason, another solution -that should work is to create an empty libieee.a file in the Octave -src directory using the command: - - ar cq libieee.a - -NOTE: you should fix this problem (either by editing the specs file or -by creating the library) *before* running configure and compiling -Octave. Otherwise, configure may incorrectly determine that your -system doesn't have support for some IEEE math functions. - -My system doesn't have g77 --------------------------- - -A binary release of g77 that should work with gcc 2.7.2 is available -from sunsite.unc.edu in the directory /pub/Linux/devel/lang/fortran. -There is also a Debian package for g77. Also, g77 is now included as -part of egcs (http://www.cygnus.com/egcs). - -Problems with g77 on Debian 1.2 systems (and possibly others) -------------------------------------------------------------- - -Your best bet is to upgrade to Debian 1.3 (or some newer version). -If you choose not to do that, here are some old tips for working -around the problem. - -The location of the compiler binaries changed, so the g77 0.5.18 -package can not be used without modification. The problem is that the -Debian package was built for gcc 2.7.2 and not 2.7.2.1 and the f771 -backend is installed in the wrong directory. - -Version 0.5.19 of g77 has just been released. A fixed Debian package -may be made available soon. Until then, you can make things work by -copying f771 and libf2c.a from /usr/lib/gcc-lib/i486-linux/2.7.2 to -/usr/lib/gcc-lib/i486-linux/2.7.2.1. - -Upgrading your compiler and libraries -------------------------------------- - -Installing libg++ on a Linux system is not as simple as it should be, -because libg++ shares some basic I/O code with the Linux C library, -and they must be compatible. You should get and read the release -notes for the compiler and libraries. - -If you decide to install versions of the libraries that are older (or -newer) than the ones you already have, you should follow the -directions in the release notes carefully. - I/O in dynamically loaded .oct files doesn't work ------------------------------------------------- @@ -147,4 +85,4 @@ University of Wisconsin-Madison Department of Chemical Engineering -Tue Feb 3 13:08:02 1998 +Fri Feb 11 23:29:54 2000 diff -r 26662775f4e9 -r 0ae310231c46 liboctave/ChangeLog --- a/liboctave/ChangeLog Sat Feb 12 02:24:46 2000 +0000 +++ b/liboctave/ChangeLog Sat Feb 19 08:07:10 2000 +0000 @@ -1,3 +1,8 @@ +2000-02-18 John W. Eaton + + * oct-rl-hist.c (octave_history_list): Do something when not + printing line numbers. Fix reallocation of retval. + 2000-02-11 John W. Eaton * Makefile.in (install-inc): Install files in diff -r 26662775f4e9 -r 0ae310231c46 liboctave/oct-rl-hist.c --- a/liboctave/oct-rl-hist.c Sat Feb 12 02:24:46 2000 +0000 +++ b/liboctave/oct-rl-hist.c Sat Feb 19 08:07:10 2000 +0000 @@ -177,11 +177,8 @@ { char **p = retval; - while (p) - { - if (*p) - free (*p++); - } + while (*p) + free (*p++); free (retval); @@ -214,6 +211,9 @@ sprintf (tmp, "%5d%c%s", i + history_base, hlist[i]->data ? '*' : ' ', line ? line : ""); + else + sprintf (tmp, "%c%s", hlist[i]->data ? '*' : ' ', + line ? line : ""); retval[k++] = tmp; } diff -r 26662775f4e9 -r 0ae310231c46 src/ChangeLog --- a/src/ChangeLog Sat Feb 12 02:24:46 2000 +0000 +++ b/src/ChangeLog Sat Feb 19 08:07:10 2000 +0000 @@ -1,3 +1,12 @@ +2000-02-18 James R. Van Zandt + + * load-save.cc (Vcrash_dumps_octave_core): Fix comment for this var. + +2000-02-18 John W. Eaton + + * lex.l (handle_number): Don't transorm `[Dd]' to `e' if reading + hex. + 2000-02-11 John W. Eaton * Makefile.in (install-inc): Install files in diff -r 26662775f4e9 -r 0ae310231c46 src/lex.l --- a/src/lex.l Sat Feb 12 02:24:46 2000 +0000 +++ b/src/lex.l Sat Feb 19 08:07:10 2000 +0000 @@ -1540,26 +1540,30 @@ static void handle_number (void) { - char *tmp = strsave (yytext); - - char *idx = strpbrk (tmp, "Dd"); - - if (idx) - *idx = 'e'; - double value = 0.0; int nread = 0; - if (looks_like_hex (tmp, strlen (tmp))) + if (looks_like_hex (yytext, strlen (yytext))) { unsigned long ival; - nread = sscanf (tmp, "%lx", &ival); + + nread = sscanf (yytext, "%lx", &ival); + value = static_cast (ival); } else - nread = sscanf (tmp, "%lf", &value); + { + char *tmp = strsave (yytext); + + char *idx = strpbrk (tmp, "Dd"); - delete [] tmp; + if (idx) + *idx = 'e'; + + nread = sscanf (tmp, "%lf", &value); + + delete [] tmp; + } // If yytext doesn't contain a valid number, we are in deep doo doo. diff -r 26662775f4e9 -r 0ae310231c46 src/load-save.cc --- a/src/load-save.cc Sat Feb 12 02:24:46 2000 +0000 +++ b/src/load-save.cc Sat Feb 19 08:07:10 2000 +0000 @@ -58,7 +58,7 @@ #include "variables.h" #include "version.h" -// The number of decimal digits to use when writing ascii data. +// Write octave-core file if Octave crashes or is killed by a signal. static bool Vcrash_dumps_octave_core; // The default output format. May be one of "binary", "text", or