[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ldmMcidas #BHL-779615]: Build trouble on SunOS 5.11
- Subject: [ldmMcidas #BHL-779615]: Build trouble on SunOS 5.11
- Date: Wed, 26 Dec 2007 14:44:06 -0700
Hi Art,
I hope that you had as great a Christmas as I had!
On to building the ldm-mcidas decoders under Solaris 11...
First, I believe that your intention is to build everything in 64-bit mode:
- this works nicely for the LDM as Steve has engineered the LDM configure script
to build in 64-bit mode on 64-bit machines
- this does not, however, work for McIDAS. McIDAS is built in 32-bit mode by
default.
A quick check of your McIDAS v2007 build confirms that your installation was
built
in 32-bit mode:
/usr/local/ldm/etc% file ~mcidas/bin/imgdisp.k
/export/home/mcidas/bin/imgdisp.k: ELF 32-bit LSB executable 80386 Version 1
[FPU], dynamically linked, stripped
Second, since the ldm-mcidas package requires linking against both the McIDAS
and
LDM libraries, I immediately ran into a problem since the LDM was built in
64-bit
mode and McIDAS was built in 32-bit mode.
Third, since I only had the login as 'ldm', I decided to build a 32-bit version
of ldm-6.6.5
and use it in the build of the ldm-mcidas package.
In the process of creating executables for ldm-mcidas-2006 (I downloaded an as
yet unreleased
version of ldm-mcidas for use on your system), I did the following:
- create the ~ldm/ldm-mcidas directory
- move ~ldm/ldm-mcidas-2004/ and ~ldm/ldm-mcidas-2004.tar.gz to ~ldm/ldm-mcidas
- copy ldm-mcidas-2006.tar.gz from my development directory at the UPC to
~ldm/ldm-mcidas
- create needed environment variable definitions in ~ldm/.cshrc needed to build
the LDM in 32-bit mode and to build ldm-mcidas-2006. These defines are now
commented
out AND commented in your .cshrc file:
# Defines for building 32-bit ldm-mcidas
#
# Notes: 20071226 (TCY/Unidata)
#
# 1) must specify CC as /usr/bin/cc to force 32-bit LDM build
#
# 2) must specify CFLAGS as '-m32' to force 32-bit LDM build
#
# 3) must specify LDFLAGS as '-m32' to force 32-bit LDM build
#
# 4) after specifying CC, CFLAGS, and LDFLAGS, build and install
# the LDM in 32-bit mode.
#
# 5) since we want to run the LDM as a 64-bit application, but
# link ldm-mcidas against the 32-bit library and use 32-bit-specific
# include files, you need to copy the 32-bit LDM library to a
# separate location. I chose:
#
# /usr/local/ldm/32bit/include
# /usr/local/ldm/32bit/lib
#
# 6) uncomment the following definitions and 'source .cshrc' before
# attempting to build the ldm-mcidas-2006 decoders from source
# (location: /usr/local/ldm/ldm-mcidas/ldm-mcidas-2006/src)
#
setenv CC /usr/bin/cc
# setenv CFLAGS -m32
# setenv LDFLAGS -m32
# setenv CPP_LDM -I/usr/local/ldm/32bit/include
# setenv LD_LDM '-L/usr/local/ldm/32bit/lib -lldm'
# setenv CPP_MCIDAS -I/export/home/mcidas/mcidas2007/src
# setenv LD_MCIDAS '-L/export/home/mcidas/lib -lmcidas'
# setenv CPP_NETCDF -I/export/home/mcidas/mcidas2007/netcdf/libsrc
# setenv LD_NETCDF '-L/export/home/mcidas/mcidas2007/netcdf/libsrc -lnetcdf'
- build a 32-bit version of LDM-6.6.5:
source ~ldm/.cshrc
cd ~ldm/ldm-6.6.5-Unidata-fixed/src
make distclean
./configure --disable-max-size
make
make install
- save the 32-bit versions of the LDM library and include files needed for
linking
the ldm-mcidas package:
mkdir ~ldm/32bit
mkdir ~ldm/32bit/include
mkdir ~ldm/32bit/lib
cp ~ldm/ldm-6.6.5-Unidata-fixed/include/* ~ldm/32bit/include
cp ~ldm/ldm-6.6.5-Unidata-fixed/lib/* ~ldm/32bit/lib
cd ~ldm/ldm-6.6.5-Unidata-fixed/src
make distclean
- build the ldm-mcidas-2006 distribution:
cd ~ldm/ldm-mcidas
zcat ldm-mcidas-2006.tar.gz | tar xvf -
cd ldm-mcidas-2006/src
./configure
make
make test
make install
cd ~ldm/ldm-mcidas
ln -s ldm-mcidas-2006 runtime
ln -s runtime/* .
- comment all environment variable definitions in ~ldm/.cshrc that were
strictly needed
for the 32-bit ldm-mcidas build
- logoff and then log back on
- rebuild the LDM distribution in ~ldm/ldm-6.6.5-Unidata-fixed:
cd ~ldm/ldm-6.6.5-Unidata-fixed/src
./configure
make
make install
As I finish this email, you have newly built 32-bit versions of ldm-mcidas
decoders
in the ~ldm/ldm-mcidas/bin directory. You should now:
- copy the ones you want to use to the ~ldm/decoders directory
- copy ~ldm/ldm-mcidas/etc/SATANNOT and ~ldm/ldm-mcidas/etc/SATBAND to ~ldm/etc
- copy ~ldm/ldm-mcidas/etc/SCHEMA to the directory in which ldm-mcidas POINT
decoders (e.g., nldn2md and proftomd) are to write their output
- uncomment any actions that use ldm-mcidas decoders in one or more of your
LDM pattern-action files in ~ldm/etc
- stop and restart your LDM to active the new changes
- monitor your log files to make sure that everything is working OK
If you want to try building the ldm-mcidas decoders in 64-bit (not needed),
you must first build McIDAS in 64-bit mode. This should be done _after_
downloading
the latest Unidata McIDAS addendum (currently v2007h) and after making a
modification
to your shell-specific configuration file (e.g., .cshrc for C Shell;
.bash_profile
for BASH; etc.) for the user 'mcidas'. The modification to make is the addition
of the environment variable XARCH as follows (C shell example):
# McINST_ROOT and VENDOR non-conforming shell defines
# needed to build McIDAS
setenv McINST_ROOT /export/home/mcidas
setenv VENDOR -vendor
# NOTE: uncomment the line that sets MySQL_ROOT if you want to
# build with MySQL support:
# - leave the value blank if MySQL is installed in a standard
# location
# - specify the value as the root directory of the MySQL
# installation if MySQL is not installed in a standard
# location
setenv MySQL_ROOT /usr/local/mysql
setenv XARCH "-xarch=amd64 -U__x86_64__"
unsetenv MCPATH
if ( -e $HOME/solaris/admin/mcidas_env.csh ) then
source $HOME/solaris/admin/mcidas_env.csh
endif
After making this change, you can try building McIDAS in 64-bit mode:
<as 'mcidas'>
cd ~mcidas
-- make changes to .cshrc as indicated above
source .cshrc
cd mcidas2007/update
-- download the v2007h addendum: mcupdate.tar.gz, mcupdate.list.2007h
./mcupdate
cd ../src
make clobber
make all
If your 64-bit McIDAS build goes smoothly, then you could try building the
ldm-mcidas decoders in 64-bit. Since I have not tried this, I can not state
what problems you may run into.
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: BHL-779615
Department: Support ldm-mcidas
Priority: Normal
Status: Closed