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

Re: 19990105: building on Linux 5.1 using pgcc



Robert,

>Date: Tue, 05 Jan 1999 08:58:04 -0500
>From: Robert Boucher <address@hidden>
>Organization: Litton-TASC
>To: Steve Emmerson <address@hidden>
>Subject: Re: 19990104: Udunits: building on Linux 5.1 using pgcc
>Keywords: 199901042014.NAA18025

In the above message, you wrote:

> I ran the configure script this morning and it worked fine.  I don' know
> what the problem was yesterday afternoon.  When I ran the "make" command
> though I got two errors.  I have copied below the contents of
> "configure.log" and "make.log".
> 
> Configure.log
> 
> loading cache ./config.cache
> checking for m4... (cached) m4
> checking user-defined C compiler "pgcc"
> checking C compiler... works
> checking how to make dependencies... false
> checking for CC... (cached) c++
> checking C++ compiler "c++"... works
> checking how to run the C preprocessor... (cached) pgcc -E
> checking for f77... (cached) f77
> checking for Fortran .F compiler...
> checking if Fortran compiler handles *.F files... 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"... yes
> checking if Fortran "byte" is C "short"... no
> checking if Fortran "byte" is C "int"... no
> checking if Fortran "byte" is C "long"... no
> checking if Fortran "integer*2" is C "short"... yes
> checking if Fortran "integer*2" is C "int"... no
> checking if Fortran "integer*2" is C "long"... no
> checking if Fortran "integer" is C "int"... yes
> checking if Fortran "real" is C "float"... yes
> checking if Fortran "doubleprecision" is C "double"... 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... (cached) yes
> checking for ar... (cached) ar
> checking for ranlib... (cached) ranlib
> checking for stdlib.h... (cached) yes
> checking for sys/types.h... (cached) yes
> checking for strerror... (cached) yes
> checking whether cross-compiling... (cached) no
> checking for working ftruncate()... yes
> checking for working alloca.h... (cached) yes
> checking for alloca... (cached) yes
> checking for st_blksize in struct stat... (cached) yes
> checking for IEEE floating point format... yes
> checking for ANSI C header files... (cached) yes
> checking for size_t... (cached) yes
> checking for off_t... (cached) yes
> checking for ssize_t... (cached) yes
> checking for ptrdiff_t... (cached) yes
> checking for uchar... (cached) no
> checking whether char is unsigned... (cached) no
> checking whether byte ordering is bigendian... (cached) no
> checking size of short... (cached) 2
> checking size of int... (cached) 4
> checking size of long... (cached) 4
> checking size of float... (cached) 4
> checking size of double... (cached) 8
> checking size of off_t... (cached) 4
> checking size of size_t... (cached) 4
> checking for manual-page index command...
> checking binary distribution directory...
> /home/ftp/pub/binary/dummy_system
> creating ./config.status
> creating macros.make
> udcreating fortran/nfconfig.inc
> fortran/nfconfig.inc is unchanged
> creating libsrc/ncconfig.h
> libsrc/ncconfig.h is unchanged

The above looks OK -- although it indicates that the configure script
used the cached results of a previous execution.  The way to get the
configure script to start with a clean slate is to remove the file
"config.cache" before executing the configure script.

The above indicates that the configure script was able to locate the
pseudo-function "alloca()".

> Make.log
> 
> make[1]: Entering directory `/data1/netcdf-3.4/src'
...
> Making `all' in directory /data1/netcdf-3.4/src/cxx
> 
> make[2]: Entering directory `/data1/netcdf-3.4/src/cxx'
> c++ -c -O  -I../libsrc  -Df2cFortran netcdf.cc
> c++ -c -O  -I../libsrc  -Df2cFortran ncvalues.cc
> ar cru  libnetcdf_c++.a netcdf.o ncvalues.o
> ranlib libnetcdf_c++.a
> c++ -c -O  -I../libsrc  -Df2cFortran nctst.cc
> c++ -o nctst -I../libsrc  -Df2cFortran -O   nctst.o libnetcdf_c++.a
> -L../libsrc -lnetcdf
> ../libsrc/libnetcdf.a(putget.o): In function `nc_put_vara_text':
> putget.o(.text+0x93e9): undefined reference to `alloca'
> putget.o(.text+0x93fd): undefined reference to `alloca'
> ../libsrc/libnetcdf.a(putget.o): In function `nc_put_vara_uchar':
> putget.o(.text+0x9749): undefined reference to `alloca'
> putget.o(.text+0x975d): undefined reference to `alloca'
> ../libsrc/libnetcdf.a(putget.o): In function `nc_put_vara_schar':
> putget.o(.text+0x9aa9): undefined reference to `alloca'
> ../libsrc/libnetcdf.a(putget.o)(.text+0x9abd): more undefined references
> to `alloca' follow
> collect2: ld returned 1 exit status
> make[2]: *** [nctst] Error 1
> make[2]: Leaving directory `/data1/netcdf-3.4/src/cxx'
> make[1]: *** [subdir_target] Error 1
> make[1]: Leaving directory `/data1/netcdf-3.4/src'
> make: *** [cxx/all] Error 2

The above indicates that the C++ compiler (c++) was unable to locate the
pseudo-function "alloca()".  This is very odd as your C compiler was
able to locate it.

I note that you're using pgcc as the C compiler rather than cc or
gcc.  Is there some reason for this?  Perhaps the pgcc compiler is
incompatible with c++ (at least in terms of alloca()).

If you don't need the netCDF C++ interface, then you can skip it by
doing the following:

    1.  Go to the top-level source directory.

    2.  Execute the command "make distclean".

    3.  Set your environment variables as before.

    4.  Set the environment variable CXX to the empty string, e.g.

            setenv CXX ''

        or

            export CXX=''

    5.  Execute the configure script.  Redirect standard output and
        standard error to the file "configure.log".  If an error message
        occurs in the output, then stop and send me the file.

    6.  Execute the command "make".  Redirect standard output and
        standard error to the file "make.log".  If an error occurs, then
        stop and send me the files "make.log" and "configure.log".

    7.  Execute the command "make test".  Redirect standard output and
        standard error to the file "test.log".  If an error occurs, then
        stop and send me the files "test.log" and "configure.log".

    8.  Execute the command "make install".  Redirect standard output
        and standard error to the file "install.log".  If an error
        occurs, then stop and send me the files "install.log" and
        "configure.log".

--------
Steve Emmerson   <http://www.unidata.ucar.edu>