[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
20011207: McIDAS vis-a-via Solaris 7/8 (cont.)
- Subject: 20011207: McIDAS vis-a-via Solaris 7/8 (cont.)
- Date: Sat, 08 Dec 2001 09:28:00 -0700
>From: "James R. Frysinger" <address@hidden>
>Organization: College of Charleston
>Keywords: 200111061842.fA6Igt112242 LDM binary install
Jim,
re: never run LDM as root
> 'Twarn't me except for that one time that I su'd to root to do
>ldmadmin stop. I've been doing the start/stop/watch/...... as ldm.
I sent this along just to make sure that it was clearly a no-no.
> I went down to the college today, but didn't get a chance to try
>putting the startup script back in the rc2.d directory. You had some
>things you were going to check on anyway.
The people I needed to talk with were in and out, so I have nothing to
send along today.
>New stuff:
> I went to the LDM-MCIDAS instructions and read them over. Given our
>non-standard installation configuration and non-standard compiler
>packages, I figured that I had better compile from source.
I would recommend using a binary distribution. I created the binaries
using static linking where possible, so you should be OK. The installation
of the binary release is _so_ much easier than fighting the source code
build, that I think it will help you make quick progress. It is as
simple as:
o login as 'ldm' and make sure you are in the home directory for 'ldm'
cd ~ldm
o FTP the appropriate ldm-mcidas binary distribution:
ftp ftp.unidata.ucar.edu
<user> anonymous
<pass> your_full_email_address
cd pub/binary/sunos_5.8-sparc
binary
get ldm-mcidas.tar.Z
quit
o unpack the distribution:
zcat ldm-mcidas.tar.Z | tar xvf -
o make the ~ldm/decoders directory if you havn't already done so:
mkdir decoders
o copy the needed ldm-mcidas decoders/scripts from the ldm-mcidas bin directorey
to the decoders directory:
cd ldm-mcidas-7.6.4/bin
cp area2png nldn2md pnga2area proftomd batch.k uwgrid.sh ~ldm/decoders
And copy a couple files to the ldm 'etc' directory:
cd ../etc
cp SATANNOT SATBAND ~ldm/etc
Finally, copy a couple of files to the directory in which you will be
decoding ldm-mcidas produced data files. From our previous discussions
this is /export/home/mcdata:
cp ROUTE.SYS SYSKEY.TAB /export/home/mcdata
Ordinarily, you would copy SCHEMA to /export/home/mcdata, but you will
be using the newer one in the McIDAS distribution
o finally, as a sanity check, make sure that the decoders that you
just copied to the decoders directory are executable AND will run
on your system:
cd ~ldm/decoders
ls -alt <- check output for execute permissions
ldd pnga2area <- to see if all needed libraries can be found
ldd proftomd <- to see if all needed libraries can be found
ldd nldn2md <- to see if all needed libraries can be found
o while you are at it, you can configure the shell scripts you copied
to the decoders directory. Since there will be several scripts
and one more needed from the McIDAS distribution, copy the one
from the McIDAS distribution first and then do the editing:
cp ~mcidas/bin/xcd_run .
cp ~mcidas/workdata/mcscour.sh .
<edit xcd_run, batch.k, mcscour.sh, and uwgrid.sh>
In all of the scripts, you will need to set the HOME directory of
the user 'mcidas', and adjust PATH and possibly LD_LIBRARY_PATH
lines. The scripts all read the same, so the process is cookbook:
Here is what the lines look like in xcd_run:
...
MCHOME=/home/mcidas
MCDATA=$MCHOME/workdata
MCLOG=$MCDATA/XCD_START.LOG
MCPATH=${MCDATA}:$MCHOME/data:$MCHOME/help
# Setup PATH so that the McIDAS-X executables can be found
PATH=$MCHOME/bin:/usr/openwin/bin:/opt/SUNWspro/bin:/usr/ccs/bin:/usr/bin:/usr/local/bin:/usr/ucb
# Set LD_LIBRARY_PATH to include all directories (other than those searched
# by default) that are needed to be searched to find shared libraries.
# For this example, I assume that the shared Fortran library is located
# in /opt/SUNWspro/lib
LD_LIBRARY_PATH=/usr/openwin/lib:/opt/SUNWspro/lib:$MCHOME/lib:/usr/lib:/usr/ucblib
...
Right off, you can see that you need to change MCHOME:
change:
MCHOME=/home/mcidas
to:
MCHOME=/export/home/mcidas
Since you are on a Sun Solaris system, you should not have to do anything
else (these scripts were setup with Sun Solaris defaults), but since you
don't have the Sun compilers, you could eliminate the references to
the /opt/SUNWspro/bin and /opt/SUNWspro/lib directories. This is not
crutial, however.
Remember, do the above for each script.
o finally, make sure that the PATH for your LDM user, 'ldm', has the
decoders directory in it:
cd ~ldm
which pnga2area
If the 'which' invocation doesn't show that you did not find
the ~ldm/decoders/pnga2area executable, then you have something wrong
in your PATH or pnga2area is not marked as executable.
That is it for installing AND configuring ldm-mcidas from a binary
distribution. It is a lot easier than trying to first build the distribution
from source and then doing the copies and edits.
Now, as far as your attempt of building ldm-mcidas, I can see one problem
right off. You specify FC as /usr/local/bin/f77. This is the GNU g77
compiler, and you did not use that compiler to build McIDAS. This needs
to be changed to /export/home/mcidas/mcidas7.8/src/mcfc.
After making any changes to environment variable definitions, you have
to do a 'make distclean' and rerun configure to redo the build from source
step. Again, I don't think you need to do this, but I will help you
slog through it if you want.
> I created a user at /export/home/ldmcidas so that it would be at the
>same level as /export/home/ldm. Obviously I had to shorten the name due
>to our 8-character name limit. Then I chown'd the ldmcidas home
>directory to ldm since the directions recommended making this package
>as the same user that made LDM. That let me zcat | tar the package
>successfully; otherwise, without chown ldm (or a chmod) I couldn't
>write to the directory. I then did setenv on some variables and checked
>them, by kluging the (non-congruent) ldm-mcidas directions and the
>INSTALL file directions together:
> weather[65] echo $CC
> /usr/local/bin/gcc
This is OK.
> weather[66] echo $FC
> /usr/local/bin/f77
This should be /export/home/mcidas/mcidas7.8/src/mcfc
> weather[67] echo $CPP_LDM
> -I/export/home/ldm/include
This is OK.
> weather[68] echo $LD_LDM
> -L/export/home/ldm/lib -lldm
This is OK.
> weather[69] echo $CPP_MCIDAS
> -I/export/home/mcidas/src
This should be -I/export/home/mcidas/mcidas7.8/src or
-I/export/home/mcidas/inc (after McIDAS has been installed)
> weather[70] echo $LD_MCIDAS
> -L/export/home/mcidas/lib -lmcidas
This is OK after McIDAS is installed.
> weather[71] echo $CPP_NETCDF
> -I/export/home/ldm/src
> weather[72] echo $LD_NETCDF
> -L/usr/local/ldm/lib -lnetcdf
The last two would be OK if the netCDF is installed to match your settings.
Since the netCDF is bundled with McIDAS, you can use it from there:
CPP_NETCDF=-I/export/home/mcidas/mcidas7.8/netcdf/libsrc
LD_NETCDF="-L/export/home/mcidas/mcidas7.8/netcdf/libsrc -lnetcdf"
Again, after making any changes to the environment variables used in
the configure process you need to run 'make distclean' and ./configure
again.
At this point, the output you included is not relevant since you will rerun
configure.
Tom
>Of course, in csh I had to change the format of the setenv statement a
>bit, using double quotes instead of ` ' to surround arguments
>containing a space.
>
>Then I did ./configure while in /export/home/ldm-mcidas-7.6.4/src,
>redirecting output to configure.log. That seemed to go OK in that I did
>not get any errors in configure.log, but I did get the following screen
>output:
> weather[79] ./configure > configure.log
> ./configure: system: execute permission denied
> expanding `include's in file `Makefile'
> expanding `include's in file `decode/Makefile'
> expanding `include's in file `libpng/Makefile'
> expanding `include's in file `zlib/Makefile'
> expanding `include's in file `port/master.mk'
> expanding `include's in file `port/Makefile'
> expanding `include's in file `port/misc/Makefile'
> expanding `include's in file `port/cfortran/Makefile'
>
>I have no idea what that first output line refers to nor its
>significance. The configure.log file contains:
> creating cache ./config.cache
> checking type of operating system... sunos5
> checking for catman... catman
> checking for manual-page index command... catman -w -M $(MANDIR)
> checking for C compiler... /usr/local/bin/gcc
> checking for dependency generation mechanism... /usr/local/bin/gcc -M
> checking how to run the C preprocessor... /usr/local/bin/gcc -E
> checking the C preprocessor... works
> checking for C const... yes
> checking for C volatile... yes
> checking for C signed... yes
> checking for C function prototypes... yes
> checking for standard C variadic functions... yes
> checking for standard C string generation... yes
> checking for standard C token pasting... yes
> checking C void pointer... yes
> checking for ar... ar
> checking for tar flags... -chof
> checking for ranlib... ranlib
> checking binary distribution directory...
>/home/ftp/pub/binary/dummy_system
> checking the installation prefix...
>/export/home/ldmcidas/ldm-mcidas-7.6.4
> checking the installation exec-prefix...
>/export/home/ldmcidas/ldm-mcidas-7.6.4
> checking for ranlib... (cached) ranlib
> checking for FORTRAN compiler... /usr/local/bin/f77
> checking how to run the C preprocessor... /usr/local/bin/gcc -E
> checking the C preprocessor... works
> checking for neqn... neqn
> checking for tbl... tbl
> checking for LDM header-file... -I/export/home/ldm/include
> checking for LDM library... -L/export/home/ldm/lib -lldm
> checking for stddef.h... yes
> checking C header file <stddef.h> for typedef size_t... declared
> checking for stddef.h... (cached) yes
> checking C header file <stddef.h> for typedef ptrdiff_t... declared
> checking for fgetc... yes
> checking for stdio.h... yes
> checking C header file <stdio.h> for function fgetc()... declared
> checking for stdlib.h... yes
> checking C header file <stdlib.h> for typedef size_t... declared
> checking for atexit... yes
> checking for stdlib.h... (cached) yes
> checking C header file <stdlib.h> for function atexit()... declared
> checking for getenv... yes
> checking for stdlib.h... (cached) yes
> checking C header file <stdlib.h> for function getenv()... declared
> checking for string.h... yes
> checking C header file <string.h> for typedef size_t... declared
> checking for strerror... yes
> checking for string.h... (cached) yes
> checking C header file <string.h> for function strerror()... declared
> checking for string.h... (cached) yes
> checking C header file <string.h> for function strchr()... declared
> checking for string.h... (cached) yes
> checking C header file <string.h> for function strcpy()... undeclared
> checking for string.h... (cached) yes
> checking C header file <string.h> for function strrchr()... declared
> checking for string.h... (cached) yes
> checking C header file <string.h> for function strncpy()... declared
> checking for string.h... (cached) yes
> checking C header file <string.h> for function strtok()... declared
> checking for strstr... yes
> checking for string.h... (cached) yes
> checking C header file <string.h> for function strstr()... declared
> checking for memmove... yes
> checking for string.h... (cached) yes
> checking C header file <string.h> for function memmove()... declared
> checking for time.h... yes
> checking C header file <time.h> for typedef time_t... declared
> checking for time.h... (cached) yes
> checking C header file <time.h> for typedef size_t... declared
> checking for difftime... yes
> checking for time.h... (cached) yes
> checking C header file <time.h> for function difftime()... declared
> checking for strftime... yes
> checking for time.h... (cached) yes
> checking C header file <time.h> for function strftime()... declared
> checking for McIDAS header-files... -I/export/home/mcidas/src
> checking for usleep... yes
> checking for unistd.h... yes
> checking C header file <unistd.h> for function usleep()... declared
> checking for McIDAS library... -L/export/home/mcidas/lib -lmcidas
> checking for netCDF header-file... -I/export/home/ldm/src
> checking for netCDF library... -L/usr/local/ldm/lib -lnetcdf
> checking for X11 library...
> checking for XNoOp(0) in default library(s)... no
> checking for XNoOp(0) in -lX11... yes
> checking for C math library...
> checking for (void)sin(0.0) in default library(s)... no
> checking for (void)sin(0.0) in -lm... yes
> checking for BSD sockets library...
> checking for socket(0,0,0) in default library(s)... no
> checking for socket(0,0,0) in -lsocket... yes
> checking for BSD sockets library... -lsocket
> checking for dynamic-link library...
> checking style for cfortran.h... Standard
> checking FORTRAN library...
> checking for package version... 7.6
> updating cache ./config.cache
> creating ./config.status
> creating Makefile
> creating decode/Makefile
> creating libpng/Makefile
> creating zlib/Makefile
> creating port/master.mk
> creating port/Makefile
> creating port/misc/Makefile
> creating port/cfortran/Makefile
> creating port/misc/udposix.h
> creating port/misc/stdarg.h
> creating port/misc/limits.h
> creating port/misc/stddef.h
> creating port/misc/stdio.h
> creating port/misc/stdlib.h
> creating port/misc/string.h
> creating port/misc/time.h
>
>Then, I looked at the directions for 'make' in the ldm-mcidas
>instructions and in the INSTALL instructions, which differ somewhat. I
>decided to go with the INSTALL instructions because that takes the
>steps one at a time and produces separate records of each step. So I
>did make > make.log; tail -f make.log but this did not get very far.
>The make.log contains:
> making `all' in directory
>/export/home/ldmcidas/ldm-mcidas-7.6.4/src/port
>
>
> making `all' in directory
>/export/home/ldmcidas/ldm-mcidas-7.6.4/src/port/misc
>
>/usr/local/bin/gcc -c -O -I. -D_REENTRANT uddummy.c
>ar rcuv libudport.a uddummy.o
>a - uddummy.o
>case "" in \
>'') ;; \
>*) ar rucv libudport.a ;; \
>esac
>ranlib libudport.a
>`all' is updated.
>
> returning to directory
>/export/home/ldmcidas/ldm-mcidas-7.6.4/src/port
>
>
> making `all' in directory
>/export/home/ldmcidas/ldm-mcidas-7.6.4/src/port/cfortran
>
>
> returning to directory
>/export/home/ldmcidas/ldm-mcidas-7.6.4/src/port
>
> `all' is updated.
>
> returning to directory /export/home/ldmcidas/ldm-mcidas-7.6.4/src
>
>
> making `all' in directory
>/export/home/ldmcidas/ldm-mcidas-7.6.4/src/zlib
>
>/usr/local/bin/gcc -c adler32.c
>/usr/local/bin/gcc -c compress.c
>/usr/local/bin/gcc -c crc32.c
>/usr/local/bin/gcc -c deflate.c
>/usr/local/bin/gcc -c gzio.c
>/usr/local/bin/gcc -c infblock.c
>/usr/local/bin/gcc -c infcodes.c
>/usr/local/bin/gcc -c inffast.c
>/usr/local/bin/gcc -c inflate.c
>/usr/local/bin/gcc -c inftrees.c
>/usr/local/bin/gcc -c infutil.c
>/usr/local/bin/gcc -c trees.c
>/usr/local/bin/gcc -c uncompr.c
>/usr/local/bin/gcc -c zutil.c
>ar rcuv libz.a adler32.o compress.o crc32.o deflate.o gzio.o
>infblock.o infcodes.o inffast.o inflate.o inftrees.o infutil.o
>trees.o uncompr.o zutil.o
>a - adler32.o
>a - compress.o
>a - crc32.o
>a - deflate.o
>a - gzio.o
>a - infblock.o
>a - infcodes.o
>a - inffast.o
>a - inflate.o
>a - inftrees.o
>a - infutil.o
>a - trees.o
>a - uncompr.o
>a - zutil.o
>
> returning to directory /export/home/ldmcidas/ldm-mcidas-7.6.4/src
>
>
> making `all' in directory
>/export/home/ldmcidas/ldm-mcidas-7.6.4/src/libpng
>
>/usr/local/bin/gcc -c -O -I../zlib png.c
>/usr/local/bin/gcc -c -O -I../zlib pngset.c
>/usr/local/bin/gcc -c -O -I../zlib pngget.c
>/usr/local/bin/gcc -c -O -I../zlib pngrutil.c
>/usr/local/bin/gcc -c -O -I../zlib pngtrans.c
>/usr/local/bin/gcc -c -O -I../zlib pngwutil.c
>/usr/local/bin/gcc -c -O -I../zlib pngread.c
>/usr/local/bin/gcc -c -O -I../zlib pngrio.c
>/usr/local/bin/gcc -c -O -I../zlib pngwio.c
>/usr/local/bin/gcc -c -O -I../zlib pngwrite.c
>/usr/local/bin/gcc -c -O -I../zlib pngrtran.c
>/usr/local/bin/gcc -c -O -I../zlib pngwtran.c
>/usr/local/bin/gcc -c -O -I../zlib pngmem.c
>/usr/local/bin/gcc -c -O -I../zlib pngerror.c
>/usr/local/bin/gcc -c -O -I../zlib pngpread.c
>ar rcuv libpng.a png.o pngset.o pngget.o pngrutil.o pngtrans.o
>pngwutil.o pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o
>pngwtran.o pngmem.o pngerror.o pngpread.o
>a - png.o
>a - pngset.o
>a - pngget.o
>a - pngrutil.o
>a - pngtrans.o
>a - pngwutil.o
>a - pngread.o
>a - pngrio.o
>a - pngwio.o
>a - pngwrite.o
>a - pngrtran.o
>a - pngwtran.o
>a - pngmem.o
>a - pngerror.o
>a - pngpread.o
>ranlib libpng.a
>/usr/local/bin/gcc -c -O -I../zlib pngtest.c
>/usr/local/bin/gcc -o pngtest -O -I../zlib pngtest.o -L. -lpng
>-L../zlib -lz -lm
>
> returning to directory /export/home/ldmcidas/ldm-mcidas-7.6.4/src
>
>
> making `all' in directory
>/export/home/ldmcidas/ldm-mcidas-7.6.4/src/decode
>
>test -r udalloc.c || ln -s ../port/misc/udalloc.c udalloc.c
>/usr/local/bin/gcc -c -O -I/export/home/mcidas/src
>-I/export/home/ldm/include -I../libpng -I../zlib -I../port/misc
>-I../port/cfortran -I/export/home/ldm/src alarm.c
>/usr/local/bin/gcc -c -O -I/export/home/mcidas/src
>-I/export/home/ldm/include -I../libpng -I../zlib -I../port/misc
>-I../port/cfortran -I/export/home/ldm/src pngsubs.c
>/usr/local/bin/gcc -c -O -I/export/home/mcidas/src
>-I/export/home/ldm/include -I../libpng -I../zlib -I../port/misc
>-I../port/cfortran -I/export/home/ldm/src area2png.c
>/usr/local/bin/gcc -o area2png alarm.o pngsubs.o area2png.o
>-L/export/home/ldm/lib -lldm -lX11 ../port/misc/libudport.a
>-L/usr/local/ldm/lib -lnetcdf -L../libpng -lpng -L../zlib -lz
>-R/usr/ucblib -L/usr/ucblib -lrpcsoc -lnsl -lsocket -lsocket -lm ||
>(rm -f area2png; exit 1)
> *** Error code 1
> *** Error code 1
> *** Error code 1
>
>The directions in INSTALL tell me to send you the above logs, the
>environmental variables, and the following outputs:
>weather[80]uname -a
>SunOS weather 5.7 Generic_106541-17 sun4u sparc SUNW,Ultra-5_10
>
>Sorry for the long message, but I didn't know if you found attachments
>to be convenient, inconvenient, or impossible.
>
>Jim
>
>--
>James R. Frysinger University/College of Charleston
>10 Captiva Row Dept. of Physics and Astronomy
>Charleston, SC 29407 66 George Street
>843.225.0805 Charleston, SC 29424
>http://www.cofc.edu/~frysingj address@hidden
>Cert. Adv. Metrication Specialist 843.953.7644
>