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

Re: Build error. (fwd)



> Date: Thu, 17 Jul 1997 17:20:27 -0000
> From: Qiao Jinsong <address@hidden>
> To: address@hidden
> Subject: Build error.

Hi Joe,

> I have tried to make the netcdf-3.3.1. after changing some flags, it
> could build a library. but I met a error now. It's because it could
> not find some functions which will be used in some files. I don't know
> if it is the functions of netcdf( which mean the netcdf's library is
> not linked) or some other library. I have put the "make"'s output
> message in the following paragraphs. Could you find someone to explain
> what I have done, and what I still need to do. I think maybe the
> netcdf library is OK now.  Joe
> 
> Making `all' in directory /usr/people/joe/netcdf-3.3.1/src/libsrc
> 
>       /bin/cc -n32 -c -O -I.  -DNDEBUG attr.c
>       /bin/cc -n32 -c -O -I.  -DNDEBUG dim.c
  ...

Everything looks OK in building the C library, the Fortran interface,
and the netCDF utility programs, ncdump and ncgen.  Where a problem
appears is in trying to build the C++ interface:

> Making `all' in directory /usr/people/joe/netcdf-3.3.1/src/cxx
> 
>       /bin/cc -n32 -c -O  -I../libsrc  -DNDEBUG netcdf.cc
>       /bin/cc -n32 -c -O  -I../libsrc  -DNDEBUG ncvalues.cc
>       ar cru   libnetcdf_c++.a netcdf.o ncvalues.o
>       : libnetcdf_c++.a
>       /bin/cc -n32 -c -O  -I../libsrc  -DNDEBUG nctst.cc
>       /bin/cc -n32 -o nctst -I../libsrc  -DNDEBUG -O   nctst.o 
> libnetcdf_c++.a -L../libsrc -lnetcdf 

The above shows the "/bin/cc" compiler is being used to compile and link
the C++ interface.  If you want to build the C++ interface (it is
optional and not used by other parts of the netCDF software), you need
to have a C++ compiler.  I'm not sure what system you are trying to
build netCDF on, but /bin/cc is probably not the right way to invoke the
C++ compiler, at least for linking, which is why the following link
errors result:

> ld32: ERROR 33: Unresolved text symbol "__ls__7ostreamGPCc" -- 1st referenced 
> by nctst.o.
> ld32: ERROR 33: Unresolved text symbol "__ct__13Iostream_initGv" -- 1st 
> referenced by nctst.o.
> ld32: ERROR 33: Unresolved text symbol "__record_needed_destruction" -- 1st 
> referenced by nctst.o.

  ...

If you don't have a C++ compiler, just set the environment variable that
the "configure" script uses to determine where the C++ compiler is,
CXX="", then remove the "config.cache" file, "make clean", rerun
"configure", and "make all test", then "make install" if things look OK.

If you want the C++ interface, make sure the C++ compiler you choose by
setting the CXX environment variable is capable of compiling and linking
a simple C++ application first.

Please let us know at address@hidden if the above doesn't
solve the problem, and in that case send the information requested at
the end of the INSTALL file under the heading "IF PROBLEMS OCCUR".

--Russ

_____________________________________________________________________

Russ Rew                                         UCAR Unidata Program
address@hidden                     http://www.unidata.ucar.edu