zlib
zlib copied to clipboard
Fix the problem of using static library linking
@madler: What do you think?
Cross-compiling to static libraries on Android platforms requires this option for linking and compiling. ndk-android ./configure --static
@madler: Can you look this PR?
fixed this:https://github.com/madler/zlib/issues/882
Thanks. Applied, though avoiding double -fPIC
's.
This actually resolved an issue I was having for days, it was very similar to the one referenced on #882:
lib/libz.a(zutil.o): relocation R_X86_64_PC32 against symbol `z_errmsg' can not be used when making a shared object; recompile with -fPIC
I don't know much about the double -fPIC
but it surely did some trick.
PS: I've tried configure with CHOST, --static
, tried to build with cmake and a bunch of other things, but this was the actual solution.
PSS: Sorry for commenting in a closed PR, but this was such a relief to find, that I felt that was going to be worth sharing my experience.