[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

20040218: Help needed, linker errors with mcidas 2003 on linux



>From:  Steve Ochani <address@hidden>
>Organization:  SUNY Nassau Community College
>Keywords:  200402182003.i1IK3BrV028667 McIDAS-X SuSe 9.0 libsdi.a make

Hi Steve,

>In preparation for a new mcidas machine here at SUNY Nassau Community
>College I am trying to build mcidasx on a suse linux 9.0 machine. I know
>suse linux is not officially supported but I was hoping someone could
>recognize the problem. We cannot use Redhat Linux/ or fedora. More on
>this later...

The build on SuSe 9.0 is interesting since I received an inquiry about
whether this would work from a user in Europe.

>I first tried using g77 and f2c.
>
>First g77...

gcc/g77 is my preferred combination of compilers anymore.

>My .cshrc file looked as such.
>----
> /home/mcidas> more .cshrc
># C-shell environment variable definitions for the user 'mcidas'
>
># umask
>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
>
>setenv CC gcc
>setenv CPPFLAGS "-DNDEBUG -Df2cFortran"
>setenv CFLAGS -O
>setenv FC g77
>setenv FFLAGS "-O -Wuninitialized -fno-automatic"
>setenv CXX

This looks fine.

>I made sure to logout and log back in. I changed the makefile's vendor line
>to -g77
>
>This is the error I got.
>
>----
>rm -f wwdisp.hlp; ./mcmkhelp < wwdisp.c > wwdisp.hlp
>rm -f wwlist.hlp; ./mcmkhelp < wwlist.c > wwlist.hlp
>rm -f wxtlist.hlp; ./mcmkhelp < wxtlist.c > wxtlist.hlp
>rm -f zm.hlp; ./mcmkhelp < zm.c > zm.hlp
>compile decoder.cp:             done
>link    decoder:                done
>compile gvaradir.cp:            done
>link    gvaradir:               done
>compile gvaraget.cp:            done
>link    gvaraget:               done
>compile gvarnavf.cp:            done
>link    gvarnavf:               done
>compile lv1badir.cp:            done
>link    lv1badir:               FAILED (See '/home/mcidas/mcidas2003/src/makel
> og' for details.)
>
>make: *** [lv1badir] Error 1
>----
>
>These are the last lines of the makelog
>
>----
>gcc -c -I/usr/X11R6/include -O -I. -I../netcdf/libsrc -I../hdf/hdf/src -I../hd
> f/mfhdf/libsrc -I../jpeg -
>I../zlib lv1badir.c
>compile lv1badir.cp:            done
>./mccomp -O -s -g77 -o lv1badir lv1badir.o -L. -lsdi -lmcidas
>mccomp: Using default optimizations
>g77 -s -O -o lv1badir lv1badir.o -L. -L/usr/X11R6/lib -lsdi -lmcidas -ldl -lm
>lv1badir.o(.text+0x27c): In function `main':
>: undefined reference to `GetConfigInfo'
>lv1badir.o(.text+0xefc): In function `main':
>: undefined reference to `GetImgCards'
>lv1badir.o(.text+0xffe): In function `main':
>: undefined reference to `UPCSendDir'
>lv1badir.o(.text+0x1035): In function `main':
>: undefined reference to `UPCSendCards'
>lv1badir.o(.text+0x111c): In function `GetImgUnits':
>: undefined reference to `UPCAddCard'
>lv1badir.o(.text+0x116d): In function `GetImgUnits':
>: undefined reference to `UPCAddCard'
>lv1badir.o(.text+0x11b1): In function `GetImgUnits':
>: undefined reference to `UPCAddCard'
>lv1badir.o(.text+0x11e9): In function `GetImgUnits':
>: undefined reference to `UPCAddCard'
>lv1badir.o(.text+0x1221): In function `GetImgUnits':
>: undefined reference to `UPCAddCard'
>./libmcidas.a(lv1butil.o)(.text+0x18f7): In function `SelectLv1bImages':
>: undefined reference to `GetFileList'
>./libmcidas.a(lv1butil.o)(.text+0x19ec): In function `SelectLv1bImages':
>: undefined reference to `PushFileByName'
>./libmcidas.a(lv1butil.o)(.text+0x1ae1): In function `SelectLv1bImages':
>: undefined reference to `PopFile'
>./libmcidas.a(lv1butil.o)(.text+0x1b49): In function `SelectLv1bImages':
>: undefined reference to `PushFileByName'
>./libmcidas.a(lv1butil.o)(.text+0x1bd0): In function `SelectLv1bImages':
>: undefined reference to `PushFileByTime'
>./libmcidas.a(lv1butil.o)(.text+0x1c02): In function `SelectLv1bImages':
>: undefined reference to `PopFile'
>./libmcidas.a(lv1butil.o)(.text+0x1c27): In function `SelectLv1bImages':
>: undefined reference to `PushFileByTime'
>collect2: ld returned 1 exit status
>link    lv1badir:               FAILED
>----

All of these entry points _should_ be in libsdi.a.  Was this library
created before this point?  Were all of the entry points that are
supposed to be included in libsdi.a in fact put there?  The reason I
ask is that your problem looks the same as the one Lyndon State run
into when trying to build on Slackware 9.0.  The Unidata McIDAS inquiry
tracking system can be used to see the exchanges I had with Mark Tucker
of Lyndon about their problem:

http://www.unidata.ucar.edu/glimpsedocs/ghmcidas.html

Use lsc.vsc as the search key.

Here is the jist of what I found when allowed onto Mark's Slackware
9.0 system:

  ...

  The problem was that not all modules that are supposed to be added to
  libsdi.a were actually getting added.  The one that tripped you up was
  servutil.o.  I see no reason in the McIDAS makefile for this to happen,
  so I am stumped.
  
  In order to get things working after logging on, I did the following:
  
  cd mcidas2003/src
  touch BitUtil.o Bk11Data.o crc16.o GVAR.o m0tenoff.o MSAT.o NCDF.o nexrutil.o 
POES.o SDIConv.o SDIUtil.o TIP.o servutil.o
  make libsdi.a
  
  After remaking libsdi.a, the build proceeded normally:
  
  make mcx

  ...


>Now I've noticed that files related to functions like GetConfigInfo are
>compiled. For example GetConfigInfo is in servutil.c and serutil.o is there.
>
> mcidas2003/src> ls servutil*
>servutil.c  servutil.h  servutil.o

Right.  The problem appears to be that all of the modules that are
supposed to be added to libsdi.a are not being added.  I never figured
out why this was the case on Mark's system.

>I have also tried using both versions of f2c (the one on the ucar ftp site
>and the one that comes with suse 9.0) 

I would stick with the gcc/g77 combination.  The problem you are seeing
is not a g77 one, but probably something with 'make'.

>I changed the .cshrc file with the last few lines as such.
>----
>setenv LD_LIBRARY_PATH /usr/local/lib:/lib:/usr/lib
>
>setenv CC gcc
>setenv CPPFLAGS "-DNDEBUG -Df2cFortran"
>setenv CFLAGS -O
>setenv FC /home/mcidas/bin/mcfc
>setenv FFLAGS -O
>setenv CXX
>----
>
>I made sure that the symlink is there for the static lib of libf2c.a in
>/usr/local/lib
>
>mcidas2003/src> ls -l /usr/local/lib/libf2c.a 
>lrwxrwxrwx    1 root     root           17 2004-02-14 16:10 /usr/local/lib/lib
> f2c.a -> /usr/lib/libf2c.a
>
>logged back in. deleted all the directories that were unpacked. unpacked the t
> arball again.
>
>Changed the vendor line in the makefile to -gcc
>
>The error I received 
>
>----
>gcc -O  -I/home/mcidas/mcidas2003/hdf/hdf/src -I./../jpeg -I./../zlib -c tvatt
> r.c 
>gcc -O  -I/home/mcidas/mcidas2003/hdf/hdf/src -I./../jpeg -I./../zlib -c buffe
> r.c 
>gcc -O  -I/home/mcidas/mcidas2003/hdf/hdf/src -I./../jpeg -I./../zlib -o testh
> df rig.o sdstr.o 
>blocks.o an.o anfile.o extelt.o file.o file1.o vers.o sdmms.o sdnmms.o slab.o 
> litend.o tvset.o 
>comp.o bitio.o tree.o macros.o conv.o nbit.o man.o mgr.o testhdf.o tbv.o tvsfp
> ack.o chunks.o 
>tvattr.o buffer.o /home/mcidas/mcidas2003/hdf/hdf/src/libdf.a ./../jpeg/libjpe
> g.a ./../zlib/libz.a -
>lm
>gcc: /home/mcidas/mcidas2003/hdf/hdf/src/libdf.a: No such file or directory
>make[7]: *** [testhdf] Error 1
>make[7]: Leaving directory `/home/mcidas/mcidas2003/hdf/hdf/test'
>make[6]: *** [rall] Error 2
>make[6]: Leaving directory `/home/mcidas/mcidas2003/hdf/hdf/test'
>make[5]: *** [all] Error 2
>make[5]: Leaving directory `/home/mcidas/mcidas2003/hdf/hdf/test'
>make[4]: *** [subd] Error 2
>make[4]: Leaving directory `/home/mcidas/mcidas2003/hdf/hdf'
>make[3]: *** [all] Error 2
>make[3]: Leaving directory `/home/mcidas/mcidas2003/hdf/hdf'
>make[2]: *** [subd] Error 2
>make[2]: Leaving directory `/home/mcidas/mcidas2003/hdf'
>make[1]: *** [all] Error 2
>make[1]: Leaving directory `/home/mcidas/mcidas2003/hdf'
>make: *** [../hdf/hdf/src/libdf.a] Error 2
>----

I strongly recommend sticking with gcc/g77.

>These are the versions of compilers, etc I'm using
>
>/home/mcidas> rpm -qa | grep f2c
>f2c-0.11-905
>
>/home/mcidas> rpm -qa | grep g77
>gcc-g77-3.3.1-29
>
>/home/mcidas> rpm -qa | grep gcc
>gcc-objc-3.3.1-29
>gcc-g77-3.3.1-29
>colorgcc-1.3.2-21
>gcc-c++-3.3.1-29
>libgcc-3.3.1-29
>gcc-3.3.1-29
>gcc-info-3.3.1-29

>As far as why we cannot use rh/fedora linux is because of their recent update 
>policy changes. 

Fedora is being updated vigorously and for free.  RedHat's enterprise
versions now cost.  We are using Fedora here at Unidata with varying
success.  McIDAS, the LDM, GEMPAK, and IDV all run fine under Fedora
Core 1.  What we have had problems with, however, is the automounter,
and the SMP kernel in some particular instances.

>My other option will have to be to keep the new server behind the firewall
>running fedora core 1 with mcidasx and ldm and the another ldm server
>outside the firewall with suse linux (providing ldm compiles on suse :) ).

I think you are very close to having the SuSe build work.  If you can
figure out why all of the modules that are supposed to be put into
libsdi.a are not being put there, we will all benefit.

>Thanks for any help that anyone can provide.

No worries.

Tom
--
+-----------------------------------------------------------------------------+
* Tom Yoksas                                             UCAR Unidata Program *
* (303) 497-8642 (last resort)                                  P.O. Box 3000 *
* address@hidden                                   Boulder, CO 80307 *
* Unidata WWW Service                             http://www.unidata.ucar.edu/*
+-----------------------------------------------------------------------------+


pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy