[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ldmMcidas #UJW-658634]: building ldm-mcidas
- Subject: [ldmMcidas #UJW-658634]: building ldm-mcidas
- Date: Tue, 01 Jul 2014 15:52:21 -0600
Hi Brendon,
re: LDM shared library not found when trying to run newly built ldm-mcidas
decoders
Here is the set of environment variable definitions that I use when building
ldm-mcidas v2012 in my CentOS 6.5 VM development environment:
Bash/Bourne shells:
# For ldm-mcidas builds
CC=cc
FC=gfortran
CPP_MCIDAS='-I/home/mcidas/mcidas2009/src'
LD_MCIDAS='-L/home/mcidas/lib -lmcidas'
CPP_NETCDF='-I/home/mcidas/mcidas2009/netcdf/libsrc'
LD_NETCDF='-L/home/mcidas/lib -lnetcdf'
LD_MATH='-lm'
LD_LDM='/home/ldm/lib/libldm.a /home/ldm/lib/libxml2.a'
#LDFLAGS='-Wl,-rpath,/home/ldm/lib'
#LD_LDM='-L/home/ldm/lib -lldm -lxml2'
LD_FORTRAN='-static -lf2c'
LD_X11=''
FTPDIR=$HOME/ldm-mcidas/ftp
FTPBINDIR=$HOME/ldm-mcidas/ftpbin
export CC FC CPP_MCIDAS LDFLAGS LD_MCIDAS CPP_NETCDF LD_NETCDF LD_MATH LD_LDM
LD_FORTRAN LD_X11 FTPDIR FTPBINDIR
To build using the shared LDM library and with "burning in" the location
of the shared LDM library, I uncomment the two commented lines above
and comment out the LD_LDM line:
# For ldm-mcidas builds
CC=cc
FC=gfortran
CPP_MCIDAS='-I/home/mcidas/mcidas2009/src'
LD_MCIDAS='-L/home/mcidas/lib -lmcidas'
CPP_NETCDF='-I/home/mcidas/mcidas2009/netcdf/libsrc'
LD_NETCDF='-L/home/mcidas/lib -lnetcdf'
LD_MATH='-lm'
#LD_LDM='/home/ldm/lib/libldm.a /home/ldm/lib/libxml2.a'
LDFLAGS='-Wl,-rpath,/home/ldm/lib'
LD_LDM='-L/home/ldm/lib -lldm -lxml2'
LD_FORTRAN='-static -lf2c'
LD_X11=''
FTPDIR=$HOME/ldm-mcidas/ftp
FTPBINDIR=$HOME/ldm-mcidas/ftpbin
export CC FC CPP_MCIDAS LDFLAGS LD_MCIDAS CPP_NETCDF LD_NETCDF LD_MATH LD_LDM
LD_FORTRAN LD_X11 FTPDIR FTPBINDIR
The results of building using static LDM library linking are:
cd ~ldm/ldm-mcidas-2012/src
-- make environment variable settings active
./configure && make && make install
ls -alt ../bin
total 1604
-rwxr-xr-x 1 ldm Unidata 7762 Jul 1 15:44 batch.k
-rwxr-xr-x 1 ldm Unidata 52392 Jul 1 15:44 lgt2md
-rwxr-xr-x 1 ldm Unidata 719357 Jul 1 15:44 proftomd
-rwxr-xr-x 1 ldm Unidata 247849 Jul 1 15:44 pngg2gini
-rwxr-xr-x 1 ldm Unidata 87346 Jul 1 15:44 zlibg2gini
-rwxr-xr-x 1 ldm Unidata 251660 Jul 1 15:44 pnga2area
-rwxr-xr-x 1 ldm Unidata 247268 Jul 1 15:44 area2png
-rwxr-xr-x 1 ldm Unidata 4529 May 22 2013 uwgrid.sh
drwxrwsr-x 2 ldm Unidata 4096 May 22 2013 .
drwxr-xr-x 8 ldm Unidata 4096 Sep 11 2012 ..
$ ldd ../bin/pnga2area
linux-vdso.so.1 => (0x00007fff51cd1000)
libm.so.6 => /lib64/libm.so.6 (0x0000003732a00000)
libc.so.6 => /lib64/libc.so.6 (0x0000003731e00000)
/lib64/ld-linux-x86-64.so.2 (0x0000003731a00000)
The results of building when linking against the shared LDM
library are:
$ ls -alt ../bin
total 1480
drwxrwsr-x 2 ldm Unidata 4096 Jul 1 15:48 .
-rwxr-xr-x 1 ldm Unidata 4529 Jul 1 15:48 uwgrid.sh
-rwxr-xr-x 1 ldm Unidata 7762 Jul 1 15:48 batch.k
-rwxr-xr-x 1 ldm Unidata 34323 Jul 1 15:48 lgt2md
-rwxr-xr-x 1 ldm Unidata 701718 Jul 1 15:48 proftomd
-rwxr-xr-x 1 ldm Unidata 226809 Jul 1 15:48 pngg2gini
-rwxr-xr-x 1 ldm Unidata 64031 Jul 1 15:48 zlibg2gini
-rwxr-xr-x 1 ldm Unidata 226856 Jul 1 15:48 pnga2area
-rwxr-xr-x 1 ldm Unidata 223446 Jul 1 15:48 area2png
drwxr-xr-x 8 ldm Unidata 4096 Sep 11 2012 ..
$ ldd ../bin/pnga2area
linux-vdso.so.1 => (0x00007fff269ff000)
libldm.so.0 => /home/ldm/lib/libldm.so.0 (0x00007f9b9866d000)
libxml2.so.2 => /home/ldm/lib/libxml2.so.2 (0x00007f9b98400000)
libm.so.6 => /lib64/libm.so.6 (0x0000003732a00000)
libc.so.6 => /lib64/libc.so.6 (0x0000003731e00000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003732600000)
libdl.so.2 => /lib64/libdl.so.2 (0x0000003732200000)
/lib64/ld-linux-x86-64.so.2 (0x0000003731a00000)
As I noted in my email earlier today, I much prefer to link against the
static LDM library as this allows one to roll the LDM back to
a version that predates versions in which the shared LDM library
is built.
NB: the HOME directory for 'ldm' in the examples above was /home/ldm.
This may have to be changed for your 'ldm' user.
Cheers,
Tom
--
****************************************************************************
Unidata User Support UCAR Unidata Program
(303) 497-8642 P.O. Box 3000
address@hidden Boulder, CO 80307
----------------------------------------------------------------------------
Unidata HomePage http://www.unidata.ucar.edu
****************************************************************************
Ticket Details
===================
Ticket ID: UJW-658634
Department: Support ldm-mcidas
Priority: Normal
Status: Closed