[vtkusers] Build problem on x86_64 (AMD Opteron) machine.

Jan Kolar kolda at 3dgi.dk
Wed May 26 19:19:17 EDT 2004


Tom,

thanks for your advice, i've got further but still just to another error. 
It is again regarding relocation R_X86_64_32. To be honest, i do not 
exactly understand what does the -fPIC specify.

Building shared library 
/home/kolda/Installations/VTK/bin/libvtkRenderingJava.so...
/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.1/../../../../x86_64-suse-linux/bin/ld: 
/usr/lib64/libMesaGL.a(glapi.o): relocation R_X86_64_32 can not be used 
when making a shared object; recompile with -fPIC
/usr/lib64/libMesaGL.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[3]: *** [/home/kolda/Installations/VTK/bin/libvtkRenderingJava.so] 
Error 1
make[2]: *** [default_target] Error 2
make[1]: *** [default_target_Rendering] Error 2
make: *** [default_target] Error 2

I have -fPIC for all CFLAGS now. I think I am really close to the end 
since the other shared libraries has been build succesfully---this list of 
the bin directory after the error:

kolda at atlas:~/Installations/VTK> ls bin/
libvtkCommon.a          libvtkfreetype.a       libvtkIO.a         
libvtkzlib.a
libvtkCommonJava.so     libvtkftgl.a           libvtkIOJava.so    
mkg3states
libvtkDICOMParser.a     libvtkGraphics.a       libvtkjpeg.a       
vtkParseJava
libvtkexpat.a           libvtkGraphicsJava.so  libvtkpng.a        
vtkWrapJava
libvtkFiltering.a       libvtkImaging.a        libvtkRendering.a
libvtkFilteringJava.so  libvtkImagingJava.so   libvtktiff.a

any other ideas? --jan

On Wed, 26 May 2004 11:08:52 -0400, tom fogal <tfogal at apollo.sr.unh.edu> 
wrote:
> Jan,
>
> rerun ccmake and add '-fPIC' to all the CFLAGS variables. Make sure you 
> do a
> 'clean' build, so that all objects are rebuilt.
> In general, you should compile all of your 64bit libraries with -fPIC.
>
> HTH,
>
> -tom
>
>  <opr8kwif0op890gu at localhost>Jan Kolar writes:
>> I am trying to build VTK, as obtained recently form CVS, on x86_64
>> (Opteron) machine.
>> I cannot get over following error:
>>
>> Building shared library
>> /home/kolda/Installations/VTK/bin/libvtkCommonJava.so...
>> /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.1/../../../../x86_64-suse-linux/bin/l
>> d:
>> /home/kolda/Installations/VTK/bin/libvtkCommon.a(vtkAbstractMapper.o):
>> relocation R_X86_64_32 can not be used when making a shared object;
>> recompile with -fPIC
>> /home/kolda/Installations/VTK/bin/libvtkCommon.a: could not read 
>> symbols:
>> Bad value
>> collect2: ld returned 1 exit status
>> make[3]: *** [/home/kolda/Installations/VTK/bin/libvtkCommonJava.so] 
>> Error
>> 1
>> make[2]: *** [default_target] Error 2
>> make[1]: *** [default_target_Common] Error 2
>> make: *** [default_target] Error 2
>>
>> With the same settings in CMakeCache.txt but VTK_WRAP_JAVA:BOOL=OFF I 
>> make
>> a clean build. The CMakeCache.txt is pasted at the end of the message. 
>> Any
>> suggestion? 	--Jan



More information about the vtkusers mailing list