[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

20010314: Installation of NetCDF-perl-1.2.1



Alford,

>Date: Wed, 14 Mar 2001 14:02:14 -0600
>From: "Alford, Glennette R" <address@hidden>
>Organization: US/Navy
>To: "'Steve Emmerson'" <address@hidden>
>Subject: RE: 20010314: Installation of NetCDF-perl-1.2.1 
>Keywords: 200103131940.f2DJeZL13393

The above message contained the following:

> libnetcdf.a is located under:
>       /DODS_DISK/DODS/perlmodules/netcdf-3.4/src/libsrc/libnetcdf.a
>       /DODS_DISK/DODS/perlmodules/netcdf-3.4/lib/libnetcdf.a

That's an odd place for it to be.  Most folks install it in a more
traditional place (e.g. under "/usr/local" or "/opt/netcdf").  That
pathname also seems inconsistent with the command that compiled the
netcdf-perl library:

    gcc -c -I/DODS_DISK/DODS/netcdf-3.4/include -I/usr/local/include \
        -O -DVERSION=3D\"1.21\" -DXS_VERSION=3D\"1.21\" -fPIC \
        -I/usr/local/lib/perl5/5.00503/sun4-solaris/CORE NetCDF.c

because the "/DODS_DISK/DODS/netcdf-3.4/include" argument of the "-I"
option doesn't correspond to "/DODS_DISK/DODS/perlmodules/include".

Were you able to verify that it was built with position-independent code
(-fPIC option)?

The command that built the shared-library:

    LD_RUN_PATH=3D"" gcc -o blib/arch/auto/NetCDF/NetCDF.so  -G \
        -L/usr/local/lib NetCDF.o

didn't reference the directory in which the netCDF library resides
(/DODS_DISK/DODS/perlmodules/netcdf-3.4/lib/); consequently, I'm not
surprised that the resultant shared-library doesn't contain any netCDF
functions.

I suggest dropping into the "perl/" subdirectory and rebuilding the
shared-library with the following command:

    LD_RUN_PATH=3D"" gcc -o blib/arch/auto/NetCDF/NetCDF.so  -G \
        -L/DODS_DISK/DODS/perlmodules/netcdf-3.4/lib \
        -L/usr/local/lib NetCDF.o

Then, re-execute the "nm -g" command on the resultant shared-library and
see if it now includes the netCDF functions.

Regards,
Steve Emmerson   <http://www.unidata.ucar.edu>