Re: building ncarg with Intel compilers on Debian Linux box

From: michael bane (michael.bane AT manchester.ac.uk)
Date: Tue Mar 01 2005 - 08:37:20 MST

  • Next message: Hjelmfelt, Mark: "Compiling--crtbegin.o error"

    On Tue, 2005-03-01 at 08:15 -0700, Rick Grubin wrote:
    > Hello Michael,
    >
    > Let me preface this reply by saying that I don't have access to a Debian
    > Linux host with the Intel 8.x compilers; however, I've worked with another
    > user with a similar configuration, and think his fixes will apply.
    >
    > > I've been trying to build the NCAR graphics (4.4.1) on my Debian Linux
    > > box using the Intel 8.x compilers. I've got so far but seem to have hit
    > > a problem already mentioned in the archives but I cannot find a solution
    > > mentioned. In brief, with the config/LINUX as below I get the following
    > > error during compilation:
    > >
    > > icc -mp -ansi -O -o ictrans main.o ../../../.././ncarview/src/lib/libictrans/libictrans.o
    > > ../../../.././ncarview/src/lib/libctrans/libctrans.o \
    > > -L../../../.././ncarview/src/lib/libcgm -lcgm \
    > > -L../../../.././ncarview/src/lib/libncarg_ras -lncarg_ras \
    > > -L../../../.././common/src/libncarg_c \
    > > -lncarg_c -L/usr/local/ncarg/lib -L/usr/X11R6/lib -lXpm -lX11 -lXext -lm
    >
    > > ../../../.././ncarview/src/lib/libictrans/libictrans.o(.text+0x61a2): In function `giargs_':
    > > : undefined reference to `for_cpystr'
    > > ../../../.././ncarview/src/lib/libictrans/libictrans.o(.text+0x61ca): In function `giargs_':
    > > : undefined reference to `for_cpystr'
    > > make[5]: *** [ictrans] Error 1
    > >
    > > There seems to be no direct mention of for_cpystr in the giargs()
    > > subroutine so I guess it's something required in fortran-to-C...
    >
    > Indeed, you need to include one or more libraries that allow interaction
    > between C-compiled and Fortran-compiled codes. Here's what has worked for
    > another user:
    >
    > In the $NCARG/config/LINUX file:
    > #define CCompiler icc
    > #define FCompiler ifort
    > #define CtoFLibraries "-L/usr/local/intel_fc_80/lib" -lcxa -lifcore -lcprts -lm
    > #define CcOptions -ansi -w
    > #define FcOptions -cm -w
    >
    > Note that you'll almost certainly need to adjust the path to the Intel
    > compiler libraries. I've also had reports that the libraries
    >
    > -lcxa -lcprts
    >
    > aren't strictly necessary, but don't hurt to link in, either.

    Rick - for Intel compilers 8.1 (Build 20041019Z) one only needs
    -lifcore (as you suggested) and it does indeed then build. (I'll come
    back to you re any runtime mods needed as per below.)

    Thanks for the prompt reply (I've been spending hours on this, comparing
    outputs from IRIX compilation etc but once got the my ncarg-talk subs
    approved you replied with the solution!). May I dare suggest the online
    documentation is updated?

    One thing I did notice between outputs was that my Linux build usually
    (and very frequently) complains about implicit declarions, eg

    gsbytes.c(55): warning #880: omission of explicit type is nonstandard
    ("int" assumed)
      NGCALLF(gbytes,GBYTES)(p, u, q, b, s, n)

    whereas the Irix build doesn't (or maybe the compiler warnings are
    off)... any thoughts on this?

    Thanks once again, Michael

    >
    > Here are some other suggestions that the user offers:
    >
    > I have Fortran version 8.0.034 and did a standard installation
    > in /usr/local/intel_fc_80/
    >
    > The one change I made was in bin/ifort.cfg where I added the
    > line
    >
    > -Xlinker -rpath -Xlinker /usr/local/intel_fc_80/lib
    >
    > because there were indications that dynamic libs weren't always
    > being found at run-time.
    >
    > I also installed C++ version 8.0.055 and again, installing in
    > /usr/local/intel_cc_80/
    >
    > Again, I added a line to bin/icc.cfg
    >
    > -Xlinker -rpath -Xlinker /usr/local/intel_cc_80/lib
    >
    > -Rick.
    > --
    > Rick Grubin NCAR/CISL/SCD
    > Visualization + Enabling Technologies
    > grubin AT unknown 303.497.1832

    -- 
    Michael Bane
    Atmospheric Physics Group
    University of Manchester
    

    _______________________________________________ ncarg-talk mailing list ncarg-talk AT unknown http://mailman.ucar.edu/mailman/listinfo/ncarg-talk



    This archive was generated by hypermail 2b29 : Wed Mar 02 2005 - 09:37:09 MST