Hi,
I'm trying to build some shared libraries with the Linaro Android toolchain. For all of my libraries I get the following errors from the linker:
|BlaBla.cpp.o: requires unsupported dynamic reloc R_ARM_REL32; recompile with -fPIC
/home/dev/android/android_linaro_toolchain/libexec/gcc/arm-linux-androideabi/4.7.1/real-ld: error: hidden symbol '__dso_handle' is not defined locally |
I'm using -fPIC in the compiler's flags so I'm not sure why the linker is complaining. The |__dso_handle| error is supposed to have been fixed in the NDKr6. I tried the Linaro 4.7.1(2012.05) toolchain, the one available for download, one of the daily builds from Linaro of the same toolchain(the one from Friday last week) and I also rebuilt entirely the toolchain from source but with the same results. I found a bug report in the launchpad(https://bugs.launchpad.net/igloocommunity/+bug/1000200) which pretty much describes exactly the same problem but unfortunately none of the observations made there helped(I do have -fPIC in the compilation flags, I do not have any assembly source and I rebuilt the toolchain from source).
Does anyone have any hints on how to fix or overcome the problem?
Thanks,
Marius
On 18 June 2012 21:14, Marius Cetateanu mce@softkinetic.com wrote:
Hi,
I'm trying to build some shared libraries with the Linaro Android toolchain. For all of my libraries I get the following errors from the linker:
|BlaBla.cpp.o: requires unsupported dynamic reloc R_ARM_REL32; recompile with -fPIC
/home/dev/android/android_linaro_toolchain/libexec/gcc/arm-linux-androideabi/4.7.1/real-ld: error: hidden symbol '__dso_handle' is not defined locally |
I'm using -fPIC in the compiler's flags so I'm not sure why the linker is complaining. The |__dso_handle| error is supposed to have been fixed in the NDKr6. I tried the Linaro 4.7.1(2012.05) toolchain, the one available for download, one of the daily builds from Linaro of the same toolchain(the one from Friday last week) and I also rebuilt entirely the toolchain from source but with the same results. I found a bug report in the launchpad(https://bugs.launchpad.net/igloocommunity/+bug/1000200) which pretty much describes exactly the same problem but unfortunately none of the observations made there helped(I do have -fPIC in the compilation flags, I do not have any assembly source and I rebuilt the toolchain from source).
Does anyone have any hints on how to fix or overcome the problem?
Hi Marius. I've cc'ed this to the linaro-android list. They might be able to help.
-- Michael
On 06/18/2012 11:30 PM, Michael Hope wrote:
On 18 June 2012 21:14, Marius Cetateanumce@softkinetic.com wrote:
Hi,
I'm trying to build some shared libraries with the Linaro Android toolchain. For all of my libraries I get the following errors from the linker:
|BlaBla.cpp.o: requires unsupported dynamic reloc R_ARM_REL32; recompile with -fPIC
/home/dev/android/android_linaro_toolchain/libexec/gcc/arm-linux-androideabi/4.7.1/real-ld: error: hidden symbol '__dso_handle' is not defined locally |
I'm using -fPIC in the compiler's flags so I'm not sure why the linker is complaining. The |__dso_handle| error is supposed to have been fixed in the NDKr6. I tried the Linaro 4.7.1(2012.05) toolchain, the one available for download, one of the daily builds from Linaro of the same toolchain(the one from Friday last week) and I also rebuilt entirely the toolchain from source but with the same results. I found a bug report in the launchpad(https://bugs.launchpad.net/igloocommunity/+bug/1000200) which pretty much describes exactly the same problem but unfortunately none of the observations made there helped(I do have -fPIC in the compilation flags, I do not have any assembly source and I rebuilt the toolchain from source).
Does anyone have any hints on how to fix or overcome the problem?
Hi Marius. I've cc'ed this to the linaro-android list. They might be able to help.
-- Michael
Hi Michael,
Thanks a lot.
Just a couple of more details: - the source code base builds fine with the Android Linaro toolchain 4.6 (Linaro GCC 4.6-2012.05) 4.6.4 20120508. - for the build of the 4.7.1 toolchain I've done on my machine I applied the Linaro specific gcc patches
-- Marius
linaro-toolchain@lists.linaro.org