This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
>To: address@hidden >From: address@hidden >Subject: BOUNCE address@hidden: Non-member submission from [Wanli Wu ><address@hidden>] >Organization: UCAR/Unidata >Keywords: 200203151724.g2FHOPI27218 Hi Wanli, > I have GNU Fortran (g77) installed on my powerbook G4 (Mac > OS10.1.3), then I tried to install NetCDF 3.5, but I got error > messages in config.log, so the installation was failed. Actually you should expect error messages in "config.log" and these don't necessarily indicate an installation problem, as explained in the INSTALL.html instructions: The configure script will also create the file "config.log", which will contain error messages from the utilities that the configure script uses in examining the attributes of your system. Because such an examination can result in errors, it is expected that "config.log" will contain error messages. Therefore, such messages do not necessarily indicate a problem (a better indicator would be failure of the subsequent "make"). One exception, however, is an error message in "config.log" that indicates that a compiler could not be started. This indicates a severe problem in your compilation environment -- one that you must fix. So if the only errors you see in "config.log" have to do with not being able to compile the C++ interface, then that just means it won't build the C++ interface, but can still build the C and Fortran interfaces. If you don't need the C++ interface, that shouldn't be a problem. If you need the C++ interface, you might want to try the current beta release of netCDF 3.5.1, which is closer to the C++ standard: ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-3.5.1-beta3.tar.Z > configure:1225: checking C++ compiler "CC" > configure:1243: CC -o conftest -DNDEBUG conftest.C 1>&5 > /usr/bin/ld: Undefined symbols: > ostream::operator<<(char const *) > _cout > configure: failed program was: > #line 1230 "configure" > #include "confdefs.h" > #ifdef __cplusplus > extern "C" void exit(int); > #endif > > #include <iostream.h> > int main() { > cout << ""; > return 0; > } > > configure:1315: cc -E -DNDEBUG conftest.c >/dev/null 2>conftest.out > configure:1311: undefined type, found `Syntax' > configure:1311: illegal external declaration, missing `;' after `Error' > cpp-precomp: warning: errors during smart preprocessing, retrying in basic > mode > configure: failed program was: > #line 1309 "configure" > #include "confdefs.h" > #include <assert.h> > Syntax Error > > configure:2964: cc -o conftest -O -DNDEBUG conftest.c 1>&5 > configure:2958: header file 'alloca.h' not found > cpp-precomp: warning: errors during smart preprocessing, retrying in basic > mode > configure: failed program was: > #line 2957 "configure" > #include "confdefs.h" > #include <alloca.h> > int main() { > char *p = alloca(2 * sizeof(int)); > ; return 0; } > > configure:3586: cc -o conftest -O -DNDEBUG conftest.c 1>&5 > configure: failed program was: > #line 3576 "configure" > #include "confdefs.h" > /* volatile prevents gcc2 from optimizing the test away on sparcs. */ > #if !defined(__STDC__) || __STDC__ != 1 > #define volatile > #endif > main() { > volatile char c = 255; exit(c < 0); > } > > > The instruction of installation of 'g77' has the following the statement. > > "you may have trouble with cpp-precomp while using gcc, by using gcc > -no-cpp-precomp" > > Does it cause the problem in installing netcdf-3.5.0? If so, how can > fix the problem? I doubt if that is the problem. I was able to build the C, Fortran, and C++ interfaces with: CC=/usr/bin/cc CXX=/usr/bin/c++ CPPFLAGS=-Df2cFortran FC=/usr/bin/g77 FFLAGS=-w on Mac OS X 10.1.3. If you still have trouble, let me know, and maybe I can make the binaries available. Another possibility for getting the netCDF libraries in binary form is to use the "fink" utility, as described in this netCDF support reply: http://www.unidata.ucar.edu/glimpse/netcdf/4553 --Russ