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
Copyright (C) 2015 John W. Eaton and others.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. For details, type 'warranty'.
Octave was configured for "x86_64-pc-linux-gnu".
Additional information about Octave is available at
http://www.octave.org.
Please contribute if you find this software useful.
For more information, visit
http://www.octave.org/get-involved.htmlRead
http://www.octave.org/bugs.html to learn how to submit bug reports.
For information about changes from previous versions, type 'news'.
warning: function /home/cdw/Software/Octave/cdw/clabel.m shadows a core library function
warning: called from
/home/cdw/.octaverc at line 1 column 1
warning: function /home/cdw/Software/Octave/DAT/demo.m shadows a core library function
>> pkg list
no packages installed.
>> pkg install -verbose -forge -auto netcdf
mkdir (/tmp/oct-IOav7L)
untar (/home/cdw/netcdf-1.0.7.tar.gz, /tmp/oct-IOav7L)
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for mkoctfile... /usr/bin/mkoctfile --verbose
checking for octave-config... /usr/bin/octave-config
g++ -c -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-4.0.0/octave/.. -I/usr/include/octave-4.0.0/octave -I/usr/include/hdf5/serial -I/usr/include/mpi -pthread -fopenmp -g -O2 -fstack-protector-strong -Wformat -Werror=format-security conftest.cc -o conftest.o
g++ -shared -Wl,-Bsymbolic -o conftest.oct conftest.o -L/usr/lib/x86_64-linux-gnu/octave/4.0.0 -L/usr/lib/x86_64-linux-gnu -loctinterp -loctave -Wl,-Bsymbolic-functions -Wl,-z,relro
checking for F77_FUNC... g++ -c -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-4.0.0/octave/.. -I/usr/include/octave-4.0.0/octave -I/usr/include/hdf5/serial -I/usr/include/mpi -pthread -fopenmp -g -O2 -fstack-protector-strong -Wformat -Werror=format-security conftest.cc -o conftest.o
yes
checking for octave... /usr/bin/octave
checking for VERSION in octave-config... 4.0.0
checking for CANONICAL_HOST_TYPE in octave-config... x86_64-pc-linux-gnu
checking for SHLEXT in octave-config... so
checking whether ln -s works... yes
checking for ranlib... ranlib
checking for strip... strip
checking for nc-config... nc-config
configure: creating ./config.status
config.status: creating Makeconf
"$prefix" is /home/cdw/octave/netcdf-1.0.7
"$exec_prefix" is ${prefix}
octave commands will install into the following directories:
m-files: /usr/share/octave/4.0.0/site/m/octave-forge
oct-files: /usr/lib/x86_64-linux-gnu/octave/4.0.0/site/oct/x86_64-pc-linux-gnu/octave-forge
binaries: /usr/lib/x86_64-linux-gnu/octave/4.0.0/site/exec/x86_64-pc-linux-gnu
alternatives:
m-files: /usr/share/octave/4.0.0/site/octave-forge-alternatives/m
oct-files: /usr/lib/x86_64-linux-gnu/octave/4.0.0/site/octave-forge-alternatives/oct/x86_64-pc-linux-gnu
shell commands will install into the following directories:
binaries: ${exec_prefix}/bin
man pages: ${datarootdir}/man
libraries: ${exec_prefix}/lib
headers: ${prefix}/include
octave-forge is configured with
octave: /usr/bin/octave (version 4.0.0)
mkoctfile: /usr/bin/mkoctfile --verbose for Octave 0
octave-config: /usr/bin/octave-config for Octave 0
netCDF compiler flags: -I/usr/local/netcdf/include
netCDF libraries: -L/usr/local/netcdf/lib -lnetcdf
make: Entering directory '/tmp/oct-IOav7L/netcdf/src'
/usr/bin/mkoctfile --verbose -DHAVE_OCTAVE_ -v -I/usr/local/netcdf/include __netcdf__.cc -L/usr/local/netcdf/lib -lnetcdf
g++ -c -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-4.0.0/octave/.. -I/usr/include/octave-4.0.0/octave -I/usr/include/hdf5/serial -I/usr/include/mpi -pthread -fopenmp -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -I/usr/local/netcdf/include -DHAVE_OCTAVE_ __netcdf__.cc -o __netcdf__.o
g++ -shared -Wl,-Bsymbolic -o __netcdf__.oct __netcdf__.o -L/usr/local/netcdf/lib -lnetcdf -L/usr/lib/x86_64-linux-gnu/octave/4.0.0 -L/usr/lib/x86_64-linux-gnu -loctinterp -loctave -Wl,-Bsymbolic-functions -Wl,-z,relro
make: Leaving directory '/tmp/oct-IOav7L/netcdf/src'
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
>>
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