Closed GoogleCodeExporter closed 9 years ago
I've got the same problem.
...
Scanning dependencies of target ocustorage
[ 27%] Building CXX object ocustorage/CMakeFiles/ocustorage.dir/grid2dhost.cpp.o
[ 28%] Building CXX object ocustorage/CMakeFiles/ocustorage.dir/grid3d.cpp.o
[ 30%] Building CXX object ocustorage/CMakeFiles/ocustorage.dir/grid3dops.cpp.o
[ 31%] Building CXX object ocustorage/CMakeFiles/ocustorage.dir/gridnetcdf.cpp.o
/home/marcel/Desktop/opencurrent/src/ocustorage/gridnetcdf.cpp: In member
function ‘bool ocu::NetCDFGrid3DWriter::open(const char*, int, int, int,
float, float, float)’:
/home/marcel/Desktop/opencurrent/src/ocustorage/gridnetcdf.cpp:204: error:
‘NC_NETCDF4’ was not declared in this scope
/home/marcel/Desktop/opencurrent/src/ocustorage/gridnetcdf.cpp: In member
function ‘bool ocu::NetCDFGrid3DWriter::define_variable(const char*, nc_type,
ocu::GridStaggering, float, float, float)’:
/home/marcel/Desktop/opencurrent/src/ocustorage/gridnetcdf.cpp:281: error:
‘nc_def_var_deflate’ was not declared in this scope
/home/marcel/Desktop/opencurrent/src/ocustorage/gridnetcdf.cpp: In member
function ‘bool ocu::NetCDFGrid3DReader::open(const char*)’:
/home/marcel/Desktop/opencurrent/src/ocustorage/gridnetcdf.cpp:492: error:
‘nc_inq_varids’ was not declared in this scope
Original comment by MarcelSc...@googlemail.com
on 19 Jan 2011 at 1:49
I turned off NETCDF4 support and it compiles ok
It seems that cmake unable to find netcdf4 libraries
Original comment by zagoruy...@gmail.com
on 19 Jan 2011 at 2:03
Thanks for the quick reply! Where can I set the flag to disable netcdf?
I solved the above issue by compiling and installing a current version of
netCDF and setting the cmake build parameters accordingly. Now I get the
following error during the build process:
...
Scanning dependencies of target incompress
[ 65%] Building CXX object apps/CMakeFiles/incompress.dir/incompress.cpp.o
Linking CXX executable incompress
../ocustorage/libocustorage.a(gridnetcdf.cpp.o): In function
`ocu::NetCDFGrid3DWriter::define_variable(char const*, int,
ocu::GridStaggering, float, float, float)':
gridnetcdf.cpp:(.text+0x14cb): undefined reference to `nc_def_var_deflate'
../ocustorage/libocustorage.a(gridnetcdf.cpp.o): In function
`ocu::NetCDFGrid3DReader::open(char const*)':
gridnetcdf.cpp:(.text+0x23b3): undefined reference to `nc_inq_varids'
gridnetcdf.cpp:(.text+0x2416): undefined reference to `nc_inq_varids'
collect2: ld returned 1 exit status
Original comment by MarcelSc...@googlemail.com
on 19 Jan 2011 at 2:18
You can set the variable
OCU_NETCDF4_SUPPORT_ENABLED
to
FALSE
and it will disable all NetCDF support.
There is something messed up with the apt-get version of netcdf4. As far as I
can tell, it is not actually the version 4 api, which is what causes this issue.
The solution is to replace netcdf support with something like HDF5, but I
haven't had time to do that yet.
-Jon
Original comment by jcohen.p...@gmail.com
on 19 Jan 2011 at 2:34
All right, just found the option in System.cmake. The build process now
finished successfully.
Thanks
Marcel
Original comment by MarcelSc...@googlemail.com
on 19 Jan 2011 at 2:37
Sorry, I meant to say that setting
OCU_NETCDF_ENABLED
to
FALSE
disables all netcdf support.
You can also tell OpenCurrent to use the version 3.6 API, which should work,
via the variable I (incorrectly) provided above:
OCU_NETCDF4_SUPPORT_ENABLED
to
FALSE
-Jon
Original comment by jcohen.p...@gmail.com
on 19 Jan 2011 at 2:37
Original comment by jcohen.p...@gmail.com
on 21 Feb 2011 at 11:52
Original issue reported on code.google.com by
zagoruy...@gmail.com
on 23 Oct 2010 at 8:42