Hi Guoqiang,
Ah, I see and sorry for the trouble, especially I have had a fix (so
that gfortran is used) for this for a while now. I believe you have
a reasonable solution, but the PGPLOT_install script in the svn
repository works better. I tried this on Fedora14 x86_64 yesterday
revealed another problem, that I think I have fixed. I'll try to get
that resolved and post a new PGPLOT_install script, and upload a
ifeffit 1.2.11d tarball.
Thanks
--Matt
On Fri, Apr 8, 2011 at 4:21 AM, Guoqiang PAN
Thanks lot to Matt and Bruce. PGPLOT installation in Fedora 14 Linux case, can only be succeeded using g77_gcc_aout. I tried every possible choice for fortran-compiler in my case,only /usr/local/src/pgplot/makemake /usr/local/src/pgplot linux g77_gcc_aout could work! Then PGPLOT_install script will use gfortran as default fortran compiler, it stopped at
gfortran -c -O2 -fPIC grexec.f gfortran -c -O2 -fPIC /usr/local/ifeffit-1.2.11c/pgplot/drivers/gidriv.f /usr/local/ifeffit-1.2.11c/pgplot/drivers/gidriv.f:208.72:
& RECL=255, FORM='BINARY', IOSTAT=IER)
1 Warning: FORM specifier in OPEN statement at (1) has invalid value 'BINARY' /usr/local/ifeffit-1.2.11c/pgplot/drivers/gidriv.f:240.72:
& RECL=255, FORM='BINARY', IOSTAT=IER)
1 Warning: FORM specifier in OPEN statement at (1) has invalid value 'BINARY' /usr/local/ifeffit-1.2.11c/pgplot/drivers/gidriv.f:654.21:
BLKOUT(0) = 254 1 Error: Arithmetic overflow converting INTEGER(4) to INTEGER(1) at (1). This check can be disabled with the option -fno-range-check make: *** [gidriv.o] Error 1 gfortran -u -Wall -fPIC -O -o pgpack /usr/local/ifeffit-1.2.11c/pgplot/fonts/pgpack.f rm -f grfont.dat ./pgpack
So if I commented out these two lines (line 219 and 220) in PGPLOT_install gfortran -v > /dev/null 2>&1 if [ $? = 0 ] ; then fcompl='gfortran'; fi PGPLOT_install will be OK!
As for installation ifeffit, I tried your suggestions e.g. (./configure --with-pgplot-link='-L/usr/local/share/ifeffit/pgplot -lpgplot_iff -lpng -lz -lX11') or ln -s libpgplot.a libpgplot_iff.a ,but not successful. It stopped at
gcc -g -O2 -o ifftest1 ifftest1.o ../lib/libifeffit.a -L/usr/local/share/ifeffit/pgplot -lpgplot_iff -lpng -lz -lX11 -L/usr/lib/gcc/i686-redhat-linux/4.5.1 -L/usr/lib/gcc/i686-redhat-linux/4.5.1/../../.. -lgfortran -lm -lgcc_s /usr/bin/ld: cannot find -lpgplot_iff collect2: ld returned 1 exit status make[3]: *** [ifftest1] Error 1 make[3]: Leaving directory `/usr/local/ifeffit-1.2.11c/src/test' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/usr/local/ifeffit-1.2.11c/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/usr/local/ifeffit-1.2.11c' make: *** [all-recursive-am] Error 2 [root@localhost ifeffit-1.2.11c]#
I think this also due to the gfortan, and I changed the fortran compiler to g77: ./configure --with-fortran=g77 It is OK! Best regards, Guoqiang
On Thu, 2011-04-07 at 11:56 -0500, Matt Newville wrote:
Guoqiang,
Can we take a step back and try to figure out why PGPLOT_install didn't work for you? It does work for me on Fedora14. What part of PGPLOT_install did not work?
It should be that ./configure --with-pgplot-link='LINKARGS' can be used to specify the PGPLOT_LIBS value, say
./configure --with-pgplot-link='-L/usr/local/share/ifeffit/pgplot -lpgplot_iff -lpng -lz -lX11'
For PGPLOT installed with PGPLOT_install, or something like ./configure --with-pgplot-link='-L/usr/local/pgplot -lpgplot -lpng -lz -lX11'
for a PGPLOT installed "by hand".
An important difference between PGPLOT_install and most "by hand" installations is that PGPLOT_install will not build a shared library, but a static one only. This won't affect building, but can have an impact for runtime, as the shared library needs to be found at runtime, and so needs to be in the LD_LIBRARY_PATH, or configured with ldconfig.
--Matt