Opened 8 years ago
Last modified 6 years ago
#4356 accepted defect
netCDF reader works on Linux, not on Windows
Reported by: | Owned by: | Adrian Pop | |
---|---|---|---|
Priority: | normal | Milestone: | Future |
Component: | *unknown* | Version: | v1.12.0 |
Keywords: | netCDF | Cc: |
Description
More or less a copy of this issue:
https://github.com/tbeu/netCDF-DataReader/issues/6
Not sure whether this has to be fixed on OM side or in the library, one of the two issues can be closed.
The netCDF library comes with three examples, all three work on Linux, but fail on Windows.
Tested with Windows 10 64 bit, OM 1.11 32 bit release and OM 1.12 64 bit nightly.
For the Simple example the error is:
[3] 10:30:07 Fehler Failed to write to file (not open) [4] 10:30:07 Übersetzung Fehler Template error: A template call failed (a call with 0 parameters: dladdr failed: not available on Windows). One possible reason could be that a template imported function call failed (which should not happen for functions called from within template code; templates preserve pure 'match'/non-failing semantics).
For the other two examples, the error is:
NMAKE : fatal error U1077: "cl": R�ckgabe-Code "0x2" Stop. Compilation process failed. Exited with code 2.
The full log is pasted here: http://pastebin.com/3k3e7LMB
Side note:
There seems to be some encoding wrong with the word R�ckgabe
Change History (11)
comment:1 by , 8 years ago
comment:5 by , 7 years ago
Owner: | changed from | to
---|---|
Status: | new → accepted |
On Windows we will need to:
- install the libnetcdf-dev library for gcc in msys2 shipped with the OM installation
- compile the libnetcdf library for msvc13, and add it to the OM installation together with the include headers
follow-up: 7 comment:6 by , 7 years ago
What, if I would load the functions from netcdf.dll at runtime on Win. This would avoid your build and install trouble, right?
comment:7 by , 7 years ago
Replying to tbc@…:
What, if I would load the functions from netcdf.dll at runtime on Win. This would avoid your build and install trouble, right?
I think that would work, however one might have issues with the different runtimes one of the process and the other one from the dll. However, if you don't send pointers through the C interface I think it should be fine.
comment:9 by , 6 years ago
any updates on this error? I still can't get the ncDataReader2 example files to run in OpenModelica
comment:10 by , 6 years ago
sullivbj, could you please specify your Windows version, 32/64bit, OpenModelica version, gcc version, and explain waht steps you tried (in sufficient detail to reproduce) and what error you are seeing?
comment:11 by , 6 years ago
System: Microsoft Windows 10 Home x64
Software: OMEdit v1.13.0-dev (64 bit)
Not sure how to check GCC version sorry
Steps to error
- I open the Simple example file (NcDataReader2.Examples.Simple).
- I attempt to run the example file using the simulate button.
Error information
The code compiles and the simulation output opens.
Some compiler output appears then red text appears saying "Warning: corrupt .drectve at end of def file".
Then a larger wall of text appears saying "undefined reference to 'security_check_cookie'" and "undefined reference to 'GSHandlerCheck'"
Let me know what you think or if you need any more information. Thanks for the reply.
I forgot: On windows, I tested gcc, msvc13 and msvc15.