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

Re: 19981213: netcdf v3.5a problem report (linux,pgi)



------- Forwarded Message

Date:    Mon, 14 Dec 1998 11:18:39 -0700
From:    Russ Rew <address@hidden>
To:      address@hidden (Bill McKie)
Subject: Re: 19981213: netcdf v3.5a problem report (linux,pgi) 

>To: address@hidden
>cc: address@hidden,
>cc: address@hidden,
>cc: address@hidden
>From: address@hidden (Bill McKie)
>Subject: netcdf v3.5a problem report (linux,pgi)
>Organization: Raytheon ITSS at NASA Ames Research Center
>Keywords: 199812140236.TAA07774

Hi Bill,

> I'm seeing a problem building netcdf v3.5a on a Redhat Linux v5.2 PC
> system with the PGI (Portland Group Inc) C, Fortran-77, and C++
> compilers (pgcc, pgf77, pgCC).

We don't have access to the Portland Group compilers, so can't
duplicate the problem here.  Also, the v3.5a is an alpha release, made
available only to test some changes for a Cray platform.  The latest
general supported release is v3.4.

> The problem appears to be the generation of several (long) global
> symbols in the C++ phase of the build, that are referenced in the
> libnetcdf_c++.a library but not defined.
> 
> Details of the problem as requested in the netcdf v3.5a INSTALL
> file follow below.

Each C++ compiler has its own way of name mangling to support
type-safe linking, so this appears to be a pgCC-specific problem.
From the output you sent, I can't determine what the problem is, but
it looks like a compiler/linker bug ...

If this is the only problem, you could try building netCDF without the
C++ interface by specifying an empty string for the CXX environment
variable before running the "configure" script.

You could also just download the binary release of netCDF 3.4 that we
have already built for RedHat Linux at

 ftp://ftp.unidata.ucar.edu/pub/binary/linux_2.0-i586/netcdf-3.4.tar.Z

> Note that I had to change occurrences of "#include <iostream.h>" to
> "#include <iostream>" in files cxx/{nctst.cc,ncvalues.cc,ncvalues.hh}
> and "#include <strstream.h>" to "#include <strstream>" in the file
> cxx/ncvalues.hh because the PGI C++ compiler header files are
> precompiled as shown in the details below.

Some people are still using C++ compilers that require the ".h" in the
header names, so we need to still support these.

> Is it snowy in Boulder yet this year?  It's rainy here in the Bay Area.

Nope, it's pretty warm here.

- --Russ


- -------------- Begin details of netcdf v3.5a build problem ----------------

> date
> Sun Dec 13 18:05:46 PST 1998
> 
> uname -a
> Linux fog.arc.nasa.gov 2.0.36 #1 Tue Dec 1 22:09:33 PST 1998 i686 unknown
> 
> cat /etc/redhat-release
> Red Hat Linux release 5.2 (Apollo)
> 
> setenv CPPFLAGS "-DpgiFortran"
> setenv CC pgcc
> setenv CFLAGS " "
> setenv FC pgf77
> setenv FFLAGS " "
> setenv CXX pgCC
> setenv CXXFLAGS " "
> 
> set path = ( . /usr/pgi/linux86/bin $path )
> 
> echo $PATH
> .:/usr/pgi/linux86/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/openwin/bin:/root/bin:/usr/sbin:/sbin
> 
> which pgcc
> /usr/pgi/linux86/bin/pgcc
> which pgf77
> /usr/pgi/linux86/bin/pgf77
> which pgCC
> /usr/pgi/linux86/bin/pgCC
> 
> pwd
> /ua/sys.misc/netcdf.distrib/netcdf-3.5a/src
> 
> ls -FC
> COMPATIBILITY  aclocal.m4       macros.make.def  nctest/
> INSTALL                configure*       macros.make.in   nf_test/
> MANIFEST       configure.in     man/             prob.report.out
> Makefile       cxx/             nc_test/         rules.make
> README                 fortran/         ncdump/
> VERSION                libsrc/          ncgen/
> 
> cat VERSION
> 3.5a
> 
> cd cxx
> 
> ls -FC
> Makefile     cxxdoc.tex   example.cc   ncvalues.cc  netcdf.hh
> README             depend       expected     ncvalues.hh  texinfo.tex
> cxxdoc.ps    example.c          nctst.cc     netcdf.cc
> 
> grep -n include * | egrep '(iostream)|(strstream)'
> nctst.cc:1:#include <iostream>
> ncvalues.cc:10:#include <iostream>            // for debugging
> ncvalues.hh:13:#include <iostream>
> ncvalues.hh:17:#   include <strstream>
> 
> ls -FC /usr/pgi/linux86/include/CC
> algorithm        ios                new                stdcomp_sv86.h
> algorithm.cc     ios.cc             numeric            stdexcept
> bitset                   iosfwd             ostream            streambuf
> bitset.cc        iostream           ostream.cc         streambuf.cc
> complex                  istream            queue              string
> complex.cc       istream.cc         rw/                string.cc
> compnent.h       iterator           rw_math.h          strstream
> deque            iterator.cc        set                typeinfo
> deque.cc         limits             sstream            utility
> edg/             list               sstream.cc         valarray
> exception        list.cc            stack              valarray.cc
> fstream                  locale             stdcomp.h          vector
> fstream.cc       locale.cc          stdcomp_linux86.h  vector.cc
> functional       map                stdcomp_osf86.h
> iomanip                  memory             stdcomp_sol86.h
> 
> cd ..
> 
> ls -FC
> COMPATIBILITY  aclocal.m4       macros.make.def  nctest/
> INSTALL                configure*       macros.make.in   nf_test/
> MANIFEST       configure.in     man/             prob.report.out
> Makefile       cxx/             nc_test/         rules.make
> README                 fortran/         ncdump/
> VERSION                libsrc/          ncgen/
> 
> make distclean
> Makefile:4: macros.make: No such file or directory
> Makefile:217: warning: overriding commands for target `/netcdf-.tar.Z'
> Makefile:203: warning: ignoring old commands for target `/netcdf-.tar.Z'
> rules.make:120: warning: overriding commands for target `/'
> rules.make:118: warning: ignoring old commands for target `/'
> rules.make:122: warning: overriding commands for target `/'
> rules.make:120: warning: ignoring old commands for target `/'
> rules.make:125: warning: overriding commands for target `/'
> rules.make:122: warning: ignoring old commands for target `/'
> rules.make:128: warning: overriding commands for target `/'
> rules.make:125: warning: ignoring old commands for target `/'
> rules.make:142: warning: overriding commands for target `/man1'
> rules.make:139: warning: ignoring old commands for target `/man1'
> rules.make:144: warning: overriding commands for target `/man3'
> rules.make:139: warning: ignoring old commands for target `/man3'
> rules.make:147: warning: overriding commands for target `/man3f'
> rules.make:139: warning: ignoring old commands for target `/man3f'
> rules.make:152: warning: overriding commands for target `/'
> rules.make:128: warning: ignoring old commands for target `/'
> make: *** No rule to make target `macros.make'.  Stop.
> 
> rm -f config.cache
> 
> ./configure --prefix=/ua/sys.misc/netcdf_3.5a_pgi > & configure.log
> 
> make > & make.log
> 
> echo "Item A"
> Item A
> uname -a
> Linux fog.arc.nasa.gov 2.0.36 #1 Tue Dec 1 22:09:33 PST 1998 i686 unknown
> 
> echo "Item B"
> Item B
> cat VERSION
> 3.5a
> 
> echo "Item C"
> Item C
> which pgcc
> /usr/pgi/linux86/bin/pgcc
> which pgf77
> /usr/pgi/linux86/bin/pgf77
> which pgCC
> /usr/pgi/linux86/bin/pgCC
> 
> echo "Item D"
> Item D
> cat configure.log
> creating cache ./config.cache
> checking for m4... m4
> checking user-defined C compiler "pgcc"
> checking C compiler... works
> checking how to make dependencies... false
> checking for pgCC... pgCC
> checking C++ compiler "pgCC"... works
> checking how to run the C preprocessor... pgcc -E
> checking user-defined Fortran compiler "pgf77"... works
> checking for Fortran .F compiler... 
> checking if Fortran compiler handles *.F files... Linking:
> yes
> checking for C-equivalent to Fortran routine "SUB"... sub_
> checking for Fortran "byte"... yes
> checking for Fortran "integer*2"... yes
> checking if Fortran "byte" is C "signed char"... Linking:
> yes
> checking if Fortran "byte" is C "short"... Linking:
> no
> checking if Fortran "byte" is C "int"... Linking:
> no
> checking if Fortran "byte" is C "long"... Linking:
> no
> checking if Fortran "integer*2" is C "short"... Linking:
> yes
> checking if Fortran "integer*2" is C "int"... Linking:
> no
> checking if Fortran "integer*2" is C "long"... Linking:
> no
> checking if Fortran "integer" is C "int"... Linking:
> yes
> checking if Fortran "real" is C "float"... Linking:
> yes
> checking if Fortran "doubleprecision" is C "double"... Linking:
> yes
> checking for Fortran-equivalent to netCDF "byte"... byte
> checking for Fortran-equivalent to netCDF "short"... integer*2
> checking for math library
> checking for -lc... yes
> checking for ar... ar
> checking for ranlib... ranlib
> checking for stdlib.h... yes
> checking for sys/types.h... yes
> checking for strerror... yes
> checking whether cross-compiling... no
> checking for working ftruncate()... yes
> checking for working alloca.h... yes
> checking for alloca... yes
> checking for st_blksize in struct stat... yes
> checking for IEEE floating point format... yes
> checking for ANSI C header files... yes
> checking for size_t... yes
> checking for off_t... yes
> checking for ssize_t... yes
> checking for ptrdiff_t... yes
> checking for uchar... no
> checking whether char is unsigned... no
> checking whether byte ordering is bigendian... no
> checking size of short... 2
> checking size of int... 4
> checking size of long... 4
> checking size of float... 4
> checking size of double... 8
> checking size of off_t... 4
> checking size of size_t... 4
> checking for manual-page index command... 
> checking binary distribution directory... /home/ftp/pub/binary/dummy_system
> updating cache ./config.cache
> creating ./config.status
> creating macros.make
> udcreating fortran/nfconfig.inc
> creating libsrc/ncconfig.h
> 
 ...
> 
> Making `all' in directory /ua/sys.misc/netcdf.distrib/netcdf-3.5a/src/cxx
> 
> make[2]: Entering directory `/ua/sys.misc/netcdf.distrib/netcdf-3.5a/src/cxx'
> pgCC -c  -I../libsrc  -DpgiFortran netcdf.cc
> netcdf.cc:
> "ncvalues.hh", line 40: warning: integer conversion resulted in a change of
>           sign
>   static const ncbyte ncBad_byte = NC_FILL_BYTE;
>                                    ^
> 
> pgCC -c  -I../libsrc  -DpgiFortran ncvalues.cc
> ncvalues.cc:
> "ncvalues.hh", line 40: warning: integer conversion resulted in a change of
>           sign
>   static const ncbyte ncBad_byte = NC_FILL_BYTE;
>                                    ^
> 
> ar cru         libnetcdf_c++.a netcdf.o ncvalues.o
> ranlib libnetcdf_c++.a
> pgCC -c  -I../libsrc  -DpgiFortran nctst.cc
> nctst.cc:
> "ncvalues.hh", line 40: warning: integer conversion resulted in a change of
>           sign
>   static const ncbyte ncBad_byte = NC_FILL_BYTE;
>                                    ^
> 
> pgCC -o nctst -I../libsrc  -DpgiFortran   nctst.o libnetcdf_c++.a -L../libsrc 
> -lnetcdf 
> C++ prelinker: executing: pgCC -I../libsrc -DpgiFortran -c nctst.cc
> nctst.cc:
> "ncvalues.hh", line 40: warning: integer conversion resulted in a change of
>           sign
>   static const ncbyte ncBad_byte = NC_FILL_BYTE;
>                                    ^
> 
> C++ prelinker: executing: pgCC -I../libsrc -DpgiFortran -c nctst.cc
> nctst.cc:
> "ncvalues.hh", line 40: warning: integer conversion resulted in a change of
>           sign
>   static const ncbyte ncBad_byte = NC_FILL_BYTE;
>                                    ^
> 
> libnetcdf_c++.a(ncvalues.o): In function `NcValues_ncbyte::print( 
> const(std::basic_ostream__tm__31_cQ2_3std20char_traits__tm__2_c &))':
> ncvalues.o(.text+0x994): undefined reference to 
> `__ls__tm__30_Q2_3std20char_traits__tm__2_c__3stdFRQ2_3std25basic_ostream__tm__5_cZ1ZUc_RQ2_3std25basic_ostream__tm__5_cZ1Z'
> ncvalues.o(.text+0x9cb): undefined reference to 
> `__ls__tm__30_Q2_3std20char_traits__tm__2_c__3stdFRQ2_3std25basic_ostream__tm__5_cZ1ZUc_RQ2_3std25basic_ostream__tm__5_cZ1Z'
> libnetcdf_c++.a(ncvalues.o): In function `NcValues_char::print( 
> const(std::basic_ostream__tm__31_cQ2_3std20char_traits__tm__2_c &))':
> ncvalues.o(.text+0x10ee): undefined reference to 
> `__ls__tm__30_Q2_3std20char_traits__tm__2_c__3stdFRQ2_3std25basic_ostream__tm__5_cZ1Zc_RQ2_3std25basic_ostream__tm__5_cZ1Z'
> ncvalues.o(.text+0x112a): undefined reference to 
> `__ls__tm__30_Q2_3std20char_traits__tm__2_c__3stdFRQ2_3std25basic_ostream__tm__5_cZ1Zc_RQ2_3std25basic_ostream__tm__5_cZ1Z'
> ncvalues.o(.text+0x1144): undefined reference to 
> `__ls__tm__30_Q2_3std20char_traits__tm__2_c__3stdFRQ2_3std25basic_ostream__tm__5_cZ1Zc_RQ2_3std25basic_ostream__tm__5_cZ1Z'
> Linking:
> make[2]: *** [nctst] Error 1
> make[2]: Leaving directory `/ua/sys.misc/netcdf.distrib/netcdf-3.5a/src/cxx'
> make[1]: *** [subdir_target] Error 1
> make[1]: Leaving directory `/ua/sys.misc/netcdf.distrib/netcdf-3.5a/src'
> make: *** [cxx/all] Error 2

------- End of Forwarded Message