recompile a lib with a fPIC flag set

Questions about applications and software
Forum rules
Before you post please read how to get help
Post Reply
richard-g8jvm
Level 3
Level 3
Posts: 111
Joined: Fri Jul 26, 2013 12:46 pm

recompile a lib with a fPIC flag set

Post by richard-g8jvm » Tue Jul 17, 2018 2:14 pm

Hi
Hit a snag with LM19 building an application
when compiling I get multiple errors when using a lib, with a gcc suggestion to recompile with -fPIC set
lots like this:-

Code: Select all

/usr/bin/x86_64-linux-gnu-ld: src/Hv_Lib_fftw/lin_x86_64/libfftw3v337_gcc482_thread_posix.a(r2cb_13.o): relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIC

So I used

Code: Select all

ar -t libfftw3v337_gcc482_thread_posix.a
That gives me a long list of object files
Could someone help with what I need to do the recompile this lib with the -fPIC flag set to satisfy the build.

This package compiles easily in LM18.3
As LM19 uses gcc7 , I have tried building with gcc4.8, but I get the same errors

Thanks

Post Reply

Return to “Software & Applications”