On Mon, 2008-07-21 at 07:19 -0600, Craig DeForest wrote: 
> I have had this problem too.  There are linker issues for PGPLOT on 64- 
> bit architectures (which are the norm these days).  I think the big  
> deal is making the linker recognize libcpgplot.a, which "looks" like a  
> 32-bit library even if compiled under 64 bits.
> 
> Some combination of adding "-fPIC" to the CFLAGS and moving  
> libcpgplot.a to libcpgplot.la seems to work, but I never remember  
> exactly what it is -- I intend to migrate my graphics anyway as soon  
> as we can get 2.4.4 out the door.
> 
> Cheers,
> Craig
> 
> 
> On Jul 21, 2008, at 5:22 AM, smriti Sebastian wrote:
> 
> > I have installed pgplot 5 in fedora core.I have set my  
> > LD_LIBRARY_PATH and PGPLOT_DIR.After setting these when i tried to  
> > install pgperl module my make test i failing showing error like this:
> > Can't load 'blib/arch/auto/PGPLOT/PGPLOT.so' for module PGPLOT: /usr/ 
> > local/lib/libpgplot.so: undefined symbol: e_rsfe at /usr/lib/ 
> > perl5/5.8.8/i386-linux-thread-multi/DynaLoader.pm line 230, <STDIN>  
> > line 1.
> >  at test1.p line 3
> > .......................
> > how will i solve it?
> >
> > I am using PGPLOT-2.20



smriti,

It would help greatly if you could provide more information about your
system.  For example, which version of Fedora Core?
Which compiler did you use to compile PGPLOT and which was used when
compiling pgperl?  What exactly is your LD_LIBRARY_PATH?

The location of Dynaloader.pm in your email indicates that you are
running on a 32 bit system, so Craig's warning shouldn't apply. (I
should note that I've never seen the problem that Craig mentions on any
of the 64 bit boxes (FC3-FC8, Debian Sarge & Etch) that I've compiled
PGPLOT on.) 

The error message indicates a problem finding the base fortran
libraries.  One of the  problems on some versions of Fedora Core is that
both g77 and gfortran are available, and Perl's ExtUtils::F77 (used to
compile pgperl) favors gfortran  while the PGPLOT build uses g77.  They
use different underlying libraries, and that looks like what is
happening.

e_rsfe is a symbol in libf2c, which is used by g77:

        % readelf -a /usr/lib/libg2c.so | grep e_rsfe 
           203: 0000000000013a10    41 FUNC    GLOBAL DEFAULT   10 e_rsfe

If you ran ldd on the PGPLOT.so file generated for pgperl you'll
probably see something similar to this:

        % ldd PGPLOT.so | grep gfortran
                libgfortran.so.1 => /usr/lib/libgfortran.so.1 
(0x00002b07d7302000)
        
indicating that it was compiled with gfortran.  The easiest solution to
this problem that I've come up with is to compoile PGPLOT with gfortran.

To do this, change the PGPLOT sys_linux/g77_gcc configuration file to
use gfortran.  Here are the changes that I've made to this file to get
compilations with gfortran to work:

      * set FCOMPL="gfortran"
      * add -ffixed-line-length-none to FFLAGC
      * add -lgfortran to LIBS


Some early forms of gfortran don't support -fno-backslash, so you might
need to remove that from FFLAGD.  

gfortran does not support the %VAL() construct (I know it's being worked
on, but I'm not sure if it has already been incorporated into a
release), so you can't compile the GIF driver (or anything which used %
VAL()).  Not a big loss.


Diab


P.S.  A little known secret: if you change the definition of DEFDIR in
src/grgfil.f appropriately you won't have to set PGPLOT_DIR.


-- 
Diab Jerius <[EMAIL PROTECTED]>
Smithsonian Astrophysical Observatory


_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to