<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
thanks all for reply. i could fix it by giving -cc="gcc -m64 -fPIC" compiler flags. seems like PIC is needed.</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Libav-user <libav-user-bounces@ffmpeg.org> on behalf of David Rappo <davidr@lens-immersive.com><br>
<b>Sent:</b> Wednesday, March 24, 2021 5:48 PM<br>
<b>To:</b> This list is about using libavcodec, libavformat, libavutil, libavdevice and libavfilter. <libav-user@ffmpeg.org><br>
<b>Subject:</b> Re: [Libav-user] ffmpeg compilation failing when trying to build shared lib</font>
<div> </div>
</div>
<div>
<div dir="ltr">Not sure if it will make a difference but you could try adding --disable-static.</div>
<br>
<div class="x_gmail_quote">
<div dir="ltr" class="x_gmail_attr">On Thu, Mar 25, 2021 at 8:32 AM Kumar, Abhijeet <<a href="mailto:amk7371@psu.edu">amk7371@psu.edu</a>> wrote:<br>
</div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
hi, i'm trying to build as a dynamic library but compilation fails can you help??<br>
</div>
<div>
<div dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<div><br>
</div>
<div>[amk7371@e5-cse-204-02 FFmpeg]$ ./configure --prefix=/home/mdl/amk7371/video_analytics/FFmpeg_x64<span style="background-color:rgb(255,255,0)"> --enable-shared --disable-x86asm --enable-gpl --enable-pic</span></div>
<div><br>
</div>
<div><span style="background-color:rgb(255,255,255); display:inline">     ^</span>
<div style="margin:0px; background-color:rgb(255,255,255)">GEN libavdevice/libavdevice.ver</div>
<div style="margin:0px; background-color:rgb(255,255,255)">GEN libavfilter/libavfilter.ver</div>
<div style="margin:0px; background-color:rgb(255,255,255)">AR libavdevice/libavdevice.a</div>
<div style="margin:0px; background-color:rgb(255,255,255)">GEN libswscale/libswscale.ver</div>
<div style="margin:0px; background-color:rgb(255,255,255)">GEN libavutil/libavutil.ver</div>
<div style="margin:0px; background-color:rgb(255,255,255)">GEN libpostproc/libpostproc.ver</div>
<div style="margin:0px; background-color:rgb(255,255,255)">GEN libavformat/libavformat.ver</div>
<div style="margin:0px; background-color:rgb(255,255,255)">GEN libavcodec/libavcodec.ver</div>
<div style="margin:0px; background-color:rgb(255,255,255)">GEN libswresample/libswresample.ver</div>
<div style="margin:0px; background-color:rgb(255,255,255)">AR libswresample/libswresample.a</div>
<div style="margin:0px; background-color:rgb(255,255,255)">MAN doc/ffprobe-all.1</div>
<div style="margin:0px; background-color:rgb(255,255,255)">AR libavcodec/libavcodec.a</div>
<div style="margin:0px; background-color:rgb(255,255,255)">LD libavutil/libavutil.so.56</div>
<div style="margin:0px; background-color:rgb(255,255,255)">LD libswscale/libswscale.so.5</div>
<div style="margin:0px; background-color:rgb(255,255,255)">LD libpostproc/libpostproc.so.55</div>
<div style="margin:0px; background-color:rgb(255,255,255)">LD libswresample/libswresample.so.3</div>
<div style="margin:0px; background-color:rgb(255,255,255)"><span style="background-color:rgb(255,255,0)">LD libavcodec/libavcodec.so.58</span></div>
<div style="margin:0px; background-color:rgb(255,255,255)"><span style="background-color:rgb(255,255,0)">/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</span></div>
<div style="margin:0px; background-color:rgb(255,255,255)"><span style="background-color:rgb(255,255,0)">/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</span></div>
<div style="margin:0px; background-color:rgb(255,255,255)"><span style="background-color:rgb(255,255,0)">/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</span></div>
<div style="margin:0px; background-color:rgb(255,255,255)"><span style="background-color:rgb(255,255,0)">/usr/bin/ld: final link failed: Nonrepresentable section on output</span></div>
<div style="margin:0px; background-color:rgb(255,255,255)">collect2: error: ld returned 1 exit status</div>
<div style="margin:0px; background-color:rgb(255,255,255)">make: *** [libavcodec/libavcodec.so.58] Error 1</div>
<span style="margin:0px; background-color:rgb(255,255,255)">make: *** Waiting for unfinished jobs....</span><br>
</div>
<div><br>
</div>
<br>
</div>
</div>
</div>
</div>
_______________________________________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org" target="_blank">Libav-user@ffmpeg.org</a><br>
<a href="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" originalsrc="https://ffmpeg.org/mailman/listinfo/libav-user" shash="UO7BC5kmhcpYToJ6m2fKhfsVsNDr7G1I31SNljzSXHfgvDxeG1/Q9d4UXP4K7KJduXlws6F12V7wCVcwMbypoQOZI0CMDa9yVAJ+FFJbyjs2UksYTYBE80ZdVuFjuP+X96WKGyiozA8LQDE2rueKnG7l4Wc4Vo5vmmGdA3Wp+Us=" rel="noreferrer" target="_blank">https://ffmpeg.org/mailman/listinfo/libav-user</a><br>
<br>
To unsubscribe, visit link above, or email<br>
<a href="mailto:libav-user-request@ffmpeg.org" target="_blank">libav-user-request@ffmpeg.org</a> with subject "unsubscribe".</blockquote>
</div>
</div>
</body>
</html>