Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Posts: 93
Registered: ‎05-31-2012
My Device: BlackBerry Playbook
My Carrier: Bell
Accepted Solution

Relocation linker errors after update to SDK 10.2?

Hello BBRY devs,


Anyone experienced relaction linker errors after upgrading to NDK 10.2 when linking to internally build static libraries to executable?


/Applications/Momentics.app/host_10_2_0_15/darwin/x86/usr/bin/ntoarm-ld: ../../../../../Engine/lib/blackberry/Device-Release/libEngine.a(VMUtil.o): relocation R_ARM_THM_MOVW_ABS_NC against `a local symbol' can not be used when making a shared object; recompile with -fPIC

../../../../../Engine/lib/blackberry/Device-Release/libEngine.a: could not read symbols: Bad value


Recompiling static libraries with -fPIC seems to resolve the issue, however, curious why this has just creeped up. Perhaps old project files using different default compiler settings?




BlackBerry Development Advisor
Posts: 143
Registered: ‎03-08-2012
My Device: Z10
My Carrier: Bell

Re: Relocation linker errors after update to SDK 10.2?



That is a likely scenario.  There was a change back in 10.1 that had t be resolved with -fPIC but only more recent IDEs use templates that account for it properly.