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

971111: SunOS 4.1.3 installation: Undefined: _main ___ansi_fflush



Wayne,

> To: address@hidden
> From: Wayne Parker <address@hidden>
> Subject: NECDF Problems
> Organization: .
> Keywords: 199711072235.PAA15627

In the above message, you wrote:

> I am trying to install NETCDF, but am running into many problems.  I have
> included all of information asked for by the Installation guide.  Any help
> would be appreciated.
>                               Thanks,
>                                  Wayne Parker
> 
> 
> SunOS wind 4.1.3_U1 3 sun4
> 
> 3.3.1
> 
> Content-Disposition: attachment; filename="configstep3"
> 
> loading cache ./config.cache
> checking for m4... m4
> checking for xlc... no
> checking for c89... no
> checking for acc... acc
> checking C compiler... works
> checking how to make dependencies... cc -M
> checking for CC... no
> checking for cxx... no
> checking for c++... c++
> checking C++ compiler "c++"... works
> checking how to run the C preprocessor... acc -E
> checking for f77... f77
> checking for FORTRAN .F compiler... 
> checking if FORTRAN compiler handles *.F files... no
> checking for FORTRAN preprocessor... acc -E
> 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"... configure: error: Could not 
> compile-and-link conftestf.f and conftest.o

The above error message indicates a severe problem that must be fixed
before continuing.

> Content-Disposition: attachment; filename="pathstep4"
> 
> cpp /usr/lang/cpp
> f77 /usr/lang/f77
> gcc /usr/local/bin/gcc
> 
> Content-Disposition: attachment; filename="config.logstep5"
> 
> This file contains any messages produced by compilers while
> running configure, to aid debugging if configure makes a mistake.
> 
> configure:1017: acc -c -O -DNDEBUG conftest.c 1>&5
> configure:1150: c++ -c  -DNDEBUG conftest.C 1>&5
> configure:1217: acc -E -DNDEBUG conftest.c >/dev/null 2>conftest.out
> configure:1370: f77 -c -O conftest.f
> conftest.f:
>  MAIN:
> configure:1415: f77 -o conftest -O conftest.F  
> /tmp/cpp.15514.0.f:
>  MAIN:
> "conftest.F", line 3: Warning: local variable "r" never used
> ld: Undefined symbol 
>    _main 
>    ___ansi_fflush
> Compilation failed

The problem with the above is that the SunOS 4.1.3 f77(1) compiler, when
used to link together object modules, doesn't know about the ANSI-C runtime
support library, which is referenced via the option "-lansi".

I suggest the following:

    1.  Go to the top-level source directory.

    2.  Execute the command "make distclean".

    3.  Remove the file "config.cache" if it exists.

    4.  Set your environment variables as before.

    5.  Ensure that the environment variable LIBS contains the string
        "-lansi" (without the quotemarks, of course).

    6.  Execute the configure script.
        Redirect standard output and standard error to a file.
        If an error occurs, then stop and send me the file.

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

    8.  Execute the command "make test".
        Redirect standard output and standard error to a file.
        If an error occurs, then stop and send me the file.

    9.  Execute the command "make install".
        Redirect standard output and standard error to a file.
        If an error occurs, then stop and send me the file.

    10. Execute the command "make clean".

Please let me know if this helps.

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