[vtkusers] compilation with -fPIC necessary?

Sebastiaan sebastia at ch.its.tudelft.nl
Thu Mar 16 17:04:17 EST 2006


Hi,

I tried to compile VTK 5 and VTK CVS (for referencing) on an EMT64
system. I have no problems with compiling VTK on i386 and amd64, but
this time the build quits with:

(...)
Building CXX object Parallel/CMakeFiles/vtkParallel.dir/vtkMPICommunicator.o
Building CXX object Parallel/CMakeFiles/vtkParallel.dir/vtkMPIController.o
Building CXX object Parallel/CMakeFiles/vtkParallel.dir/vtkMPIGroup.o
Building CXX object Parallel/CMakeFiles/vtkParallel.dir/vtkParallelInstantiator.o
Linking CXX shared library ../bin/libvtkParallel.so
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: 
/usr/X11R6/lib64/libmpich.a(isend.o): relocation R_X86_64_32 against `a local symbol'
can not be used when making a shared object; recompile with -fPIC
/usr/X11R6/lib64/libmpich.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[2]: *** [bin/libvtkParallel.so] Error 1
make[1]: *** [Parallel/CMakeFiles/vtkParallel.dir/all] Error 2
make: *** [all] Error 2


Recompiling with -fPIC does not work: I get the same error. Recompiling 
mpich with -fPIC and then VTK with -fPIC seems to compiles clean (but I 
do not know if VTK is build correctly).

Generally, compiling with -fPIC is 'not done'. Should I file this as a 
bug?

Greetz,
Sebastiaan



More information about the vtkusers mailing list