thanks all for reply. i could fix it by giving -cc="gcc -m64 -fPIC" compiler flags. seems like PIC is needed. ________________________________ From: Libav-user <[email protected]> on behalf of David Rappo <[email protected]> Sent: Wednesday, March 24, 2021 5:48 PM To: This list is about using libavcodec, libavformat, libavutil, libavdevice and libavfilter. <[email protected]> Subject: Re: [Libav-user] ffmpeg compilation failing when trying to build shared lib
Not sure if it will make a difference but you could try adding --disable-static. On Thu, Mar 25, 2021 at 8:32 AM Kumar, Abhijeet <[email protected]<mailto:[email protected]>> wrote: hi, i'm trying to build as a dynamic library but compilation fails can you help?? [amk7371@e5-cse-204-02 FFmpeg]$ ./configure --prefix=/home/mdl/amk7371/video_analytics/FFmpeg_x64 --enable-shared --disable-x86asm --enable-gpl --enable-pic ^ GEN libavdevice/libavdevice.ver GEN libavfilter/libavfilter.ver AR libavdevice/libavdevice.a GEN libswscale/libswscale.ver GEN libavutil/libavutil.ver GEN libpostproc/libpostproc.ver GEN libavformat/libavformat.ver GEN libavcodec/libavcodec.ver GEN libswresample/libswresample.ver AR libswresample/libswresample.a MAN doc/ffprobe-all.1 AR libavcodec/libavcodec.a LD libavutil/libavutil.so.56 LD libswscale/libswscale.so.5 LD libpostproc/libpostproc.so.55 LD libswresample/libswresample.so.3 LD libavcodec/libavcodec.so.58 /usr/bin/ld: libavcodec/mqc.o: relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: libavcodec/mqcdec.o: relocation R_X86_64_32S against undefined symbol `ff_mqc_qe' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: libavcodec/svq13.o: relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: final link failed: Nonrepresentable section on output collect2: error: ld returned 1 exit status make: *** [libavcodec/libavcodec.so.58] Error 1 make: *** Waiting for unfinished jobs.... _______________________________________________ Libav-user mailing list [email protected]<mailto:[email protected]> https://ffmpeg.org/mailman/listinfo/libav-user<https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fffmpeg.org%2Fmailman%2Flistinfo%2Flibav-user&data=04%7C01%7Camk7371%40psu.edu%7Cfd5f4394eb334227cceb08d8ef130064%7C7cf48d453ddb4389a9c1c115526eb52e%7C0%7C1%7C637522212187873542%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=gKCckcPrnuR7bKCLYVQ%2FB1C73uxJgzNta8ObCuY2RyM%3D&reserved=0> To unsubscribe, visit link above, or email [email protected]<mailto:[email protected]> with subject "unsubscribe".
_______________________________________________ Libav-user mailing list [email protected] https://ffmpeg.org/mailman/listinfo/libav-user To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
