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?

有帮助吗?

解决方案

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

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top