[CIG-SHORT] the netcdf option in pylith installer

Brad Aagaard baagaard at usgs.gov
Sat Jul 9 07:52:26 PDT 2011


Hongfeng-

This is likely a libtool issue. Some older libtool versions don't 
automatically add the -fPIC flag resulting in this type of error. The 
first thing to check is whether the library source files compiled with 
the -fPIC flag? If not, run
export CFLAGS=-fPIC CXXFLAGS=-fPIC FFLAGS=-fPIC
before running configure.

Brad

On 7/8/11 8:47 PM, Hongfeng Yang wrote:
> Hi all,
>
> I have been running the pylith installer to build pylith on my linux
> workstation. But I failed in building netcdf4.1.1 after the
> configuration. It seems to relate to the fortran compiler and/or
> libraries. Error message is the following:
>
> libtool: link: gfortran -shared  .libs/fort-attio.o .libs/fort-control.o
> .libs/fort-dim.o .libs/fort-genatt.o .libs/fort-geninq.o
> .libs/fort-genvar.o .libs/fort-lib.o .libs/fort-misc.o
> .libs/fort-v2compat.o .libs/fort-vario.o .libs/fort-var1io.o
> .libs/fort-varaio.o .libs/fort-varmio.o .libs/fort-varsio.o
> -Wl,--whole-archive ../f90/.libs/libnetcdff90.a -Wl,--no-whole-archive
> -Wl,-rpath -Wl,/home/hyang/cig/build/netcdf-build/libsrc/.libs
> -Wl,-rpath -Wl,/home/hyang/pylith/lib -L/lib -L/home/hyang/pylith/lib
> ../libsrc/.libs/libnetcdf.so
> -L/opt/intel/composerxe-2011.4.191/compiler/lib/intel64
> -L/opt/intel/composerxe-2011.4.191/mkl/lib/intel64
> -L/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2
> -L/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/../../..
> -L/usr/lib/x86_64-linux-gnu -lgfortran -lm -lc -lgcc_s    -Wl,-soname
> -Wl,libnetcdff.so.4 -o .libs/libnetcdff.so.4.0.0
> /usr/bin/ld: ../f90/.libs/libnetcdff90.a(netcdf.o): relocation
> R_X86_64_32 against `.bss' can not be used when making a shared object;
> recompile with -fPIC
> ../f90/.libs/libnetcdff90.a(netcdf.o): could not read symbols: Bad value
>
> I have tried gfortran and ifort as the fortran compiler. Both of them
> give the same error.
>
> Have anyone experienced this kind of error in building pylith?
>
> My OS is Ubuntu 11.04.
>
> Thanks,
>
> Hongfeng Yang
>
>



More information about the CIG-SHORT mailing list