cedadev / jasmin_scivm

9 stars 0 forks source link

fix Octave not finding octcdf #32

Closed alaniwi closed 8 years ago

alaniwi commented 9 years ago

Octave is not finding octcdf:

octave-4.0.0-1.ceda.el6.x86_64
octave-octcdf-1.1.8-1.ceda.el6.x86_64

octave:1> nctest
error: 'nctest' undefined near line 1 column 1
octave:1> addpath("/usr/share/octave/packages/octcdf-1.1.8")
octave:2> nctest
writing test output to nctest.log
>>>>> /usr/share/octave/packages/octcdf-1.1.8/nctest.m
PASSES 1 out of 23 tests

and yet with (soon to be) previous version, it works without setting the path:

octave-3.6.4-1.ceda.x86_64
octave-octcdf-1.1.5-1.ceda.el6.x86_64

octave:1> nctest
writing test output to nctest.log
>>>>> /usr/share/octave/packages/octcdf-1.1.5/nctest.m
n = /tmp/oct-WnpZnX-octcdf.nc
PASSES 23 out of 23 tests
alaniwi commented 9 years ago

Upgrade still happening - just documented for users, not a big enough reason not to upgrade.

Retry jenkins test once fixed.

alaniwi commented 8 years ago

Some unsuccessful investigation with strace - /usr/share/octave/4.0.0/m/pkg/private/load_packages.m is being read, and so is /usr/share/octave/octave_packages, which references octcdf, but clearly it is not working. From strace, it is trying and failing to find /usr/share/octave/packages/octcdf-1.1.8/packinfo/.autoload, which may perhaps be relevant.

It also turns out that octcdf is deprecated, and we should use instead netcdf (http://octave.sourceforge.net/netcdf/). This appears to build okay, but suffers from the same issue regarding needing an explicit addpath, and also I do not know if the package really works because I have yet to investigate how to test it.

alaniwi commented 8 years ago

The /usr/share/octave/packages/octcdf-1.1.8/packinfo/.autoload is the solution. Now fixed (line added to spec to create the .autoload). Moved the netcdf package to new ticket #54.