Hi All,
I am trying to install ncview i64 on fedora core 5 64 bit with matlab 7 (r14)
64 bit but I have recieved next message:
/usr/bin/ld: /usr/local/lib/libnetcdf.a(attr.o): relocation R_X86_64_32
against `a local symbol' can not be used when making a shared object;
recompile with -fPIC
/usr/local/lib/libnetcdf.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
mex: link of 'mexnc.mexa64' failed.
I found some recommendation here:
http://mexcdf.sourceforge.net/downloads/source.html
but it does not match with my case.
I will appreciate if somebody help me.
Thanks in advance,
Dmitry.
mexnc-i64 with matlab7(r14) and FedoraCore5 64 bit
Are you using the source distribution or a binary distribution?
You must recompile the netcdf library, so you need the source distribution...
I use the the 3.6.1 version of netcdf, and the things seems to be a little different in the 3.6.2 release.
In the 3.6.2 version you must edit the "Makefile.in" file, find the string (line 126)
and change it by
Then you compile it with (in the netcdf source dir):
Note that you can make a specific matlab netcdf compilation and put it in a specific dir,
by done (for example):
then, at the end of the "mexopts.sh" you must match the correct dir (in the example,
"/home/myuser/netcdf_matlab")
You must recompile the netcdf library, so you need the source distribution...
I use the the 3.6.1 version of netcdf, and the things seems to be a little different in the 3.6.2 release.
In the 3.6.2 version you must edit the "Makefile.in" file, find the string
Code: Select all
"CFLAGS = @CFLAGS@"
and change it by
Code: Select all
"CFLAGS = -fPIC @CFLAGS@"
Code: Select all
./configure
make
make install
by done (for example):
Code: Select all
./configure --prefix=/home/myuser/netcdf_matlab
"/home/myuser/netcdf_matlab")