[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[McIDAS #UFO-107919]: IMGCOPY and netcdf
- Subject: [McIDAS #UFO-107919]: IMGCOPY and netcdf
- Date: Mon, 17 Jul 2006 17:41:41 -0600
Hi again Gautam,
During the process of trying to build the netCDF image write server,
ncdfaput, I ran into difficulties that had me stumped:
./mccomp -O -s -o ncdfaput ncdfaput.o -L. -lsdi -lmcidas -L../netcdf/libsrc
-lnetcdf
mccomp: Using default optimizations
g77 -O -o ncdfaput ncdfaput.o -L. -L../netcdf/libsrc -L/usr/X11R6/lib
-L/usr/lib/gcc/powerpc-apple-darwin8/4.0.0 -lsdi -lmcidas -lnetcdf -lgcc_g77 -lm
/usr/bin/ld: /usr/lib/gcc/powerpc-apple-darwin8/4.0.0/libgcc.a(_udivdi3.o)
section's (__TEXT,__eh_frame) type S_COALESCED does not match previous objects
type S_REGULAR
/usr/bin/ld: /usr/lib/gcc/powerpc-apple-darwin8/4.0.0/libgcc.a(_umoddi3.o)
section's (__TEXT,__eh_frame) type S_COALESCED does not match previous objects
type S_REGULAR
collect2: ld returned 1 exit status
link ncdfaput: FAILED
I figured that rebuilding the distribution from scratch might be beneficial, so
I
proceeded to carry that out:
<as 'mcidas'>
cd ~/mcidas2005/src
make clobber
make
It was at this point that I found that the necessary set of environment
variables
need for a build were not defined. So, I reviewed the contents of your BASH
shell definition files, ~/.bashrc and ~/.bash_profile. Here I saw you were
not reading the definition file I send with the McIDAS distribution, so
I modified both of your files to include the following:
# McINST_ROOT and VENDOR conforming shell defines needed to bulid McIDAS
McINST_ROOT=$HOME
VENDOR=-g77
export McINST_ROOT VENDOR
if [ -e $HOME/admin/mcidas_env.sh ]; then
. $HOME/admin/mcidas_env.sh
fi
I did this _after_ commenting out the definitions that were already there.
After making the change to both .bashrc and .bash_profile, I proceeded to
rebuild McIDAS again:
make clobber
make
When I ran into the S_COALESCED problem once again, I decided to search around
on the net for information. I found what I needed in the following comment:
http://forums.macosxhints.com/archive/index.php/t-23031.html
...
markquis 04-27-2004, 12:24 PM
g77 code links fine with gcc code if -lg2c is used
For the case mentioned in the previous post
g77 -c testf1.f
g77 -c testf2.f
g++ -o testexec testcpp.cpp testf1.o testf2.o -lg2c -lstdc++ -lgcc
I found this info at:
http://lists.debian.org/debian-user/1999/debian-user-199912/msg01775.html
I added search of lib2c.a in the Darwin section of mccomp.sh, and then once
again tried the build:
make clobber
make
This time everything built OK. Before installing the newly created executables,
I decided to retest the IMGCOPY invocation that was failing:
<still as 'mcidas'>
cd $MCDATA
imgcopy.k BLIZZARD/G7-VIS-4K.1 NETCDF/GOES.1
Beginning Image Data transfer, bytes= 308048
Transferring AREA data outbound, bytes= 308128
IMGCOPY: BLIZZARD/G7-VIS-4K.1 copied to NETCDF/GOES.1
imgcopy.k: done
As you can see, this now works.
The only thing I can figure is that there was some change in the build
environment
on lena that resulted in 'ncdfaput' not working correctly. I say this because
my investigations of your problem showed that 'ncdfaput' was not being run, and
so no output file was getting created.
Please test the newly built code and let me know if you see anything amiss.
Meanwhile, I will have to do some more thinking about what changed between
the first time I built McIDAS on lena and now.
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: UFO-107919
Department: Support McIDAS
Priority: Normal
Status: Closed