# rodata can not be used when making a PIE object

**URL:** <https://discourse.slicer.org/t/rodata-can-not-be-used-when-making-a-pie-object/6314>\
**Category:** Development\
**Tags:** build\
**Created:** [March 28, 2019, 2:59am UTC](https://discourse.slicer.org/t/rodata-can-not-be-used-when-making-a-pie-object/6314 "2019-03-28T02:59:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zhiy](https://avatars.discourse-cdn.com/v4/letter/z/0ea827/32.png) [@Zhiy](https://discourse.slicer.org/u/Zhiy)\
**Post date:** [March 28, 2019, 2:59am UTC](https://discourse.slicer.org/t/rodata-can-not-be-used-when-making-a-pie-object/6314/1 "2019-03-28T02:59:58Z")

</div>

Dear all,  
Any one built Slicer with gcc/g++ 7.3 before. I am hitting errors like  
/usr/bin/ld: CMakeFiles/vtkParseJava.dir/vtkParseJava.c.o: relocation R\_X86\_64\_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../../lib/libvtkWrappingTools-8.2.a(vtkParseMain.c.o): relocation R_X86_64_32 against`.rodata’ can not be used when making a PIE object; recompile with -fPIC  
/usr/bin/ld: …/…/lib/libvtkWrappingTools-8.2.a(vtkParseString.c.o): relocation R\_X86\_64\_32S against symbol `parse_charbits' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../../lib/libvtkWrappingTools-8.2.a(vtkParseHierarchy.c.o): relocation R_X86_64_32 against`.text’ can not be used when making a PIE object; recompile with -fPIC  
/usr/bin/ld: …/…/lib/libvtkWrappingTools-8.2.a(vtkParsePreprocess.c.o): relocation R\_X86\_64\_32S against symbol `parse_charbits' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../../lib/libvtkWrappingTools-8.2.a(vtkWrap.c.o): relocation R_X86_64_32 against`.rodata’ can not be used when making a PIE object; recompile with -fPIC  
/usr/bin/ld: …/…/lib/libvtkWrappingTools-8.2.a(vtkParseMerge.c.o): relocation R\_X86\_64\_32 against `.rodata’ can not be used when making a PIE object; recompile with -fPIC

I am suspecting it’s caused by compilers version.
