[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
20040326: linking problem with RH9 and mcidas
- Subject: 20040326: linking problem with RH9 and mcidas
- Date: Fri, 26 Mar 2004 10:26:52 -0700
>From: John Hobbie <address@hidden>
>Organization: NMSU/NSBF
>Keywords: 200403261659.i2QGx1rV013651 McIDAS Linux mcwish tclcomp.sh
>Hi,
>I ran into a problem doing a clean install of mcidas; the make won't link the
> "mcwish" program/routine.
>
>It is a new system, with a fresh install of RH9. I've been following the
>installation cookbook from unidata to the letter as best I can tell. The
>last few lines of the makelog file are as follows:
>
>****************
>gcc -c -I/usr/X11R6/include -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 -D_LARGEFILE64
> _SOURCE=1 -DTCL_WIDE_INT_TYPE=long\ long -DHAVE_STRUCT_STAT64=1 -DHAVE_TYPE_O
> FF64_T=1 -DHAVE_GETCWD=1 -DHAVE_OPENDIR=1 -DHAVE_STRSTR=1 -DHAVE_STRTOL=1 -DH
> AVE_STRTOLL=1 -DHAVE_STRTOULL=1 -DHAVE_TMPNAM=1 -DHAVE_WAITPID=1 -DHAVE_UNIST
> D_H=1 -DHAVE_SYS_PARAM_H=1 -DUSE_TERMIOS=1 -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SY
> S_TIME=1 -DHAVE_TM_ZONE=1 -DHAVE_GMTIME_R=1 -DHAVE_LOCALTIME_R=1 -DHAVE_TM_GM
> TOFF=1 -DHAVE_TIMEZONE_VAR=1 -DHAVE_ST_BLKSIZE=1 -DSTDC_HEADERS=1 -DHAVE_SIGN
> ED_CHAR=1 -DHAVE_LANGINFO=1 -DPEEK_XCLOSEIM=1 -DHAVE_SYS_IOCTL_H=1 -DHAVE_UNI
> STD_H=1 -DHAVE_LIMITS_H=1 -D_LARGEFILE64_SOURCE=1 -DTCL_WIDE_INT_TYPE=long\ l
> ong -DHAVE_STRUCT_STAT64=1 -DHAVE_TYPE_OFF64_T=1 -DPEEK_XCLOSEIM=1 -DSTDC_HEA
> DERS=1 -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_PW_GECOS=1 -O -I. -I
> ../netcdf/libsrc -I../hdf/hdf/src -I../hdf/mfhdf/libsrc -I../jpeg -I../zlib -
> I../tcl -I../tcl/generic -I../tk -I../tk/generic tkAppInit.c
>compile tkAppInit.c: done
>./tclcomp ./mccomp -O -s -g77 -o mcwish wishcrex.o wisherrh.o wishinit.o wishm
> cid.o wishrglb.o wishutil.o wishxinf.o wishxwin.o tkAppInit.o -L. -lmcidas
>mccomp: Using default optimizations
>g77 -s -Wl,-rpath,/home/mcidas/tcl/lib -O -o mcwish wishcrex.o wisherrh.o wish
> init.o wishmcid.o wishrglb.o wishutil.o wishxinf.o wishxwin.o tkAppInit.o -L.
> -L/home/mcidas/tcl/lib -L/home/mcidas/tcl/lib -L/usr/X11R6/lib -L/usr/X11R6/
> lib -lmcidas -ltk8.4 -ltcl8.4 -lX11 -ldl -lieee -lm -ldl -lm
>/usr/bin/ld: cannot find -ltk8.4
>collect2: ld returned 1 exit status
>link mcwish: FAILED
I found this problem just recently and fixed the code causing it, but
it is not yet available in an addendum.
You can FTP the corrected script used in the McIDAS build, and get going
again as follows:
<login as 'mcidas'>
cd mcidas2003/src
ftp ftp.unidata.ucar.edu
<user> anonymous
<pass> address@hidden
cd pub/mcidas/src
binary
get tclcomp.sh
quit
Then restart your make:
make all VENDOR=-g77
The build should now proceed with no problems.
>*********************
>I found the file "mcidas2003/tk/unix/libtk8.4.so" but no other files with
>tk8.4 as part of the name on the machine.
This is the file that is needed in the link process (library tk8.4 will
mean either libtk8.4.a or libtk8.4.so to the linker). The problem was
that tclcomp.sh was not telling the linker to search the
~mcidas/mcidas2003/tk/unix directory for the library.
>The csh used (.cshrc) to set the environmental variables was:
>***************************
>umask 002
># MCHOME and McINST_ROOT
>setenv MCHOME $HOME
>setenv McINST_ROOT $MCHOME
>
># NOTE: conditional definition is only needed for C-shell users
>if ( ! ${?MCPATH} ) then
> setenv MCDATA $MCHOME/workdata
> setenv MCPATH ${MCDATA}:$MCHOME/data:$MCHOME/help
> setenv MCGUI $MCHOME/bin
> setenv MCTABLE_READ "${MCDATA}/MCTABLE.TXT;$MCHOME/data/ADDESITE.TXT"
> setenv MCTABLE_WRITE "$MCHOME/data/ADDESITE.TXT"
> setenv XCD_disp_file $MCDATA/DECOSTAT.DAT
> if ( ! ${?path} ) then
> set path=$MCGUI
> else
> set path=(${MCGUI} $path)
> endif
>endif
>
># Limit ADDE transfers to compressed ones
>setenv MCCOMPRESS TRUE
>
># Add ons to make the mcidas compliers work
>setenv CC gcc
>setenv CPPFLAGS "-DNDEBUG -Df2cFortran"
>setenv CFLAGS -O
>setenv FC g77
>setenv FFLAGS "-O -Wuninitialized -fno-automatic"
>setenv CXX
>
>*******************
>The make command format was: make all VENDOR=-g77
This is all correct. The problem is in the routine tclcomp.sh, and the
version available in the pub/mcidas/src directory of anonymous FTP
contains the fix.
>Any help will be appreciated
Sorry for the problem. I just cut a new full distribution and incremental
addendum with the tclcomp.sh fix.
Cheers,
Tom
--
NOTE: All email exchanges with Unidata User Support are recorded in the
Unidata inquiry tracking system and then made publically available
through the web. If you do not want to have your interactions made
available in this way, you must let us know in each email you send to us.
>From address@hidden Fri Mar 26 10:55:42 2004
Tom --
Thanks for the prompt response and support. Just tried it, and it worked like
a champ.
Thanks again,
Hobbie