<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">On 3/12/2013 6:52 AM, Bjoern Drabeck
wrote:<br>
</div>
<blockquote
cite="mid:CAMcjQ__OZQATvmmh5b1sbbweLv5bCuDk8_BwSBKvDvYrxO+Nxg@mail.gmail.com"
type="cite"><br>
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">
> I have got that to build, however compared to builds<br>
> from the zeranoe site (and also builds I have asked a<br>
> friend of mine to make for me using mingw with gcc),<br>
> I always end up with seeking problems.<br>
<br>
</div>
This is surprising.<br>
Are you sure that you are testing the same versions?<br>
</blockquote>
<div><br>
</div>
<div>I have downloaded the zeranoe build marked as 1.1.3 and I
also got <a moz-do-not-send="true"
href="http://ffmpeg.org/releases/ffmpeg-1.1.3.tar.bz2">http://ffmpeg.org/releases/ffmpeg-1.1.3.tar.bz2</a>
and built that myself.. so I would say it's the same version.
However I got the same problem with previous versions too
(tried 1.0.1, and 1.1 for example). </div>
<div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
Did you try to disable optimizations?<br>
<div class="im"><br>
</div>
</blockquote>
<div>For some reason I get build errors as soon as I
use --disable-optimizations:</div>
<div><br>
</div>
<div>
<div><font color="#000099">LD<span class="Apple-tab-span"
style="white-space:pre"> </span>libavutil/avutil-52.dll</font></div>
<div><font color="#000099"> Creating library
libavutil/avutil.lib and object libavutil/avutil.exp</font></div>
<div><font color="#000099">cpu.o : error LNK2019: unresolved
external symbol _ff_get_cpu_flags_ppc referenced in
function _av_get_cpu_flags</font></div>
<div><font color="#000099">cpu.o : error LNK2019: unresolved
external symbol _ff_get_cpu_flags_arm referenced in
function _av_get_cpu_flags</font></div>
<div><font color="#000099">libavutil/avutil-52.dll : fatal
error LNK1120: 2 unresolved externals</font></div>
<div><font color="#000099">make: *** [libavutil/avutil-52.dll]
Error 1</font></div>
</div>
<div><br>
</div>
<div>If I don't disable optimizations I don't get that and it
builds fine... but no idea about that (I have never really
looked into the ffmpeg code except for the public headers)</div>
<div><br>
</div>
</div>
</blockquote>
<br>
<br>
Parts of ffmpeg source code assume the compiler will remove the body
of a conditional if the condition is always false, for example from
libavutil.c/av_get_cpu_flags():<br>
<br>
int av_get_cpu_flags(void)<br>
{<br>
if (checked)<br>
return flags;<br>
<br>
if (ARCH_ARM) flags = ff_get_cpu_flags_arm();<br>
if (ARCH_PPC) flags = ff_get_cpu_flags_ppc();<br>
if (ARCH_X86) flags = ff_get_cpu_flags_x86();<br>
<br>
checked = 1;<br>
return flags;<br>
}<br>
<br>
<br>
If ARCH_ARM is the constant 0, the code assumes this reference to
ff_get_cpu_flags_arm() will disappear. Treats that as an
optimization, so if you turn off optimizations, the compiler will
generate code to call ff_get_cpu_flags_arm, but that function won't
exist if ARCH_ARM is false.<br>
<br>
To get around that, I've used flags like these to compile a less
optimized version for testing purposes:<br>
<br>
--toolchain=msvc --optflags='-Zi -Og -Oy- -arch:SSE2'
--extra-cflags='-Gy -MDd' --extra-ldflags='-OPT:REF -DEBUG -VERBOSE'
--enable-shared <br>
<br>
I've been using VC10. The thing that's handy for me is that it
generates .pdb files (via the -Zi flag) and I can mostly step
through code with the VC10 debugger.<br>
<br>
I had to modify the config.mak to get rid of some conflicting flags,
running the configuration script would add -Z7 (which contradicts
-Zi). It also would add -Oy which is the opposite of -Oy-, so I
manually removed it.<br>
<br>
--Johno<br>
<br>
</body>
</html>