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

I also tried omitting -fPIC in the CFLAGS and CXXFLAGS (which are set to
-O2 -march=native.)
# nice -n19 make -j1
...
LDXX    libswscale/libswscale.so.9
lto-wrapper: warning: using serial compilation of 12 LTRANS jobs
lto-wrapper: note: see the -flto option documentation for more information
/usr/bin/ld: /tmp/cc45MPxC.ltrans8.ltrans.o: relocation R_X86_64_32S against 
`.text.unlikely' can not be used when making a shared object; recompile with 
-fPIC
/usr/bin/ld: failed to set dynamic section sizes: bad value
collect2: error: ld returned 1 exit status
make: *** [ffbuild/library.mak:136: libswscale/libswscale.so.9] Error 1

I'm really lost as to what could be going wrong here. I even see -fPIC
pop-up on htop while the compile job is running.

Any idea how to pass fPIC or avoid having to do so?

Thanks!

PS: If you need the full config log and the configure command I can
attach them. They're quite long.
_______________________________________________
ffmpeg-user mailing list [email protected]
To unsubscribe send an email [email protected]
Make sure all the libraries needed to build ffmpeg are shared libraries instead of static libraries.

It looks like you are trying to compile a static library (libaribcaption.a) into a shared build, which does not work, install (or build) the shared version of that library.

When building ffmpeg with shared libraries, make sure all dependencies are also built as shared libraries.
_______________________________________________
ffmpeg-user mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to