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: JefF Wong <address@hidden> >Subject: netCDF on BeOS >Organization: Canada Centre for Remote Sensing; Natural Resources Canada >Keywords: 200004201225.GAA10696 Hi Jeff, > I have been attempting to compile version 3.5a of the netcdf libraries and > programs on a Pentium-2 based system running BeOS v4.5.2 (which has a POSIX > layer). This environment uses gcc version 2.9-beos-980929. Fortran is > handled through the combination of fort77 (v1.14a) and f2c (the last recorded > change in the "readme" file is Nov 15, 1999). The VERSION file of the current netcdf-3.5 beta release at ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-3.5-beta2.ZIP or ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-3.5-beta2.tar.Z contains "3.5" rather than "3.5a", so maybe what's available is a little bit more recent than what you have been working with, but we don't have access to a BeOS platform, so I'm not sure there have been any changes to make it any more portable to BeOS. > I had set the following environment variables prior to attempting anything: > export CPPFLAGS="-DNDEBUG -Df2cFortran" > export FC="/boot/home/bin/fort77" > export FFLAGS="-O -Nx400 -w" > > I am attaching the log files from: > ./configure --prefix=/boot/home/src/netcdf >> configure.log 2>> configure.log; > make >> make0.log 2>> make0.log > > I editted ncgen/ncgentab.c to remove the line containing: > #include <values.h> > and did > make >> make1.log 2>> make1.log > make test >> test0.log 2>> test0.log At least that problem seems to have been fixed in the more recent beta release; there is no "#include <values.h>" statement in the "ncgen/ncgentab.c" source. > I editted nc_test/Makefile to remove the line containing > ld_math = -lm > and did: > make test >> test1.log 2>> test1.log > make install >> install.log 2>> install.log I'm surprised you could get away with deleting the "-lm" flag to link in the math libraries, because nc_test makes use of the fabs() and floor() functions from the math libraries. I can't get it to link if I omit "-lm". > As you can see, there are still errors. > Do you have any suggestions about these problems? It looks like you've solved almost all the problems. From the output you've sent, there are only two things to be concerned about: 1. The output from "make test" in the libsrc/ directory cmp test.nc test_nc.sav test.nc test_nc.sav differ: char 7681, line 7 2. The return from nc_open(): FAILURE at line 94 of test_read.c: nc_open of nonexistent file should have returned system error The first problem indicates a difference in the binary netCDF file created by the test program and a saved version of what it should have produced. We expect these to be bit-for-bit identical, but if there are only tiny differences in floating-point values, for example, this problem may not be serious. If you have the "ncdump" netCDF utility installed on another platform, you could compare the output of "ncdump test.nc" with the output of "ncdump test_nc.sav" to see if you think the difference is serious. If you don't have a working version of ncdump, send us the file libsrc/test.nc and we'll have a look at it to see if the differences are anything to be concerned about. The second problem seems less serious, and just indicates an lack of an expected error return when trying to open a nonexistent file. This must ultimately be a problem with the system call fd = open(path, oflags, 0); in libsrc/posixio.c returning with something other than -1 when invoked for a nonexistent file. That sounds like a problem with the BeOS POSIX I/O, but you could probably work around it pretty easily by finding out the BeOS way to determine if a file doesn't exist and using that to return what is expected. --Russ _____________________________________________________________________ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu