[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
19990518: Undeclared vrbls in Slackware Linux installation (cont.)
- Subject: 19990518: Undeclared vrbls in Slackware Linux installation (cont.)
- Date: Tue, 18 May 1999 14:29:41 -0600
>From: Jim Heimbach <address@hidden>
>Organization: UNCA
>Keywords: 199905141945.NAA27523 McIDAS-X Slackware Linux
Jim,
> Your notes on f2c worked fine. The computer ground on for a half
>hour doing its thing. Now it appears that the program decoder
>is missing some variable declarations. I could muddle through and
>edit in the declarations, but have an aversion to doing so to
>other folks programs. Is there a quick fix to this? The
>undeclared variables are optarg, optind, and optopt. Below is
>the tail of the makelog.
>
>=========================================================
>
>mcfc -s -o zm.k zm.o -L. -L/usr/local/lib -L/usr/X11R6/lib -lmcidas -lf2c -ldl
> -lm
>link zm.k: done
>./mccomp -I. -I../netcdf/libsrc -c decoder.cp
>gcc -c -O -ansi -D_GNU_SOURCE -I/usr/X11R6/include -I. -I../netcdf/libsrc deco
> der.c
>decoder.c: In function `decode_block':
>decoder.c:438: warning: assignment makes pointer from integer without a cast
>decoder.c: In function `notify':
>decoder.c:715: warning: assignment makes pointer from integer without a cast
>decoder.c: In function `main':
>decoder.c:1220: `optarg' undeclared (first use this function)
>decoder.c:1220: (Each undeclared identifier is reported only once
>decoder.c:1220: for each function it appears in.)
>decoder.c:1236: `optind' undeclared (first use this function)
>decoder.c:1260: warning: assignment makes pointer from integer without a cast
>decoder.c:1265: `optopt' undeclared (first use this function)
>decoder.c:1391: warning: assignment makes pointer from integer without a cast
>decoder.c:1468: warning: assignment makes pointer from integer without a cast
>compile decoder.cp: FAILED
>
>=====================================================================
Hmm... 7.5 builds with no problems on our RedHat 5.2 system here at Unidata,
so this seems like it might be a Slackware "thing".
I logged onto yor system and tried adding some explicit declarations
to decoder.cp:
/* <<<<< UPC mod 990518 -- Slackware Linux Begin >>>>> */
extern char *optarg;
extern int optint, opterr, optopt;
/* <<<<< UPC mod 990518 -- Slackware Linux End >>>>> */
This allowed decoder.cp to be compiled, but the build would fail during
the link phase. 'makelog' indicated that the problem was an undefined
reference to 'scalb':
decoder.o: In function `getflt':
decoder.o(.text+0x3b6): undefined reference to `scalb'
link decoder: done
I checked out RedHat Linux system and see that 'scalb' has a man page
and is included in libm.a. The same is _not_ true on your system, and
I couldn't find out if/where it might be defined. Given this, I took
the quick and dirty route of:
cd ~mcidas/mcidas7.5/src
touch decoder
make all
The reason that I am not too worried about this is that 'decoder' (the
executable produced from the compilation/link of 'decoder.cp' is only
used by the SDI routines in the McIDAS distribution. For reference,
SDI is Satellite Data Ingestor, and Unidata users do not have these
kind of boxes (direct ingest of GOES, etc. on computers with special
hardware installed in PCI bus master slots). The bottom line is 'decoder'
is not something you would ever use, so it being empty will make no
difference to you.
I then took the liberty of letting the make continue so I could see
if anything else would break; it didn't. The build finished with
no more problems at:
##########################################
Tue May 18 17:24:33 EDT 1999: BUILD END
##########################################
Since McINST_ROOT appeared to be setup correctly, I went ahead and
installed McIDAS-X 7.5:
make install.all
You need to keep following the instructions in the online McIDAS
documentation to configure McIDAS.
While I was on your system, I decided to take a look around at your setup.
Here are some things I found that need changing:
McINST_ROOT=/home/mcidas
MCDATA=/home/mcidas/workdata
MCPATH=/home/mcidas/workdata:/typhoon/data/mcidas/data:/home/mcidas/help
MCGUI=/home/mcidas/bin
MCTABLE_READ=/home/mcidas/workdata/MCTABLE.TXT:/home/mcidas/data/ADDESITE.TXT
MCTABLE_WRITE=/home/mcidas/data/ADDESITE.TXT
XCD_disp_file=/home/mcidas/workdata/DECOSTAT.DAT
All of these are OK EXCEPT MCPATH. MCPATH should at the minimum be:
MCPATH=/home/mcidas/workdata:/home/mcidas/data:/home/mcidas/help
You need to setup MCPATH (everyone's MCPATH, by the way) so that it contains
the McIDAS _installation_ data directory. On your system, this is
/home/mcidas/data.
If you want McIDAS to automatically search the /typhoon/data/mcidas/data
directory when looking for data files, the MCPATH would be:
MCPATH=/home/mcidas/workdata:/home/mcidas/data:/home/mcidas/help:/typhoon/data/mcidas/data
Better yet, follow the guidance of the installation documents and setup
your local copy of the example REDIRECTion file, EXAMPLE.NAM, to contain
REDIRECTions to the data you want your session to be able to access. This
will cut down on several problems that you could run into in the future.
Please let me know if you run into anything else, especially if something
in the online installation documents don't make sense.
>Thanks again -- Jim H.
You are welcome.
Tom
>From address@hidden Wed May 19 09:51:27 1999
>Subject: Looks good.
Tom;
Many thanks for the copious help. I cranked up mcidas without doing
much else and dang!, it looks good. I like the way it takes advantage
of the six panel instant recall that Linux has in startx. Now I can
settle back and examining some fine points like the menu box and this
ADDE business.
-- Jim H