Open hsucw opened 8 years ago
Appreciate for the bug report !
Could you patch the compilation flag:
LOCAL_LDFLAGS += -fPIC
in /engine/Android.mk
and try again?
In my environment, it can work with the added flag.
If it also works in your machine, a patch is welcome!
If the previous configuration does not work,
could you switch to this flag and try again?
LOCAL_DISABLE_FATAL_LINKER_WARNINGS = true
Currently the assembly code in engine/arch/x86 is not written as "Position Independent" style.
Though we can turn off the warning with some aggressive flags, it is still not a super good solution.
I start to rewrite the assembly. The issue should be solved in these days.
On OS X, I try to build the libProbeDroid.so Everything is fine until the linker get error
[x86] Compile : ProbeDroid <= debug.c ... [x86] Compile++ : ProbeDroid <= org_probedroid_instrument.cc [x86] SharedLibrary : libProbeDroid.so /IGNORED_PATH/../../../../i686-linux-android/bin/ld: warning: shared library text segment is not shareable /IGNORED_PATH/i686-linux-android/bin/ld: error: treating warnings as errors collect2: error: ld returned 1 exit status make: *** [/..../ProbeDroid/engine/obj/local/x86/libProbeDroid.so] Error 1
Some one suggested that adding
LOCAL_LDFLAGS := --no-warn-shared-textrel
However, it is not helpful under my environment. I am using ndk-r11, and get the following message
[x86] SharedLibrary : libProbeDroid.so i686-linux-android-g++: error: unrecognized command line option '--no-warn-shared-textrel' make: *** [/.../ProbeDroid/engine/obj/local/x86/libProbeDroid.so] Error 1
Should the compile flag add
-fPIC
? or any idea?