how to force compiler flags during make

From: Erika Harnett (eharnett AT unknown)
Date: Mon Jan 14 2002 - 10:58:56 MST

  • Next message: bstavert@pop.jpl.nasa.gov: "Question about Plotting multiple ellipses"

    I've been struggling with getting the ncarg4.2.3 to compile with the Intel
    Fortran compiler (=ifc).

    I've run into some syntax errors that I've been trying to fix.

    The first one I found/fixed was in
    /ncarg-4.2.3/ncarg2d/src/libncarg/ngmisc/ngdots.f

    I got the following error:
    #################################################################
    make[5]: Entering directory
    `/usr/local/ncargraphics/ncarg-4.2.3/ncarg2d/src/libncarg/ngmisc'
    ifc -O -c -o ngdots.o ngdots.f
       external subroutine NGDOTS

          SAVE IFIRST
          ^
    Error 134 at (52:ngdots.f) : The attribute SAVE already applies to all
    variables
    1 Error
    compilation aborted for ngdots.f (code 1)
    make[5]: *** [ngdots.o] Error 1
    make[5]: Leaving directory
    `/usr/local/ncargraphics/ncarg-4.2.3/ncarg2d/src/libncarg/ngmisc'
    ##################################################################

    I used the error report to infer that I should just comment out line 52
    that says:
          SAVE IFIRST

    That allowed a lot of portions to compile that weren't previously
    compiling.

    I'm having some problems with my next fix though. I'm trying to fix
    several errors that read like:
    ###################################################################
    ifc -O -o pre2ncgm.prog alover.o clipit.o frm.o garg.o intcnv.o
    lodctb.o
    mmdef.o multi.o patdrw.o patset.o pltclp.o pltit.o pnt.o posit.o
    pwt.o setop.o setrng.o trndt2.o trnmch.o twobyt.o xmdef.o xmopdf.o
    fndarg.o metred.o mninst.o trans.o trassn.o trlate.o trndat.o
    ../../../.././ncarg2d/src/libncarg_gks/awi/ggkwdr_stub.o
    -L../../../.././ncarg2d/src/libncarg -lncarg
    -L../../../.././ncarg2d/src/libncarg_gks -lncarg_gks
    -L../../../.././common/src/libncarg_c -lncarg_c -L/usr/local/ncarg/lib
    -L/usr/X11R6/lib -L/usr/local/lib -L/usr/lib
    ../../../.././common/src/libncarg_c/libncarg_c.a(argget.o): In function
    `argget_':
    argget.o(.text+0x56): undefined reference to `getarg_'
    ../../../.././common/src/libncarg_c/libncarg_c.a(iargct.o): In function
    `iargct_':
    iargct.o(.text+0x2): undefined reference to `iargc_'
    make[5]: *** [pre2ncgm.prog] Error 1
    make[5]: Leaving directory
    `/usr/local/ncargraphics/ncarg-4.2.3/ncarg2d/src/bin/pre2ncgm'
    #################################################################

    Appearently the getarc and iargc subroutines are in add-on libraries in
    Intel fortran. And this is were I am running into trouble. I need to
    force the option "ifc -Vaxlib". I'm not getting the instructions in the
    INSTALL file to work for me.

    I can run ./Congifure -v

    and the output from make Info is:
    ----------------------------------------------------------
    f77 Compiler ifc
    f77 Flags -O
    C Compiler gcc
    cc Flags -ansi -O -I./include -I/usr/X11R6/include
    -I/usr/include -DSYSV -D_POSIX_SOURCE -D_XOPEN_SOURCE -DByteSwapped
    -DNeedFuncProto
    -------------------------------------------------------------

    so I need to modify the f77 Flags. When I modify the
    ncarg-4.2.3/config/LINUX file to have the line

    #define FcOptions -Vaxlib
     
    and then do make Info I get the same results as above.

    When I modify ncarg-4.2.3/config/Makefile as well to read

     FCOPTIONS = -Vaxlib

    I still get the same results from make Info. I can't seem to force the
    new flags to be recognized, or that is what "make Info" is telling me.

    Do I need to do something special to the files for the changes to be
    recognize? I'm running on a RedHat 7.1 machine.

    Thanks
    Erika



    This archive was generated by hypermail 2b29 : Tue Jan 15 2002 - 08:19:48 MST