help-octave
[Top][All Lists]
Advanced

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

Re: install netcdf package


From: Alexander Barth
Subject: Re: install netcdf package
Date: Tue, 1 Dec 2015 22:10:04 +0100

Hi Clinton,

On Sat, Nov 28, 2015 at 12:30 AM, Clinton Winant <address@hidden> wrote:
Hi Alexander, Dmitri and all the others.

Yes I did install netcdf manually because I need it to run with a 4 dimensional hydrodynamics model (ROMS).  That program runs with MPI, and users are instructed to compile netcdf with static libraries.  Since octave wants (requires?) netcdf with shared libraries, I have two sets of libraries.  Those in /usr/local/netcdf are the shared version:
address@hidden:~$ ls /usr/local/netcdf/lib
libnetcdf.a   libnetcdf.settings  libnetcdf.so.7      pkgconfig
libnetcdf.la  libnetcdf.so        libnetcdf.so.7.2.0
Can you confirm that to be compatible with octave netcdf must be installed as shared libraries?

I don't know why the octave-netcdf package would need netcdf as a shared library. Did you obtain an error message when you compile it against a static netCDF library?  Just be aware of these two potential issues:

http://modb.oce.ulg.ac.be/mediawiki/index.php/Octave-netcdf#recompile_with_-fPIC
http://modb.oce.ulg.ac.be/mediawiki/index.php/Octave-netcdf#HDF5_library_version_mismatched_error

 

Might this suggest that those who built the octave package for ubuntu 15.10 forgot something that is supplied in the ncview package???????????
By installing ncview, you installed the netcdf libraries (at its default location) which was then found by the build process.
 


After uninstalling the netcdf package from octave, I tried setting paths as Alexander suggested, octave would not rebuild the package, but the error is different this time:

address@hidden:~$ export PATH=/usr/local/netcdf/bin:$PATH
address@hidden:~$ export LD_LIBRARY_PATH=/usr/local/netcdf/lib:$LD_LIBRARY_PATH
address@hidden:~$ octave --no-gui
GNU Octave, version 4.0.0
[...]
copyfile /tmp/oct-IOav7L/netcdf/src/__netcdf__.oct /tmp/oct-IOav7L/netcdf/inst/x86_64-pc-linux-gnu-api-v50+
/home/cdw/octave/netcdf-1.0.7/x86_64-pc-linux-gnu-api-v50+/__netcdf__.oct: failed to load: /home/cdw/octave/netcdf-1.0.7/x86_64-pc-linux-gnu-api-v50+/__netcdf__.oct: undefined symbol: nc_set_chunk_cache
error: called from 'doc_cache_create>create_cache' in file /usr/share/octave/4.0.0/m/help/doc_cache_create.m near line 106, column 18
>>

This is very strange. The function nc_set_chunk_cache should be defined in the netcdf library. Can you give me the output of:

locate libnetcdf.a
locate libnetcdf.so

(or use find / -name libnetcdf.a if locate is not set-up)
and for every libnetcdf.a give the result of ;

nm /path/to/libnetcdf.a | grep nc_set_chunk_cache

and for every shared library, the result of:
 
nm -D /path/to/libnetcdf.so | grep nc_set_chunk_cache

On my system these commands return the following which shows that nc_set_chunk_cache is well defined in the netCDF library.
00000000000913d0 T nc_set_chunk_cache
0000000000091460 T nc_set_chunk_cache_ints

Can you also tell me how you configured netcdf when you compiled it from source by providing all options of the ./configure script and the file config.log?
 

If you actually get this far, please know that I am very, very grateful for your efforts, and those of the octave devellopers.  My work would not bepossible without this
Thank you for your kind words!

Regards,
Alex
 

On Fri, Nov 27, 2015 at 12:55 PM, Alexander Barth <address@hidden> wrote:
Dear Clinton,


It seems that you have installed netcdf manually by setting the option --prefix to /usr/local/netcdf, can you confirm?
Otherwise (i.e. without the prefix option) libnetcdf.so.7 would go to /usr/local/lib (and not /usr/local/netcdf/lib as in your case), as far as I know.

The linker knows about the libraries in /usr/local/lib, but not about /usr/local/netcdf/lib therefore the library is not found.

Does it work when you set in a shell these variables before starting octave?
export PATH=/usr/local/netcdf/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/netcdf/lib:$LD_LIBRARY_PATH

Regards,
Alex

On Thu, Nov 26, 2015 at 9:41 PM, Dmitri A. Sergatskov <address@hidden> wrote:
On Thu, Nov 26, 2015 at 12:27 PM, Clinton Winant <address@hidden> wrote:


machine:  hp z210, OS Ubuntu 15.10 Octave 4.4.4 



​It appears to me that you have stuff installed in ​some non-standard places.
Did you compile/installed Octave from source yourself?

​I do not know Ubuntu well, but expect it to provide those package pre-compiled.​

 
​Dmitri.
--


_______________________________________________
Help-octave mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/help-octave





reply via email to

[Prev in Thread] Current Thread [Next in Thread]