NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.

To learn about what's going on, see About the Archive Site.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDF #NDT-203834]: building netcdf.dll 3.6.3 with mingw



> Full Name: Johnathan Cree
> Email Address: address@hidden
> Organization: PNNL
> Package Version: 3.6.3
> Operating System: Windows XP/Windows Server 2003
> Hardware:
> Description of problem:
> 
> I'm using pycdf to access the c netcdf functions and haven't had any
> problems in linux but when
> 
> I moved to the windows environment I ran into a few issues.
> 
> First when using the pre-build netcdf.dll from 3.6.1 I get an error
> when I try to open a file
> 
> larger than 2GB stating that argument list is too long.  I the
> proceeded to build using Visual
> 
> Studios and got a slew of errors using the project file provided.  I
> then tried to build 3.6.3
> 
> using VS and was successful and could open a file larger than 2GB
> without problems but ran into
> 
> the problem that I could not create a file.  I got an Invalid Argument
> error in this case.  (If you want more information on the above errors
> let me know)
> 
> Minwg via Msys sounded like a viable option for me.  I can build netcdf
> 3.6.3 successfully configures as:
> 
> ./configure --disable-f90 --disable-cxx --enable-largefile; make check
> 
> When I try to build the actual dll, configure it using:
> 
> ./configure --disable-f90 --disable-cxx  --enable-shared --enable-dll 
> --enable-largefile; make
> 
> check
> 
> I get build errors which are:
> 
> libtool: link warning: undefined symbols not allowed in i686-pc-minw32 shared 
> libraries
> posixio.c: In function 'fgrow':
> posixio.c:131: error: storage size of 'sb' isn't known
> posixio.c: In function 'fgrow2':
> posixio.c:162: error: storage size of 'sb' isn't known
> posixio.c: In function 'ncio_filesize':
> posixio.c:1648: error: storage size of 'sb' isn't known
> make[2]: ***[posixio.lo] Error 1
> 
> output of configure and make for building the dll are in the attached files
> Configure_disable_f90_disable_cxx_enable_largefile_dll.txt
> make_check_configure_disable_f90_disable_cxx_enable_largefile_dll.txt
> 
> Please let me know if you need anything else.  I am using the newest
> version of mingw and msys.
> 
> Thank you,
> 
> 

Howdy Johnathan!

The netCDF build is complex, and so is building a DLL under Cygwin. I have 
never successfully managed it for long. I don't know the answer to your 
specific question. 

Certainly, if I were to want to try such a thing again, I would do so with the 
latest and greatest netCDF code, which can be obtained here: 
ftp://www.unidata.ucar.edu/pub/netcdf/snapshot/netcdf-4-daily.tar.gz

Although the build has become much more complex with the addition of opendap 
and netCDF-4/HDF5, these features can be turned off in the configure 
(--disable-netcdf-4 --disable-opendap) and that will hide most of the new stuff.

But my first line of defense is the visual studio build for netCDF. If you want 
to do a visual studio build, use the solution file in the win32/NET directory 
of the distribution.

If you do get this working, a patch would help other netCDF users...

Thanks,

Ed

Ticket Details
===================
Ticket ID: NDT-203834
Department: Support netCDF
Priority: Normal
Status: Closed