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.
Chad, > Full Name: Chad Herman > Email Address: address@hidden > Organization: Rutgers University > Package Version: 1.12.9 > Operating System: Win XP SP3 > Hardware: > Description of problem: I typed the following commands into MSYS: > > cd /home/owner/software/udunits-1.12.9/src > export CPPFLAGS=-Df2cFortran > export PERL=c:/strawberry/perl/bin > export LD_YACC=c:/bison/bin > ./configure > configure.log 2>&1 > make > make.log 2>&1 > > I can make it past the configuration process. But I get the following error > in make: > > making `all' in directory /home/owner/software/udunits-1.12.9/src/udunits > > make[1]: Entering directory `/home/owner/software/udunits-1.12.9/src/udunits' > make[2]: Entering directory `/home/owner/software/udunits-1.12.9/src/udunits' > gcc -c -g -O2 -I../lib -I../port/misc -Df2cFortran udunits.c > udunits.c: In function 'main': > udunits.c:98: error: '_POSIX_MAX_INPUT' undeclared (first use in this > function) > udunits.c:98: error: (Each undeclared identifier is reported only once > udunits.c:98: error: for each function it appears in.) > udunits.c:116: warning: incompatible implicit declaration of built-in > function 'exit' > make[2]: *** [udunits.o] Error 1 > make[2]: Leaving directory `/home/owner/software/udunits-1.12.9/src/udunits' > make[1]: *** [program] Error 2 > make[1]: Leaving directory `/home/owner/software/udunits-1.12.9/src/udunits' > make: *** [udunits/all] Error 1 > > I've searched the support archives and found suggestions to add "#define > _XOPEN_SOURCE=500" to the udunits/udunits.c source file. This issue was > apparently an old one because the version I'm using already has: "#ifndef > _XOPEN_SOURCE > # define _XOPEN_SOURCE 500 > #endif". I saw another suggestion that involved setting > CPPFLAGS='-Df2cFortran -D_XOPEN_SOURCE=500'. None of these worked. > > I've attached the configure and make logs (config.log, configure.log and > make.log). The standard output from uname -a is MINGW32_NT-5.1 > MAIN-G0TTQLCP0C 1.0.11(0.46/3/2) 2009-07-11 17:46 i686 Msys > > I know the version I'm trying to build is deprecated, but I need it because I > code in F90. > > Thank you for any help you can offer. The problem is that the UDUNITS package was designed for a POSIX environment and MinGW isn't quite that environment. I see these options: 1) give up; 2) migrate your processing to a POSIX computer; 3) install a POSIX virtual machine (e.g., VMplayer from VMware along with Ubuntu -- they're both free); and 4) modify the source-code so that it works under MinGW. The first step in the last option would be to define _POSIX_MAX_INPUT to be 255. Regards, Steve Emmerson Ticket Details =================== Ticket ID: VFS-256409 Department: Support UDUNITS Priority: Normal Status: Closed