Error: Recompile with -fPIC when trying to ./configure && make package nap

349 Views Asked by At

I am trying to configure and make install package nap6.4 for tcl, but it fails in during "make" with the following error:

cc -shared  -o libnap6.4.so cart_proj.o eval_tree.o function.o geometry.o     land_flag.o land_flag_i.o linsys.o nap.o napChoice.o napDyad.o napDyadLib.o  napImgNAO.o napInit.o napLib.o napMonad.o napParse.tab.o napParseLib.o  napPolygon.o napSpatial.o nap_get.o nap_hdf.o nap_netcdf.o nap_ooc.o  triangulate.o  -L/usr/local/lib -lnetcdf -L/usr/local/lib -lmfhdf -ldf -ljpeg -lz  -L/usr/local/lib -lproj -L. -ltclstub8.4 -ltkstub8.4  -lieee -lm -lX11 
 /usr/bin/ld: /usr/local/lib/libmfhdf.a(mfsd.o): relocation R_X86_64_32    against  `.rodata.str1.1' can not be used when making a shared object; recompile   with - fPIC
 /usr/local/lib/libmfhdf.a: error adding symbols: Bad value
 collect2: error: ld returned 1 exit status
 make: *** [libnap6.4.so] Error 1

So I was told to recompile with -fPIC, which I did in the following way from the terminal:

export CFLAGS=-fPIC
./configure --prefix/lib/ActiveTcl --enable-shared
make

but this does not work. I have also tried with --disable-shared, make clean, and

export CFLAGS="-fPIC -DHAVE_NETCDF"/ export CFLAGS="-fPIC" etc..

along with other not-working versions of CFLAGS.

So I am wondering how do I recompile with -fPIC? Is there some special syntax that I'm missing here?

0

There are 0 best solutions below