recompile a lib with a fPIC flag set

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
richard-g8jvm
Level 4
Level 4
Posts: 272
Joined: Fri Jul 26, 2013 12:46 pm

recompile a lib with a fPIC flag set

Post by richard-g8jvm »

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
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Locked

Return to “Software & Applications”