On 27.07.2026 22:21, David Niklas via ffmpeg-user wrote:
Hello,
I'm trying to compile ffmpeg 8.1.2 on Devuan (Debian) Linux. I got the
dependencies together.

When trying to compile it, I'm getting error's saying that I need to pass
-fPIC. I tried setting -fPIC in the CFLAGS and CXXFLAGS. I set
--enable-pic in the configure options.

But I still get the error. Here's an example:
/usr/bin/ld: /usr/local/lib/libaribcaption.a(renderer_capi.cpp.o): warning: 
relocation against `_ZSt7nothrow@@GLIBCXX_3.4' in read-only section `.text'
/usr/bin/ld: /usr/local/lib/libaribcaption.a(caption_capi.cpp.o): relocation 
R_X86_64_PC32 against symbol `_ZSt7nothrow@@GLIBCXX_3.4' can not be used when 
making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
make: *** [ffbuild/library.mak:136: libavcodec/libavcodec.so.62] Error 1

You cannot link non-PIC code into shared objects.
Most distributions build static libraries without PIC.
So you can only link them into executables, not shared objects.

Either build your own static libraries with PIC, or build ffmpeg in statically as well.

Attachment: OpenPGP_0xD85AAA6874B7507E.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

_______________________________________________
ffmpeg-user mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to