[netcdfgroup] Netcdf 4.1 Windows binaries

Hello,

I just built 32 and 64 bit Windows binaries from the netcdf 4.1 sources
at <ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-4.1.tar.gz> using
Visual Studio 2008 and HDF5 1.8.4. Some changes to the project and
source files were necessary:

* win32/NET/ncgen/ncgen.vcproj is corrupt. RelativePath strings are
missing quotation marks at the end.

* win32/NET/config.h is outdated (e.g version numbers) and is missing
defines for DEFAULT_CHUNK_SIZE, DEFAULT_CHUNKS_IN_CACHE,
MAX_DEFAULT_CACHE_SIZE, and the 64 bit platform.

* strcasecmp and some other variables are unknown to Windows.


The Win32 target builds fine and passes nc_test, nctest, and
quick_large_test. The resulting netcdf.dll is missing DAP functionality.
The win64 build also succeeds and passes nc_test and quick_large_test.
Nctest crashes and/or reports thousands of errors:

5>Testing V2 API with 3 different netCDF formats.
5>Switching to netCDF classic format.
5>*** Testing nccreate ... ok ***
5>*** Testing ncopen ...  ok ***
5>*** Testing ncredef ...  ok ***
5>*** Testing ncendef ...  ok ***
5>*** Testing ncclose ...  ok ***
5>*** Testing ncinquire ... ok ***
5>*** Testing ncsync ...  *** test_ncsync: ncvarget succeeded but data
values wrong
5>ok ***
5>*** Testing ncabort ...  ok ***
5>*** Testing ncdimdef ... ok ***
5>*** Testing ncdimid ...  ok ***
5>*** Testing ncdiminq ... ok ***
5>*** Testing ncdimrename ... ok ***
5>*** Testing ncvardef ... *** test_ncvardef: ncvarget1 failure for byte
5>*** test_ncvardef: ncvarget1 failure for char
5>*** test_ncvardef: ncvarget1 failure for short
5>*** test_ncvardef: ncvarget1 failure for long
5>FAILED! ***
5>*** Testing ncvarid ...  ok ***
5>*** Testing ncvarinq ... ok ***
5>*** Testing ncvarput1 ... *** test_varputget1: ncvarput1 failed for
point 0, variable ce
5>*** test_ncvarput1: ncredef failed
5>*** Testing ncvarget1 ... *** test_varputget1: ncvarput1 failed for
point 0, variable ce
5>*** test_ncvarget1: ncredef failed
5>*** Testing ncvarput ... *** test_varputget: bad values returned from
ncvarget
... and so on


Any hints how to get DAP functionality enabled and a working 64-bit
nctest are appreciated.


Best,

Christoph Gohlke
Laboratory for Fluorescence Dynamics
University of California, Irvine
http://www.lfd.uci.edu/
--- nc_test/tests.h     Mon Jan 19 14:26:36 1970
+++ nc_test/tests.h     Mon Jan 19 14:26:36 1970
@@ -438,39 +438,39 @@
  * N.B. there is potential for these declarations to get
  * out of sync with those in ../libsrc/nc.h and the definitions.
  */
-extern int
+EXTERNL int
 nctypelen(nc_type datatype);
 
-extern int
+EXTERNL int
 nc_put_var1(int ncid, int varid, const size_t *index, const void *value);
 
-extern int
+EXTERNL int
 nc_get_var1(int ncid, int varid, const size_t *index, void *value);
 
-extern int
+EXTERNL int
 nc_put_vara(int ncid, int varid,
         const size_t *start, const size_t *count, const void *value);
 
-extern int
+EXTERNL int
 nc_get_vara(int ncid, int varid,
         const size_t *start, const size_t *count, void *value);
 
-extern int
+EXTERNL int
 nc_put_vars(int ncid, int varid,
         const size_t *start, const size_t *count, const ptrdiff_t *stride,
         const void * value);
 
-extern int
+EXTERNL int
 nc_get_vars(int ncid, int varid,
         const size_t *start, const size_t *count, const ptrdiff_t *stride,
         void * value);
 
-extern int
+EXTERNL int
 nc_put_varm(int ncid, int varid,
         const size_t *start, const size_t *count, const ptrdiff_t *stride,
         const ptrdiff_t * map, const void *value);
 
-extern int
+EXTERNL int
 nc_get_varm(int ncid, int varid,
         const size_t *start, const size_t *count, const ptrdiff_t *stride,
         const ptrdiff_t * map, void *value);
--- win32/NET/config.h  Mon Jan 19 14:26:36 1970
+++ win32/NET/config.h  Mon Jan 19 14:26:36 1970
@@ -7,6 +7,10 @@
 /* Should the subprocess compression for Server3 be includes? */
 /* #undef COMPRESSION_FOR_SERVER3 */
 
+#define DEFAULT_CHUNK_SIZE 4194304
+#define DEFAULT_CHUNKS_IN_CACHE 10
+#define MAX_DEFAULT_CACHE_SIZE 67108864
+
 /* default chunk cache nelems. */
 #define CHUNK_CACHE_NELEMS 1000
 
@@ -47,6 +51,7 @@
 
 /* set this only when building a DLL under MinGW */
 /* #undef DLL_NETCDF */
+#define DLL_NETCDF 1
 
 /* uint16 */
 /* #undef DUINT16 */
@@ -344,19 +349,19 @@
 #define PACKAGE "netcdf"
 
 /* Define to the address where bug reports for this package should be sent. */
-#define PACKAGE_BUGREPORT "support@xxxxxxxxxxxxxxxx"
+#define PACKAGE_BUGREPORT "support-netcdf@xxxxxxxxxxxxxxxx"
 
 /* Define to the full name of this package. */
 #define PACKAGE_NAME "netCDF"
 
 /* Define to the full name and version of this package. */
-#define PACKAGE_STRING "netCDF 4.0"
+#define PACKAGE_STRING "netCDF 4.1"
 
 /* Define to the one symbol short name of this package. */
 #define PACKAGE_TARNAME "netcdf"
 
 /* Define to the version of this package. */
-#define PACKAGE_VERSION "4.0.1-beta3"
+#define PACKAGE_VERSION "4.1.0"
 
 /* Define as the return type of signal handlers (`int' or `void'). */
 /* #undef RETSIGTYPE */
@@ -389,7 +394,15 @@
 #define SIZEOF_SHORT 2
 
 /* The size of `size_t', as computed by sizeof. */
-#define SIZEOF_SIZE_T 4
+#ifdef _WIN64
+typedef unsigned __int64 size_t;
+typedef __int64 ssize_t;
+#define SIZEOF_SIZE_T 8
+#else
+typedef unsigned int size_t;
+typedef int ssize_t;
+#define SIZEOF_SIZE_T 4
+#endif
 
 /* The size of `uint16_t', as computed by sizeof. */
 /* #undef SIZEOF_UINT16_T */
@@ -442,7 +455,7 @@
 #define USE_ZLIB 1
 
 /* Version number of package */
-#define VERSION "4.0.1"
+#define VERSION "4.1.0"
 
 /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
    significant byte first (like Motorola and SPARC, unlike Intel and VAX). */
--- libsrc/v2i.c        Mon Jan 19 14:26:36 1970
+++ libsrc/v2i.c        Mon Jan 19 14:26:36 1970
@@ -32,6 +32,7 @@
  */
 
 # include "onstack.h"
+#include "nc.h"
 
 static size_t
 nvdims(int ncid, int varid)
--- ncgen/main.c        Mon Jan 19 14:26:36 1970
+++ ncgen/main.c        Mon Jan 19 14:26:36 1970
@@ -13,6 +13,8 @@
 extern void parse_init(void);
 extern int  yyparse(void);
 
+#define strcasecmp _stricmp
+
 /* Default is netcdf-3 mode 1 */
 #define DFALTCMODE 0
 
@@ -108,6 +110,10 @@
     int c;
     FILE *fp;
     int languages = 0;
+
+    extern int optind;
+    extern int opterr;
+    extern char *optarg;
 
 #ifdef __hpux
     setlocale(LC_CTYPE,"");
--- ncgen/ncgentab.c    Mon Jan 19 14:26:36 1970
+++ ncgen/ncgentab.c    Mon Jan 19 14:26:36 1970
@@ -58,7 +58,7 @@
 /* Using locations.  */
 #define YYLSP_NEEDED 0
 
-
+#define strcasecmp _stricmp
 
 /* Tokens.  */
 #ifndef YYTOKENTYPE
--- win32/NET/ncgen/ncgen.vcproj        Fri Sep 25 11:20:58 2009
+++ win32/NET/ncgen/ncgen.vcproj        Thu Feb 04 17:08:58 2010
@@ -189,209 +359,209 @@
                        
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
                        >
                        <File
-                               RelativePath="..\..\..\ncgen\bytebuffer.c
+                               RelativePath="..\..\..\ncgen\bytebuffer.c"
                                >
                        </File>
                        <File
-                               RelativePath="..\..\..\ncgen\cdata.c
+                               RelativePath="..\..\..\ncgen\cdata.c"
                                >
                        </File>
                        <File
-                               RelativePath="..\..\..\ncgen\cdfdata.c
+                               RelativePath="..\..\..\ncgen\cdfdata.c"
                                >
                        </File>
                        <File
-                               RelativePath="..\..\..\ncgen\cmldata.c
+                               RelativePath="..\..\..\ncgen\cmldata.c"
                                >
                        </File>
                        <File
-                               RelativePath="..\..\..\ncgen\ConvertUTF.c
+                               RelativePath="..\..\..\ncgen\ConvertUTF.c"
                                >
                        </File>
                        <File
-                               RelativePath="..\..\..\ncgen\cvt.c
+                               RelativePath="..\..\..\ncgen\cvt.c"
                                >
                        </File>
                        <File
-                               RelativePath="..\..\..\ncgen\data.c
+                               RelativePath="..\..\..\ncgen\data.c"
                                >
                        </File>
                        <File
-                               RelativePath="..\..\..\ncgen\debug.c
+                               RelativePath="..\..\..\ncgen\debug.c"
                                >
                        </File>
                        <File
-                               RelativePath="..\..\..\ncgen\dump.c
+                               RelativePath="..\..\..\ncgen\dump.c"
                                >
                        </File>
                        <File
-                               RelativePath="..\..\..\ncgen\escapes.c
+                               RelativePath="..\..\..\ncgen\escapes.c"
                                >
                        </File>
                        <File
-                               RelativePath="..\..\..\ncgen\f77data.c
+                               RelativePath="..\..\..\ncgen\f77data.c"
                                >
                        </File>
                        <File
-                               RelativePath="..\..\..\ncgen\genc.c
+                               RelativePath="..\..\..\ncgen\genc.c"
                                >
                        </File>
                        <File
-                               RelativePath="..\..\..\ncgen\gencdf.c
+                               RelativePath="..\..\..\ncgen\gencdf.c"
                                >
                        </File>
                        <File
-                               RelativePath="..\..\..\ncgen\genchar.c
+                               RelativePath="..\..\..\ncgen\genchar.c"
                                >
                        </File>
                        <File
-                               RelativePath="..\..\..\ncgen\gencml.c
+                               RelativePath="..\..\..\ncgen\gencml.c"
                                >
                        </File>
                        <File
-                               RelativePath="..\..\..\ncgen\generr.c
+                               RelativePath="..\..\..\ncgen\generr.c"
                                >
                        </File>
                        <File
-                               RelativePath="..\..\..\ncgen\genf77.c
+                               RelativePath="..\..\..\ncgen\genf77.c"
                                >
                        </File>
                        <File
-                               RelativePath="..\..\..\ncgen\genjjni.c
+                               RelativePath="..\..\..\ncgen\genjjni.c"
                                >
                        </File>
                        <File
-                               RelativePath="..\..\..\ncgen\genjstd.c
+                               RelativePath="..\..\..\ncgen\genjstd.c"
                                >
                        </File>
                        <File
-                               RelativePath="..\..\..\ncgen\genlib.c
+                               RelativePath="..\..\..\ncgen\genlib.c"
                                >
                        </File>
                        <File
-                               RelativePath="..\..\..\ncgen\getfill.c
+                               RelativePath="..\..\..\ncgen\getfill.c"
                                >
                        </File>
                        <File
-                               RelativePath="..\..\..\ncgen\jdatajni.c
+                               RelativePath="..\getopt.c"
                                >
                        </File>
                        <File
-                               RelativePath="..\..\..\ncgen\jdatastd.c
+                               RelativePath="..\..\..\ncgen\jdatajni.c"
                                >
                        </File>
                        <File
-                               RelativePath="..\..\..\ncgen\list.c
+                               RelativePath="..\..\..\ncgen\jdatastd.c"
                                >
                        </File>
                        <File
-                               RelativePath="..\..\..\ncgen\main.c
+                               RelativePath="..\..\..\ncgen\list.c"
                                >
                        </File>
                        <File
-                               RelativePath="..\..\..\ncgen\ncgentab.c
+                               RelativePath="..\..\..\ncgen\main.c"
                                >
                        </File>
                        <File
-                               RelativePath="..\..\..\ncgen\ncgenyy.c
+                               RelativePath="..\..\..\ncgen\ncgentab.c"
                                >
                        </File>
                        <File
-                               RelativePath="..\..\..\ncgen\odom.c
+                               RelativePath="..\..\..\ncgen\odom.c"
                                >
                        </File>
                        <File
-                               RelativePath="..\..\..\ncgen\offsets.c
+                               RelativePath="..\..\..\ncgen\offsets.c"
                                >
                        </File>
                        <File
-                               RelativePath="..\..\..\ncgen\semantics.c
+                               RelativePath="..\..\..\ncgen\semantics.c"
                                >
                        </File>
                        <File
-                               RelativePath="..\..\..\ncgen\util.c
+                               RelativePath="..\..\..\libsrc\string.c"
                                >
                        </File>
-               </Filter>
-               <Filter
-                       Name="Header Files"
-                       Filter="h;hpp;hxx;hm;inl;inc;xsd"
-                       
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
-                       >
                        <File
-                               RelativePath="..\..\..\ncgen\bytebuffer.h
+                               RelativePath="..\..\..\libsrc\utf8proc.c"
                                >
                        </File>
                        <File
-                               RelativePath="..\..\..\ncgen\ConvertUTF.h
+                               RelativePath="..\..\..\ncgen\util.c"
                                >
                        </File>
+               </Filter>
+               <Filter
+                       Name="Header Files"
+                       Filter="h;hpp;hxx;hm;inl;inc;xsd"
+                       
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+                       >
                        <File
-                               RelativePath="..\..\..\ncgen\data.h
+                               RelativePath="..\..\..\ncgen\bytebuffer.h"
                                >
                        </File>
                        <File
-                               RelativePath="..\..\..\ncgen\debug.h
+                               RelativePath="..\..\..\ncgen\ConvertUTF.h"
                                >
                        </File>
                        <File
-                               RelativePath="..\..\..\ncgen\dump.h
+                               RelativePath="..\..\..\ncgen\data.h"
                                >
                        </File>
                        <File
-                               RelativePath="..\..\..\ncgen\generr.h
+                               RelativePath="..\..\..\ncgen\debug.h"
                                >
                        </File>
                        <File
-                               RelativePath="..\..\..\ncgen\genlib.h
+                               RelativePath="..\..\..\ncgen\dump.h"
                                >
                        </File>
                        <File
-                               RelativePath="..\..\..\ncgen\includes.h
+                               RelativePath="..\..\..\ncgen\generr.h"
                                >
                        </File>
                        <File
-                               RelativePath="..\..\..\ncgen\list.h
+                               RelativePath="..\..\..\ncgen\genlib.h"
                                >
                        </File>
                        <File
-                               RelativePath="..\..\..\ncgen\ncgen.h
+                               RelativePath="..\..\..\ncgen\includes.h"
                                >
                        </File>
                        <File
-                               RelativePath="..\..\..\ncgen\ncgen.l
+                               RelativePath="..\..\..\ncgen\list.h"
                                >
                        </File>
                        <File
-                               RelativePath="..\..\..\ncgen\ncgentab.h
+                               RelativePath="..\..\..\ncgen\ncgen.h"
                                >
                        </File>
                        <File
-                               RelativePath="..\..\..\ncgen\ncgen.y
+                               RelativePath="..\..\..\ncgen\ncgentab.h"
                                >
                        </File>
                        <File
-                               RelativePath="..\..\..\ncgen\odom.h
+                               RelativePath="..\..\..\ncgen\odom.h"
                                >
                        </File>
                        <File
-                               RelativePath="..\..\..\ncgen\offsets.h
+                               RelativePath="..\..\..\ncgen\offsets.h"
                                >
                        </File>
                        <File
-                               RelativePath="..\..\..\ncgen\run_nc4_tests.sh
+                               RelativePath="..\..\..\ncgen\run_nc4_tests.sh"
                                >
                        </File>
                        <File
-                               RelativePath="..\..\..\ncgen\run_tests2.sh
+                               RelativePath="..\..\..\ncgen\run_tests.sh"
                                >
                        </File>
                        <File
-                               RelativePath="..\..\..\ncgen\run_tests.sh
+                               RelativePath="..\..\..\ncgen\run_tests2.sh"
                                >
                        </File>
                        <File
-                               RelativePath="..\..\..\ncgen\util.h
+                               RelativePath="..\..\..\ncgen\util.h"
                                >
                        </File>
                </Filter>
  • 2010 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: