This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2564MODA: Bluetopia build fails due to fPIC

Part Number: CC2564MODA

Hi

I would like to build Bluetopia stack.

Host is Linux x86_64. Target is Linux on ARM 32 bit.

Toolchain is 10.3-2021.07 from arm developer.

The problem occurs in the following step during compilation:

LN BTPMSRVR_S.o libBTPM_S.a libBTPM_HAL_S.a libSS1BTAUD.a libSS1BTGAV.a libSS1BTAVC.a libSS1BTAVR.a libSS1SBC.a libSS1BTFTP.a libSS1BTHDP.a libSS1BTHDS.a libSS1BTHIDH.a libSS1BTHID.a libSS1BTPBA.a libSS1BTHFR.a libSS1BTMAP.a libSS1BTOPP.a libSS1BTCTS.a libSS1BTNDCS.a libSS1BTRTUS.a libSS1BTDIS.a libSS1BTGAT.a libSS1BTGAPS.a libSS1BTHIDS.a libSS1BTNDC.a libSS1BTRTU.a libSS1BTIAS.a libSS1BTHRS.a libSS1BTSCP.a libSS1BTLLS.a libSS1BTBAS.a libSS1BTTPS.a libBTPS.a libBTPS_PLA.a libBTPS_OSA.a -o SS1BTPM

The problem is:

/opt/arm-buildroot-linux-gnueabihf_sdk-buildroot/opt/ext-toolchain/bin/../lib/gcc/arm-none-linux-gnueabihf/10.3.1/../../../../arm-none-linux-gnueabihf/bin/ld: ../BluetopiaPM/lib/libBTPM_S.a(BTPMMAIN_S.o): relocation R_ARM_MOVW_ABS_NC against `a local symbol' can not be used when making a shared object; recompile with -fPIC

... many similar logs


/opt/arm-buildroot-linux-gnueabihf_sdk-buildroot/opt/ext-toolchain/bin/../lib/gcc/arm-none-linux-gnueabihf/10.3.1/../../../../arm-none-linux-gnueabihf/bin/ld: ../BluetopiaPM/Bluetopia/lib/libBTPS.a(LOCKFILE.o): relocation R_ARM_MOVW_ABS_NC against `a local symbol' can not be used when making a shared object; recompile with -fPIC
collect2: fatal error: ld terminated with signal 11 [Segmentation fault], core dumped
compilation terminated.
proj/plat-rules.mak:101: recipe for target '../BluetopiaPM/bin/SS1BTPM' failed
make: *** [../BluetopiaPM/bin/SS1BTPM] Error 1

I have set the -fPIC flag for compiler. But the same issue still occurs.
Could someone help me? Thank you in advance!

With best regards,

Milan