[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
20030501: netCDF 3.5.0 installation problem on Linux platform
- Subject: 20030501: netCDF 3.5.0 installation problem on Linux platform
- Date: Thu, 01 May 2003 10:31:30 -0600
Jon,
>Date: Thu, 1 May 2003 11:53:09 -0400
>From: "Case.Jon" <address@hidden>
>Organization: ENSCO, Inc.
>To: "Steve Emmerson" <address@hidden>
>Subject: RE: 20030501: netCDF 3.5.0 installation problem on Linux platform
The above message contained the following:
> Thanks for the response. Actually, I already had CPPFLAGS set to
> -DNDEBUG -DpgiFortran,
I don't think that's quite right. If CPPFLAGS had contained the string
"-DpgiFortran" prior to executing the configure script, then the
following excerpt from your previous email:
make[2]: Entering directory
`/home/cluster1/arps1/SOFTWARE/netcdf/netcdf-3.5.0/src/libsrc'
pgcc -c -O -I. -DNDEBUG attr.c
would have had that string in the last line above (I note there's an
extra space before the "-DNDEBUG" -- but I don't know if that's
significant). Something odd must have happened.
> but I also had to include that option for CFLAGS.
> So now, CFLAGS='-O -DpgiFortran' and CPPFLAGS='-DNDEBUG -DpgiFortran'.
>
> I got a bit further, but then encountered the following make errors when
> it began compiling using c++ :
>
> Any more suggestions?
> Jon
>
> ------------------------------------------------------------------------
> ----
> Returning to directory
> /home/cluster1/arps1/SOFTWARE/netcdf/netcdf-3.5.0/src
>
> make[1]: Leaving directory
> `/home/cluster1/arps1/SOFTWARE/netcdf/netcdf-3.5.0/src'
> make[1]: Entering directory
> `/home/cluster1/arps1/SOFTWARE/netcdf/netcdf-3.5.0/src'
>
> Making `all' in directory
> /home/cluster1/arps1/SOFTWARE/netcdf/netcdf-3.5.0/src/cxx
>
> make[2]: Entering directory
> `/home/cluster1/arps1/SOFTWARE/netcdf/netcdf-3.5.0/src/cxx'
> c++ -c -I../libsrc -I. -DNDEBUG netcdf.cpp
> c++ -c -I../libsrc -I. -DNDEBUG ncvalues.cpp
> ar rv libnetcdf_c++.a netcdf.o ncvalues.o
> a - netcdf.o
> a - ncvalues.o
> touch libnetcdf_c++.a
> c++ -c -I../libsrc -I. -DNDEBUG nctst.cpp
> c++ -o nctst -L/usr/X11R6/lib -lm nctst.o libnetcdf_c++.a -L../libsrc
> -lnetcdf
> ../libsrc/libnetcdf.a(putget.o): In function `nc_put_vara_text':
> putget.o(.text+0x81c8): undefined reference to `__builtin_alloca'
> putget.o(.text+0x81e0): undefined reference to `__builtin_alloca'
> ../libsrc/libnetcdf.a(putget.o): In function `nc_put_vara_uchar':
> putget.o(.text+0x84b8): undefined reference to `__builtin_alloca'
> putget.o(.text+0x84d0): undefined reference to `__builtin_alloca'
> ../libsrc/libnetcdf.a(putget.o): In function `nc_put_vara_schar':
> putget.o(.text+0x87a8): undefined reference to `__builtin_alloca'
> ../libsrc/libnetcdf.a(putget.o)(.text+0x87c0): more undefined references
> to `__builtin_alloca' follow
> collect2: ld returned 1 exit status
> make[2]: *** [nctst] Error 1
> make[2]: Leaving directory
> `/home/cluster1/arps1/SOFTWARE/netcdf/netcdf-3.5.0/src/cxx'
> make[1]: *** [subdir_target] Error 1
> make[1]: Leaving directory
> `/home/cluster1/arps1/SOFTWARE/netcdf/netcdf-3.5.0/src'
> make: *** [cxx/all] Error 2
I've never seen this error before and there's nothing in our tracking-
system about "__builtin_alloca". I note, however, that the C code of
the netCDF library was compiled by the Portland Group's C compiler while
the C++ code was compiled and linked by the native /usr/bin/c++
compiler. I suspect that you will have to reference the Portland
Group's runtime library or libraries on the C++ link-line or use the
Portland Group's C++ compiler instead of the native one in order to
resolve the undefined symbol.
You can reference the Portland Group's runtime library by appropriately
setting the environment variable LIBS, e.g. (NB: standard shell syntax),
export LIBS='-L/usr/pgi/linux86/lib -lpgc' # might be wrong
and then rebuilding according to all the steps of my previous email.
You can use Portland Group's C++ compiler instead of the native one by
appropriately setting the environment variable CXX, e.g. (NB: standard
shell syntax),
export CXX=/usr/pgi/linux86/bin/pgCC
and then rebuilding according to all the steps of my previous email.
Please let me know if this helps.
Regards,
Steve Emmerson