Fwd: Re: Fwd: ifeffit installation in Linux (Fedora 14)
---------- Forwarded Message ----------
Subject: Re: Fwd: ifeffit installation in Linux (Fedora 14)
Date: Thursday, April 07, 2011, 10:52:57 am
From: Bruce Ravel
Thank you very much for your rapid reply. Yes, I tried first with pgplot using ./configure --with-pgplot=/usr/local/pgplot/, but failed with the 'make' ../lib/libifeffit.a(iff_cursor.o): In function `iff_zoom_': /usr/local/ifeffit-1.2.11c/src/lib/iff_cursor.f:134: undefined reference to `pgband_' /usr/local/ifeffit-1.2.11c/src/lib/iff_cursor.f:138: undefined reference to `pgband_' 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 (more details in my previous make.log file) Then I tried with ./configure --without-pgplot, which can be done without any problem. That's the problem. Regards, Guoqiang
Hmmm...... so it seems not to be linking with libpgplot.a. Odd. I notice on my computer that the pgplot library is called libpgplot_iff.a and that the Makefile in src/lib/ has this line: PGPLOT_LIBS = -L/usr/local/share/ifeffit/pgplot -lpgplot_iff -lpng -lz -lX11 I also see that Matt's PGPLOT_install script changes one of pgplot's files to use the installation location specified in PGPLOT_install as default location (i.e. the one that would be specified by setting the PGPLOT_DIR environment variable). The script then renames the library to have the "_iff". There are a number of ways to address. Here is one relatively simple suggestion: 1. cd to the location of libpgplot.a on your computer 2. make a symbolic link to libpgplot.a like so: ln -s libpgplot.a libpgplot_iff.a 3. set the PGPLOT_DIR environment variable to the directory containing libpgplot.a. This can be done either typing export PGPLOT_DIR=/location/of/pgplot at the commend line or putting it in a login script to make it permanent. (Of course, replace /location/of/pgplot with the correct thing on your computer.) 4. cd back to the location of the ifeffit source and try again to build it. All that is, of course, untested on my end. But I think it should work. If not, we'll keep trying until we figure it out! B -- Bruce Ravel ------------------------------------ bravel@bnl.gov National Institute of Standards and Technology Synchrotron Methods Group at NSLS --- Beamlines U7A, X24A, X23A2 Building 535A Upton NY, 11973 My homepage: http://xafs.org/BruceRavel EXAFS software: http://cars9.uchicago.edu/~ravel/software/exafs/ ----------------------------------------- -- Bruce Ravel ------------------------------------ bravel@bnl.gov National Institute of Standards and Technology Synchrotron Methods Group at NSLS --- Beamlines U7A, X24A, X23A2 Building 535A Upton NY, 11973 My homepage: http://xafs.org/BruceRavel EXAFS software: http://cars9.uchicago.edu/~ravel/software/exafs/
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
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 /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
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
participants (3)
-
Bruce Ravel
-
Guoqiang PAN
-
Matt Newville