Question

I am facing this issue where i am trying to build a native library for an android app. For that i have a static library (.a), which gets linked into a dynamic library (.so). Now the problem is that the static library is too large (more than 2 GB). And when i compile the dynamic library, it tries to link with the static library and it fails with the below error:

d:/adt/android-ndk-r9c/toolchains/arm-linux-androideabi-4.8/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld.exe: fatal error: E:\lib\libapplogic.a: pread failed: Invalid argument

Has anyone faced this? Resolution?

Was it helpful?

Solution

For others facing this problem: I was able to link the binary using the --no-map-whole-files option.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top