[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 980421: Installing vs 3.4
- Subject: Re: 980421: Installing vs 3.4
- Date: Tue, 21 Apr 1998 16:43:09 -0600
>To: address@hidden
>From: "Donald S. Dunbar" <address@hidden>
>Subject: Installing vs 3.4
>Organization: Ocean Applied Research Ltd.
>Keywords: 199804212006.OAA25357
Hi,
> I am attempting to install NetCDF vs. 3.4 on my Sun Sparc 20 (Soalris
> 2.6). I am using the CC and f77 compilers from Sun, as well as gcc.
> All goes well until the following link occurs:
>
> CC -o nctst -I../libsrc -I/usr/openwin/include -O nctst.o
> libnetcdf_c++.a -L../libsrc -lnetcdf
> Undefined first referenced
> symbol in file
> __eprintf ../libsrc/libnetcdf.a(var.o)
> ld: fatal: Symbol referencing errors. No output written to nctst
> *** Error code 1
> make: Fatal error: Command failed for target `nctst'
> Current working directory /home/local/netcdf-3.4/src/cxx
>
> I've tried to locate the function _eprintf w/o success. Linking the
> NetCDF library with any other program results in a similar message.
> I would appreciate receiving advice on how to solve this problem (I was
> running vs. 2.4.3 with no problems). Thank you.
The __eprintf function is supposed to be in libgcc.a, a library of
run-time support for gcc. I think gcc's assert.h defines assert() to
call __eprintf. CC is not linking libgcc.a, so it can't find __eprintf.
However, I don't think that's the *cause* of the problem. I was able to
duplicate the symptom only by setting the environment variable
CPPFLAGS to "-I/usr/openwin/include" before running the "configure"
script. If instead CPPFLAGS is set to the empty string or to -DNDEBUG,
for example, everything works fine with gcc, f77 and CC.
Nothing in netCDF makes any use of anything in /usr/openwin/include, and
apparently there's something in that directory that gets improperly
included if the -I/usr/openwin/include flag is used on all the gcc
compile lines. So to fix the problem, try the following:
1. Unset the environment variable CPPFLAGS or set it to "-DNDEBUG".
Make sure it doesn't inadvertently get set to /usr/openwin/include
in your shell startup file, such as .profile, .bashrc, .kshrc, or
.cshrc which might be executed when you invoke the "configure"
shell script.
2. Remove the src/config.cache file.
3. From the src/ directory, invoke
make clean
./configure
make all test
If that doesn't work, please let us know.
--Russ
_____________________________________________________________________
Russ Rew UCAR Unidata Program
address@hidden http://www.unidata.ucar.edu