Hi Alex, Dmitri
I began by removing + autoremoving ncview, since I did not want that to throw out false positives.
I also moved all netcdf folders on /usr/local
then:
./configure --prefix=/usr/local/netcdf --disable-netcdf-4 --disable-dap --enable-static=yes --enable-shared=no
make check everything pass
sudo make install followed by
address@hidden:/HOME/cdw/Software/netcdf/C$ ls -la /usr/local/netcdf
total 24
drwxr-xr-x 6 root root 4096 Dec 1 16:29 .
drwxr-xr-x 12 root root 4096 Dec 1 16:29 ..
drwxr-xr-x 2 root root 4096 Dec 1 16:29 bin
drwxr-xr-x 2 root root 4096 Dec 1 16:29 include
drwxr-xr-x 3 root root 4096 Dec 1 16:29 lib
drwxr-xr-x 3 root root 4096 Dec 1 16:29 share
export PATH=/usr/local/netcdf/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/netcdf/lib:$LD_LIBRARY_PATH
then
address@hidden:~$ !oct
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
..............................lots of checkings..
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 -lm
make: Entering directory '/tmp/oct-zyFucm/netcdf/src'
/usr/bin/mkoctfile --verbose -DHAVE_OCTAVE_ -v -I/usr/local/netcdf/include __netcdf__.cc -L/usr/local/netcdf/lib -lnetcdf -lm
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 -lm -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
/usr/bin/ld: /usr/local/netcdf/lib/libnetcdf.a(libdispatch_la-dcopy.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/local/netcdf/lib/libnetcdf.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
Makefile:24: recipe for target '__netcdf__.oct' failed
make: *** [__netcdf__.oct] Error 1
make: Leaving directory '/tmp/oct-zyFucm/netcdf/src'
pkg: error running `make' for the netcdf package.
error: called from 'configure_make' in file /usr/share/octave/4.0.0/m/pkg/private/configure_make.m near line 96, column 9
>>quit
then
address@hidden:~$ locate libnetcdf.a
/HOME/cdw/Roms/netcdf/lib/libnetcdf.a
/HOME/cdw/Software/netcdf/C/liblib/.libs/libnetcdf.a
/usr/local/netcdf/lib/libnetcdf.a
address@hidden:~$ nm /HOME/cdw/Roms/netcdf/lib/libnetcdf.a | grep nc_set_chunk_cache
address@hidden:~$ nm /HOME/cdw/Software/netcdf/C/liblib/.libs/libnetcdf.a | grep nc_set_chunk_cache
address@hidden:~$ nm /usr/local/netcdf/lib/libnetcdf.a | grep address@hidden:~$ NO OUTPUT ON ANY OF THESE 3
then
address@hidden:~$ locate libnetcdf.so
/HOME/cdw/Roms/netcdf/lib/libnetcdf.so
/HOME/cdw/Roms/netcdf/lib/libnetcdf.so.7
/HOME/cdw/Roms/netcdf/lib/libnetcdf.so.7.2.0
/HOME/cdw/Software/netcdf/C/liblib/.libs/libnetcdf.so
/HOME/cdw/Software/netcdf/C/liblib/.libs/libnetcdf.so.7
/HOME/cdw/Software/netcdf/C/liblib/.libs/libnetcdf.so.7.2.0
/usr/local/netcdf/lib/libnetcdf.so
/usr/local/netcdf/lib/libnetcdf.so.7
/usr/local/netcdf/lib/libnetcdf.so.7.2.0
address@hidden:~$ nm -D /HOME/cdw/Roms/netcdf/lib/libnetcdf.so | grep nc_set_chunk_cache
address@hidden:~$ nm -D /HOME/cdw/Roms/netcdf/lib/libnetcdf.so | grep nc_set_chunk_cache
address@hidden:~$ nm -D /HOME/cdw/Roms/netcdf/lib/libnetcdf.so.7 | grep nc_set_chunk_cache
address@hidden:~$ nm -D /HOME/cdw/Roms/netcdf/lib/libnetcdf.so.7.2.0 | grep nc_set_chunk_cache
address@hidden:~$ same for next 3 on /HOME/ then
address@hidden:~$ nm -D /usr/local/netcdf/lib/libnetcdf.so | grep nc_set_chunk_cache
nm: '/usr/local/netcdf/lib/libnetcdf.so': No such file
address@hidden:~$ nm -D /usr/local/netcdf/lib/libnetcdf.so.7 | grep nc_set_chunk_cache
nm: '/usr/local/netcdf/lib/libnetcdf.so.7': No such file
address@hidden:~$ nm -D /usr/local/netcdf/lib/libnetcdf.so.7.2.0 | grep nc_set_chunk_cache
nm: '/usr/local/netcdf/lib/libnetcdf.so.7.2.0': No such file
So obviously there is a big problem here, since the results are so very different from yours. I regret that I don't know enough to undestand what I have done wrong!