pgplot/sys_linux

The files in this directory are for use with the Linux operating
system. Note that Linux systems come in two varieties: one that uses
the a.out for binaries (now mostly obsolete), and another uses the elf
format.

You may need to modify the .conf file you choose to use; e.g., on some
varieties of Linux, the X11 libraries are in directory /usr/X11/lib
while on others they are in /usr/X11R6/lib. If necessary, make a
private configuration file called local.conf in the installation
directory (see the installation instructions).

(1) Files f77_gcc.conf and fort77-gcc.conf are for use with the 'f77'
command that uses the f2c Fortran translator and the gcc C compiler,
on 'elf' systems.

Choose "f77_gcc" if the command you use to compile a Fortran program
with f2c is "f77", or "fort77_gcc" if the comand is "fort77".

Note that the f2c compiler used by Linux interprets the character "\"
in Fortran literal character strings as a Unix escape character. To
compile the demo programs (or other programs that use "\" as a PGPLOT
escape character) correctly, you need to turn this off. There appears
to be no way to do this on the f77 command line, but options for the
f2c program can be specified in an environment variable: e.g., type
 
[csh]	setenv F2CFLAGS "-\!bs"

[sh]	set F2CFLAGS "-\!bs" ; export F2CFLAGS

[bash]  declare -x F2CFLAGS='-!bs'

before starting the makefile (the backslash is to quote the
exclamation mark; it is not part of the F2CFLAGS value).


Note that several of the PGPLOT device drivers use Fortran extensions
(most notably the %VAL() syntax for passing an argument by value) that
are not supported by f2c.  These drivers cannot be used with
Linux. The drivers include: epdriv.f, gidriv.f, ppdriv.f,
wddriv.f. Driver ljdriv.f also cannot be compiled with this system.

Some Linux users report that make dies with "error 4". This is
apparently due to an error in the f77 script. Workarounds include
using "make -k" to continue after the error; upgrading the bash shell;
using a tcsh shell; using g77 instead of f77.

On some versions of Linux and/or f2c, creation of the "pgxwin_server" and
"pgdisp" programs fails with the message:
  /usr/lib/libf2c.so.0.11: undefined reference to `MAIN__'
You should be able to create the program by re-executing the gcc comand that
failed, omitting the "-lf2c" option. [I am looking into ways of modifying
the installation procedure to avoid this problem.]

The f2c Fortran support library does a setbuf(stderr) to make stderr
buffered.  This may affect programs that call PGPLOT from C. To make
stderr output appear when you want, use fflush(stderr) where
appropriate. (This is reportedly fixed in recent versions of f2c).

(2) File g77_gcc.conf uses the beta gnu g77 compiler, on 'elf'
systems.

(3) File g77_elf_aout.conf uses the beta gnu g77 compiler, on 'a.out'
systems.

Older versions of g77 do not support INTEGER*2 or BYTE variables and
thus many drivers will not compile in g77. Version 0.5.18 is reported
to handle BYTE and %VAL() and compile PGPLOT correctly.

Although g77 compiles more drivers than f2c, there are several that it
fails to compile (e.g., mfdriv.f, pxdriv.f). If you have a real need
for any of these drivers, let me know and I will see if I can fix the
problem.

(4) File f95_gcc.conf uses the NAGWare f95 (Fortran-95) compiler;
system-specific versions of some subroutines are in subdirectory
f95_src.

(5) File pgf77.conf uses the Portland Group pgf77 FORTRAN compiler and
pgcc C compiler. The following problem has been reported with this
system: "Routine PGSAVE does not work when PGPLOT is used as a shared
library.  When linked statically, everything worked fine.  This seemed
not to depend on any of the compiler flags I considered be reasonable
to change, e.g., optimization.  It also happened for both compilers,
pgf77 and pgf90.  The code crashed immediately when the pgsave
subroutine was called, before execution of the first statement."
I believe this to be due to a compiler bug.

Tim Pearson 24-Mar-1998 (with thanks to Michael Eisinger, Massimo
Manghi, Peter Teuben, Brian Toby, JaiYong Lee, Klaus-Georg Adams,
Alexander Heger, and others)
____________________________________________________________________________

Additional Notes

27-Feb-1999 (from a user)

There seems to be a compatibility problem with libc-2.1 and libc-2.0.
Apparently the problem is between libc-2.1/egcs-1.1.1 and
libc-2.0.6/egcs-1.1.1. The necessary procedure is to compile and
install egcs-1.1.1 then compile and install libc-2.1. Then recompile
egcs-1.1.1 under libc-2.1 and reinstall. Then you can reconfigure
pgplot and recompile. After this circuitous process pgplot executables
work.  I tried this procedure on two different machines and it worked
on both.
