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

20030618:netCDF 3.5.0 make error



Tom,

> To: "'Unidata Support'" <address@hidden>
> From: "tom" <address@hidden>
> Subject: make error
> Organization: UCAR/Unidata
> Keywords: 200306091945.h59JjILd008304

The above message contained the following:

> My environments are
>       RH9.0 Linux
>       Portland pgf77 pgf90 pgcc pgCC
>       netCDF 3.5.0

It turns out that you're not using pgCC but rather g++ as the C++
compiler -- and this is causing the problem.

> I got errors at "make". The attached files are:
>       Config is standard log for "configure" process
>       Configure is the whole display output for "configure" process
>       Make is the whole display output for "make" process
> Please advise how to get rid of errors to have "make test" process no
> error
> 
> My final application is to link with WRF
> 
> Best wishes,
> 
> Tom Chien 
...

> loading cache ./config.cache=0A=
> checking for top-level source-directory=0A=
> /usr/local/netcdf/src=0A=
> checking for m4 preprocessor=0A=
> checking for m4... (cached) m4=0A=
> checking m4 flags... -B10000=0A=
> checking C compiler "pgcc"... works=0A=
> checking how to make dependencies... false=0A=
> checking for pgCC... (cached) g++296=0A=

As far as the configure script was concerned, the C++ compiler pgCC
didn't exist.  Are you sure it does?  Is the containing directory in the
PATH environment variable?

The mismatch between using the Portland Group compilers and the GNU C++
compiler caused the following problem:

> Making `all' in directory /usr/local/netcdf/src/cxx=0A=
> =0A=
> make[2]: Entering directory `/usr/local/netcdf/src/cxx'=0A=
> g++296 -c  -I../libsrc -I.  -DNDEBUG -Df2cFortran netcdf.cpp=0A=
> g++296 -c  -I../libsrc -I.  -DNDEBUG -Df2cFortran ncvalues.cpp=0A=
> ar cru libnetcdf_c++.a netcdf.o ncvalues.o=0A=
> ranlib libnetcdf_c++.a=0A=
> g++296 -c  -I../libsrc -I.  -DNDEBUG -Df2cFortran nctst.cpp=0A=
> g++296 -o nctst   nctst.o libnetcdf_c++.a -L../libsrc -lnetcdf =0A=
> ../libsrc/libnetcdf.a(nc.o)(.init+0x6): undefined reference to =
> `__pgio_ini'=0A=
> ../libsrc/libnetcdf.a(ncio.o)(.init+0x6): undefined reference to =
> `__pgio_ini'=0A=
...

If the pgCC compiler exists, then you can retry -- but keep the
following in mind:

    1.  Do a "make distclean" first.

    2.  Use absolute pathnames when setting the environment variables
        for the compilers.

    3.  Ensure that the environment variable CPPFLAGS contains the
        string "-DpgiFortran" before executing the configure script.

If the pgCC compiler doesn't exist and you want to use the Portland
Group compilers as much as possible, then keep #1 and #2 above in mind
and set the environment variable LIBS to reference the Portland Group
runtime library before executing the configure script.

If the pgCC compiler doesn't exist and you want to use the GNU
compilers, then keep #1 and #2 in mind but ensure that the environment
variable CPPFLAGS contains the string "-Df2cFortran" before executing
the configure script.

Regards,
Steve Emmerson