[ncl-install] multiple definition abgcdp, adgcdp, dpgcdp

Slatest, Leonard A slatest at bnl.gov
Sun Feb 3 16:53:50 MST 2008


Hi all. I am installing ncl_ncarg-5.0.0 on the front end node (fen) of
our IBM Blue Gene/L (SUSE Linux with powerpc chip). I get these messages
during the build

(when it's trying to build the executable named "ncl"):

 

: multiple definition of `abgcdp'

: multiple definition of `adgcdp'

: multiple definition of `dpgcdp'

 

 Here is the excerpt from a transcript of my build:

 

*****************************************************************

xlc -qstrict -qfullpath -qmaxmem=-1 -D_FILE_OFFSET_BITS=64
-D_LARGEFILE_SOURCE -O3     -o ncl Ncl.o io.o NclHLUObj.o scanner.o
parser.o MathFunc  s.o NclTypedouble.o NclTypefloat.o
NclTypeint.o NclTypelogical.o                   NclTypelong.o
NclTypeobj.o             N  clTypeshort.o NclTypestring.o
NclTypebyte.o NclTypechar.o TypeSupport.o
NclMultiDValData.o AddFileFormat  s.o AttSupport.o DataSupport.o
FileSupport.o Formats.o GetGrids.o                      InitData.o
Memory.o NclAtt.o NclCCM.o  N  clCoordVar.o NclData.o NclFile.o
NclFileVar.o                   NclGRIB.o NclHDF.o
NclMultiDValnclfileData.o                    NclNetCdf.o NclO
neDValCoordData.o NclType.o                     NclTypelist.o NclVar.o
VarSupport.o                     ctoiee.o date.o qu2reg3.o rowina3.o
scm0  .o ncepcode.o  NclGRIB2.o AddBuiltIns.o AddHLUObjs.o
AddIntrinsics.o Execute.o                       Machine.o OpsFuncs.o Pri
nttoken.o SrcTree.o                     Symbol.o Translate.o
NclHLUVar.o HLUSupport.o                        NclMultiDValHLUO
bjData.o                        BuiltInSupport.o BuiltInFuncs.o
HLUFunctions.o yywrap.o craybin.o                      c  omplete.o
editline.o sysunix.o ListSupport.o                    NclList.o
NclMultiDVallistData.o fortranio.o  -L../../.././ni/src/lib/nfp -lnfp
-L../../.././ni/src/lib/nfpfort -lnfpfort -L../../.././ni/src/lib/hlu
-lhlu -L../../.././ncarg2d/src/libncarg -lncarg
-L../../.././ncarg2d/src/l  ibncarg_gks -lncarg_gks
-L../../.././common/src/libncarg_c -lncarg_c -L../../.././ngmath/src/lib
-lngmath -L/gpfs/scratch2/slatest/mytest/ncl_nc  arg-5.0.0/lib
-L/usr/X11R6/lib -L/gpfs/scratch2/slatest/mytest/libpng-1.2.24/lib
-L/opt/ibmcmp/xlmass/bg/4.3/lib -L/bgl/local/lib
-L/gpfs/scratch2/slatest/mytest/g2clib-1.0.5
-L/gpfs/scratch2/slatest/mytest/udunit-fen-final/udunits-1.12.4/lib
-L/gpfs/scratch2/slatest/mytest/netcdf-final/  netcdf-3.6.2/lib
-L/gpfs/scratch2/slatest/mytest/jasper-1.900.1/lib
-L/gpfs/scratch2/slatest/mytest/hdf4-o3qstrict/HDF4.2r1/mfhdf/libsrc
-L/gpfs  /scratch2/slatest/mytest/hdf4-o3qstrict/HDF4.2r1/mfhdf/libsrc
-L/gpfs/scratch2/slatest/mytest/hdf4-o3qstrict/HDF4.2r1/hdf/src -lnetcdf
-lmfhdf   -ldf -ljpeg -lz -ludunits  -lgrib2c -lpng -ljasper
-L../../.././external/sphere3.1_dp -lsphere3.1_dp
-L../../.././external/fftpack5_dp -lfftpac  k5_dp
-L../../.././external/lapack -llapack_ncl -lblas.rts
-L../../.././external/blas -lblas_ncl -lX11 -lXext
-L/opt/ibmcmp/xlf/bg/10.1/lib -lxl  fmath -lxlf90 -lm -lm  -ldl

../../.././ni/src/lib/hlu/libhlu.a(SphericalGeometry.o)(.text+0x0): In
function `abgcdp':

: multiple definition of `abgcdp'

../../.././ni/src/lib/nfpfort/libnfpfort.a(sg_tools.o)(.text+0x1b80):
first defined here

/usr/bin/ld: Warning: size of symbol `abgcdp' changed from 284 in
../../.././ni/src/lib/hlu/libhlu.a(SphericalGeometry.o) to 260 in
../../.././n  i/src/lib/hlu/libhlu.a(SphericalGeometry.o)

../../.././ni/src/lib/hlu/libhlu.a(SphericalGeometry.o)(.text+0x440): In
function `adgcdp':

: multiple definition of `adgcdp'

../../.././ni/src/lib/nfpfort/libnfpfort.a(sg_tools.o)(.text+0xfa0):
first defined here

/usr/bin/ld: Warning: size of symbol `adgcdp' changed from 136 in
../../.././ni/src/lib/hlu/libhlu.a(SphericalGeometry.o) to 132 in
../../.././n  i/src/lib/hlu/libhlu.a(SphericalGeometry.o)

../../.././ni/src/lib/hlu/libhlu.a(SphericalGeometry.o)(.text+0x4e0): In
function `dpgcdp':

: multiple definition of `dpgcdp'

../../.././ni/src/lib/nfpfort/libnfpfort.a(sg_tools.o)(.text+0xea0):
first defined here

/usr/bin/ld: Warning: size of symbol `dpgcdp' changed from 240 in
../../.././ni/src/lib/hlu/libhlu.a(SphericalGeometry.o) to 224 in
../../.././n  i/src/lib/hlu/libhlu.a(SphericalGeometry.o)

/gpfs/scratch2/slatest/mytest/jasper-1.900.1/lib/libjasper.a(jas_stream.
o)(.text+0xc50): In function `jas_stream_tmpfile':

: warning: the use of `tmpnam' is dangerous, better use `mkstemp'

make: *** [ncl] Error 1

 

************************************************************************
************************************************************************
********************************************************

 

The e.g. abgcdp multiple definition evidently arises because of the
following in libnfpfort.a  (specifically the sg_tools.f contribution to
that library ):

 

DOUBLE PRECISION FUNCTION ABGCDP (AQDP,BQDP,CQDP)

 

 in addition to the following in libhlu.a (the SphericalGeometry.c
contribution):

 

double abgcdp(double*,double*,double*);

 

 

That is to say, the functions have the same names in the two libraries.
But I expected the following to deal with that, which is in the NCL 

"INSTALL.txt" file:

 

*********************************************************************

If, however, your compiler does not append an underscore (the IBM
xlf/xlf90 compilers are

two such examples), then you need to set this macro as follows:

 

    NgCallF  reg

********************************************************************

 

Regarding that, I had confirmed earlier that the $NCARG/config file that
the build will use is "LINUX":

 

SYSTEM_INCLUDE          = "LINUX"

 

and NgCallF is in fact set correctly in that file:

 

*******************************************

cd $NCARG/config

grep Ng LINUX

#define NgCallF       reg

******************************************

 

So I'm puzzled by the multiple definition error, I would have thought
"NgCallF   reg"  would have attended to the issue. Can you help? 

I've googled this but can't find anyone who has obtained these
particular multiple definition errors.

 

Note: I'm building everything to run on the fen, not the compute nodes,
i.e. I'm using native compilers, not cross compilers. I'm doing a 32-bit
architecture build.

Also, I'm using the IBM compilers, e.g. xlf and xlc. And finally, the
'tmpnam' warning in the excerpt above is a warning and I doubt it is the
cause of the exit of the build.

 

 

My complete LINUX file is as follows:

 

/*

 *      $Id: LINUX.ppc64.xl,v 1.1 2007/10/06 02:05:31 haley Exp $

 */

/***********************************************************************
*

*
*

*                Copyright (C)  2005
*

*        University Corporation for Atmospheric Research
*

*                All Rights Reserved
*

*
*

************************************************************************
/

/*

 *  File:       LINUX.ppc32

 *

 *  Author:     Richard Grubin

 *          National Center for Atmospheric Research

 *          PO 3000, Boulder, Colorado

 *

 *  Date:       Sun May  1 16:56:33 MDT 2005

 *

 *  Description:    This file contains all the directives needed to

 *          tell ymake how to build NCAR Graphics on a PPC 32-bit LINUX

 *          system using the xlf/xlc compilers

 */

#define HdfDefines    -D_IBMR2

#define StdDefines    -DSYSV -D_POSIX_SOURCE -D_XOPEN_SOURCE

#define CCompiler     xlc

#define FCompiler     xlf

#define CcOptions     -qstrict -qfullpath -qmaxmem=-1

#define FcOptions     -qstrict -qfullpath

#define LdCommand     ld -melf32ppc

#define LdRelCommand  ld -melf32ppc

#define ArCommand     ar

#define COptimizeFlag -O3

#define FOptimizeFlag -O3

#define Cstatic       -bnso

#define Cdynamic      -bso

#define CtoFLibraries -L/opt/ibmcmp/xlf/bg/10.1/lib -lxlfmath -lxlf90
-lm

#define NgCallF       reg

#define CppCommand '/usr/bin/cpp -traditional'

#define XToolLibrary -lXt -lSM -lICE

#define BuildShared NO

#define XLibrary -lX11 -lXext

 

#define ArchRecLibSearch -L/usr/X11R6/lib

#define ArchRecIncSearch -I/usr/X11R6/include

 

 

/*************** Redefine Macros from Rules
********************************/

 

/*

 * Macro: MakeDir

 *

 * Description: This rule creates a directory - if a parent dir doesn't
exist

 *  it attempts to create it.

 */

#ifndef MakeDir

#define MakeDir(dir) @if (test ! -d dir); then ($(MKDIRHIER) dir); fi

#endif

 

 

Thanks,

Len (slatest at bnl.gov)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-install/attachments/20080203/1194a0ce/attachment-0001.html


More information about the ncl-install mailing list