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: HP-UX 10.2 >> Organization: . >> Keywords: 199811121012.DAA18253 Christof, >> The problem with the above is that the C compiler was not given the >> option "-D_HPUX_SOURCE" (as indicated in the INSTALL file). Try the >> following: >> >> 1. Go to the top-level source directory. >> >> 2. Execute the command "make distclean". Don't worry if it fails >> or even fails to execute. >> >> 3. Remove the file "config.cache" if it exists. >> >> 4. Set your environment variables as before according to the >> instructions in the INSTALL file. >> >> 5. Ensure that the environment variable CFLAGS contains the string >> "-D_HPUX_SOURCE". >> >> 6. Continue with the installation process starting with step 6 of >> the "REPORTING PROBLEMS" section in the INSTALL file. >> >> _____________________________________________________________________ >> >> Russ Rew UCAR Unidata Program >> address@hidden http://www.unidata.ucar.edu > Hi Russ, > sorry for bothering you again! Maybe I read the INSTALL file not carefully > enough but is not clear to me were I have to make the changes for > the HP-UX 10.2 version. Is it in the configure or in the macros.mak file? Sorry I wasn't clearer about this. You don't make any changes to any files. You just make sure the necessary environment variables are set in your environment before you run the configure script again. The INSTALL file doesn't give detailed instructions for how to set environment variables. How you set an environment variable on a Unix system depends on which shell you are using. You can usually tell which shell you are using by invoking the command "echo $SHELL". If you are using ksh, sh, or bash, just use the "export" statement to set environment variables, for example: $ export CC=/bin/c89 $ export CPPFLAGS=-D_HPUX_SOURCE $ export CFLAGS= $ export FC=/opt/fortran/bin/fort77 $ export FFLAGS=-w $ export CXX=/usr/bin/CC If you are using a shell such as "csh" or "tcsh" to interact with the system, environment variables are set with the "setenv" command instead, for example: % setenv CC /bin/c89 % setenv CPPFLAGS -D_HPUX_SOURCE % setenv CFLAGS "" % setenv FC /opt/fortran/bin/fort77 % setenv FFLAGS -w % setenv CXX /usr/bin/CC In either case, after setting the environment variables you want, you should start over with building netcdf, such as the following: $ make distclean # don't worry if this produces an error message $ rm config.cache # necessary if you have run the configure script here before $ ./configure # run the script I told you in the last message that the environment variable "CFLAGS" should be set to the value "-D_HPUX_SOURCE", and above and in the INSTALL file, it says use this value for the environment variable "CPPFLAGS" instead. It doesn't matter much and should work either way, but if you set CPPFLAGS as above, then you can choose different CFLAGS values, such as "" (default), "-g" (debugging), or "-O" optimized. I hope this helps. If not, feel free to report any problems to address@hidden and we'll see if we can fix the problem. --Russ _____________________________________________________________________ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu