Libav linking issue


I am attempting to link libav into an Android application. I used pkgconfig in a CMakeLists.txt in a way that works for all the other packages I am linking, but I get this error:

ld: error: relocation R_AARCH64_ADD_ABS_LO12_NC cannot be used against symbol ff_cos_16384; recompile with -fPIC

From what I can tell from folks who have had this error in other situations, I have to recompile libav with -fPIC flag. I found the source code, is it possible to compile for Android architectures on a Mac M1 machine? Could there be another solution? I just need to decode an h264 stream. What is this strange error? Thanks

Can you create an issue in GitLab about this with some more details about which versions you’re using and how to reproduce this? Thanks!

Done here: libav possible overflow error when linking on android (#3348) · Issues · GStreamer / gstreamer · GitLab

Thank you.

1 Like