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

[netCDF #HCI-914365]: Building NetCDF4 on Windows



Hi David,

> Any thoughts on how to make progress here?

Sorry it's taken so long to respond to your question.  I was away for the last 
week.
> I spent some time in the CMAKE files this week but I have not make much 
> progress compiling in windows or on my mac.
> 
> I did resolve one issue and make a pull 
> request<https://github.com/Unidata/netcdf-fortran/pull/1>

That looked good, and I just merged it it, but we still need to add a 
CMakeLists statement to
test for the availability of m4.  Ward's working on that, but since you 
evidently already have
m4, that's not relevant to the problems you're seeing.

> But even after getting the configure step to complete, the build fails 
> looking for include files and during linking libraries.
> 
> I am not sure why, but it seems that the options I am using:
> cmake -G "Visual Studio 10" -DENABLE_NETCDF_4:BOOL=ON 
> -DCMAKE_BUILD_TYPE:STRING=RELEASE -DNETCDF_C_INCLUDE_DIR:FILEPATH="C:\Program 
> Files (x86)\netCDF 4.3.1-rc1\x32\include" 
> -DNETCDF_C_LIBRARY:FILEPATH="C:\Program Files (x86)\netCDF 
> 4.3.1-rc1\x32\lib\netcdf.lib" -DBUILD_TESTING:BOOL=ON -INCLUDE="C:\Program 
> Files (x86)\netCDF 4.3.1-rc1\x32\include" ..\netcdf-fortran

I'm not much of a cmake expert, but you shouldn't have to specify the same 
directory 
redundantly for NETCDF_C_INCLUDE_DIR:FILEPATH and NETCDF_C_LIBRARY:FILEPATH, or 
even
specify those at all. 

I think both of those should be set properly if you just set
-DCMAKE_PREFIX_PATH="C:\Program Files (x86)\netCDF 4.3.1-rc1\x32".
You shouldn't need to specify a "-INCLUDE=" argument either, which 
I'm not familiar with and have never used with cmake.

Also, the -DENABLE_NETCDF_4:BOOL=ON is unnecessary, since it's the default.

We're hampered here, because I know only a little about cmake and Windows 
but can understand the Fortran issues.  Ward complements my expertise in
knowing a lot about cmake and Windows, but not much about Fortran.  So,
we'll try to work together to make some progress on getting this working,
but expect it to take some time ...

--Russ

> Don't actually result in CMAKE trying to link against the specified files. 
> For example, the 'linking against' line in CMAKE Summary is strangely empty? 
> I have similar problems on both my Mac and my Windows VM. I do now have HDF 
> and NETCDF-C libraries compiling properly in Windows, but I am trying to 
> compile the netCDF Fortran library against the installed binary netCDF C libs.
> 
> I am a bit lost and really need your help with this. CMAKE seems more like 
> cross platform obfuscation than anything else right now.
> 
> David Stuebe
> Scientist & Software Engineer – RPS ASA
> 
> 55 Village Square Drive
> South Kingstown, RI 02879-8248
> 
> Tel: +1 (401) 789-6224
> Email: address@hidden<mailto:address@hidden>
> www: asascience.com<http://www.asascience.com/> | 
> rpsgroup.com<http://www.rpsgroup.com/>
> 
> A member of the RPS Group plc
> 
> From: Unidata netCDF Support <address@hidden<mailto:address@hidden>>
> Reply-To: "address@hidden<mailto:address@hidden>" 
> <address@hidden<mailto:address@hidden>>
> Date: Tue, 13 Aug 2013 12:01:46 -0400
> To: David Stuebe <address@hidden<mailto:address@hidden>>
> Cc: Russ Rew <address@hidden<mailto:address@hidden>>
> Subject: [netCDF #HCI-914365]: Building NetCDF4 on Windows
> 
> Oops, I neglected to actually attach the output I promised when I wrote:
> - I've got the cmake build working OK on my Linux platform, using gcc
> and f95 (links to gfortran), though there are some warnings, and the
> "make install" doesn't complete yet, because the nf-config executable
> doesn't get built.  I've attached the output I get from running
> $ cmake .. -DCMAKE_INSTALL_PREFIX={NFDIR} -DCMAKE_PREFIX_PATH=${NCDIR}
> $ make
> $ make install
> in case that helps.
> 
> --Russ
> 
> Russ Rew                                         UCAR Unidata Program
> address@hidden<mailto:address@hidden>                      
> http://www.unidata.ucar.edu
> 
> 
> 
> Ticket Details
> ===================
> Ticket ID: HCI-914365
> Department: Support netCDF
> Priority: Normal
> Status: Closed
> 
> 
Russ Rew                                         UCAR Unidata Program
address@hidden                      http://www.unidata.ucar.edu



Ticket Details
===================
Ticket ID: HCI-914365
Department: Support netCDF
Priority: Normal
Status: Closed