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: "Timothy E. Dowling" <address@hidden> >Subject: netCDF C - RedHat Linux 9.0 - Waiting for __ctype_b error >fix/workaround for RedHat 9 >Organization: Comparative Planetology Laboratory >Keywords: 200307211429.h6LET8RI001842 ------- Forwarded Message Date: Tue, 22 Jul 2003 10:56:47 -0400 From: "Timothy E. Dowling" <address@hidden> To: Russ Rew <address@hidden> cc: address@hidden Subject: Re: 20030721:netCDF C - RedHat Linux 9.0 _ctype_b error fix/workaround for RedHat 9 Russ, I have a partial understanding of this __ctype_b error. It has to do with properly installing the new libnetcdf.a into netcdf/lib before linking to it. My context is the EPIC atmospheric model, which makes netcdf first as part of its build. I just discovered I get different behavior depending on what is residing in $EPIC_PATH/netcdf/lib. A. If I first copy an old, pre Red Hat 9 libnetcdf.a into $EPIC_PATH/netcdf/lib, then a from-scratch EPIC-model make generates the error /home/dowling/epic/netcdf/lib/libnetcdf.a(string.o)(.text+0x37): In function `NC_check_name': : undefined reference to `__ctype_b' which is the original problem. B. If I first 'rm $EPIC_PATH/netcdf/lib/*' then a from-scratch EPIC-model make generates the error /usr/bin/ld: cannot find -lnetcdf I notice that netcdf's 'make distclean' does not empty the contents of netcdf/lib. I think this may be a contributing factor to the obscurity of the problem, because the __ctype_b error would be a different error if netcdf/lib got emptied by 'make distclean,' potentially one that is less of a red herring. For me, it would have been the 'cannot find -lnetcdf' error above. C. If I create a fresh netcdf/lib/libnetcdf.a by doing the following sequence by hand cd $EPIC_PATH/netcdf/src (which is /home/dowling/epic/netcdf/netcdf-3.5.0/src) make distclean configure make install which is the sequence I thought the EPIC make was doing, followed by a from-scratch EPIC make, I get no errors, and a new libnetcdf.a is installed into netcdf/lib, newer than the one I just made by hand. So, it seems my EPIC makefile is linking to the netcdf library in netcdf/lib before the new one is installed. I'm not sure why yet, but I'll send you this email and then try to figure it out. Sincerely, Tim Dowling ------- End of Forwarded Message