Subject: Summery: g98 error on linux

From: "Zhenhua Li" <[email-masked]>
Date: Thu, 16 Aug 2001 18:33:30 +0800

Hi, Dear Listers,

Several days ago, I posted a qustion about g98 on Redhat 7.1:

>   I compile g98 on Redhat 7.1 with pgf77 version 3.1 and get following
warnings:
util.so: the use of `tmpnam' is dangerous, better use `mkstemp'
/home/scratch/test/pgi/linux86/lib/libpgftnrtl.a(cnfg.o): In function
`__fio_scratch_name':
cnfg.o(.text+0x33): the use of `tempnam' is dangerous, better use `mkstemp'.

The compilation finished anyway, but when I ran g98,
following error appeared:

g98: error while loading shared libraries: /home/scratch/test/g98/util.so:
undefined symbol: fstat
Nothing appeared in output file at all.

    I received several warm replies from Dr. Doug Fox, Dr. Darko Babic,
Prof. Brian Duke. My problems are solved following Dr. Darko Babic's
suggestions by replacing the old version of optimized blas library (1.2)
with the latest 1.3e. G98 can run after the first complaining about obsolete
function "tmpnam" is resovled. Upgrading the pgf77 compiler with the latest
version 3.2-4 can resolve the second complaining about obsolete function
"tempnam". But upgrading compiler only can't solve the problem.
    I don't know if there will be any error without upgrading the compiler
(leaving only the second complaining).

Zhenhua

Here are replies from Dr. Doug Fox and Dr. Darko Babic:

> From Dr. Darko Babic:

Doug Fox is right, but it turned out (in my case) that the report-
ed problem was related to something else.  It mighth be the linker bug
which (perhaps) did not link fstat correctly after having a 'problem'
with obsolete functions (tmpname and tempnam, or so something).  Anyway,

1) check your installation (compilation) log file if there are some
warnings on using some obsolete functions.  If you have not compilation
log, reinstall with saving output (in csh: bsd/bldg98 >& bldg98.log &, or
in bash: bsd/bldg98 >bldg98.log 2>&1 &) and then check the log-file.

2) if you find such warnings in the log-file, you might have the same
problem as me, go to step 3.  If not, sorry, I cannot help you.

3) check whether you use optimized blas libraries and blas-f2c.  One
source of problems is blas-f2c.  The easiest way (but maybe not the
best in general) is not to use optimized blas.

4) if you're using PGI compiler with pgf77 version 3.1-3 (check it
by issuing pgf77 -V), you might have another call to obsolete function
> from PGI libraries.  Upgrade the compiler, if you can.  If you can't,
the easiest remedy is to copy the G98 files from the installation
done under RedHat6.2.  In that case, the SMP jobs might occasionally
die, and if so, contact me again.

> From Dr. Doug Fox:

   fstat is a standard system utility and should be resolved out of runtime
libraries provided with RedHat.  This error suggests RedHat has either
a) made very substantial changes to the structure of these libraries or
b) you omitted some of the runtime library packages when you installed
Linux.

   This lives in libc on my 6.2 machine so check to see if you have an
older version of libc you can install.