]> git.sesse.net Git - casparcg/blob - dependencies64/ffmpeg/doc/platform.html
Fixed bug in server shut down.
[casparcg] / dependencies64 / ffmpeg / doc / platform.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 <html>
3 <!-- Created by GNU Texinfo 5.2, http://www.gnu.org/software/texinfo/ -->
4   <head>
5     <meta charset="utf-8">
6     <title>
7       Platform Specific Information
8     </title>
9     <meta name="viewport" content="width=device-width,initial-scale=1.0">
10     <link rel="stylesheet" type="text/css" href="bootstrap.min.css">
11     <link rel="stylesheet" type="text/css" href="style.min.css">
12   </head>
13   <body>
14     <div style="width: 95%; margin: auto">
15       <h1>
16       Platform Specific Information
17       </h1>
18 <div align="center">
19 </div>
20
21
22 <a name="SEC_Top"></a>
23
24 <a name="SEC_Contents"></a>
25 <h2 class="contents-heading">Table of Contents</h2>
26
27 <div class="contents">
28
29 <ul class="no-bullet">
30   <li><a name="toc-Unix_002dlike" href="#Unix_002dlike">1 Unix-like</a>
31   <ul class="no-bullet">
32     <li><a name="toc-Advanced-linking-configuration" href="#Advanced-linking-configuration">1.1 Advanced linking configuration</a></li>
33     <li><a name="toc-BSD" href="#BSD">1.2 BSD</a></li>
34     <li><a name="toc-_0028Open_0029Solaris" href="#g_t_0028Open_0029Solaris">1.3 (Open)Solaris</a></li>
35     <li><a name="toc-Darwin-_0028Mac-OS-X_002c-iPhone_0029" href="#Darwin-_0028Mac-OS-X_002c-iPhone_0029">1.4 Darwin (Mac OS X, iPhone)</a></li>
36   </ul></li>
37   <li><a name="toc-DOS" href="#DOS">2 DOS</a></li>
38   <li><a name="toc-OS_002f2" href="#OS_002f2">3 OS/2</a></li>
39   <li><a name="toc-Windows" href="#Windows">4 Windows</a>
40   <ul class="no-bullet">
41     <li><a name="toc-Native-Windows-compilation-using-MinGW-or-MinGW_002dw64" href="#Native-Windows-compilation-using-MinGW-or-MinGW_002dw64">4.1 Native Windows compilation using MinGW or MinGW-w64</a></li>
42     <li><a name="toc-Microsoft-Visual-C_002b_002b-or-Intel-C_002b_002b-Compiler-for-Windows" href="#Microsoft-Visual-C_002b_002b-or-Intel-C_002b_002b-Compiler-for-Windows">4.2 Microsoft Visual C++ or Intel C++ Compiler for Windows</a>
43     <ul class="no-bullet">
44       <li><a name="toc-Linking-to-FFmpeg-with-Microsoft-Visual-C_002b_002b" href="#Linking-to-FFmpeg-with-Microsoft-Visual-C_002b_002b">4.2.1 Linking to FFmpeg with Microsoft Visual C++</a></li>
45     </ul></li>
46     <li><a name="toc-Cross-compilation-for-Windows-with-Linux-1" href="#Cross-compilation-for-Windows-with-Linux-1">4.3 Cross compilation for Windows with Linux</a></li>
47     <li><a name="toc-Compilation-under-Cygwin" href="#Compilation-under-Cygwin">4.4 Compilation under Cygwin</a></li>
48     <li><a name="toc-Crosscompilation-for-Windows-under-Cygwin" href="#Crosscompilation-for-Windows-under-Cygwin">4.5 Crosscompilation for Windows under Cygwin</a></li>
49   </ul></li>
50   <li><a name="toc-Plan-9" href="#Plan-9">5 Plan 9</a></li>
51 </ul>
52 </div>
53
54
55 <a name="Unix_002dlike"></a>
56 <h2 class="chapter">1 Unix-like<span class="pull-right"><a class="anchor hidden-xs" href="#Unix_002dlike" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Unix_002dlike" aria-hidden="true">TOC</a></span></h2>
57
58 <p>Some parts of FFmpeg cannot be built with version 2.15 of the GNU
59 assembler which is still provided by a few AMD64 distributions. To
60 make sure your compiler really uses the required version of gas
61 after a binutils upgrade, run:
62 </p>
63 <div class="example">
64 <pre class="example">$(gcc -print-prog-name=as) --version
65 </pre></div>
66
67 <p>If not, then you should install a different compiler that has no
68 hard-coded path to gas. In the worst case pass <code>--disable-asm</code>
69 to configure.
70 </p>
71 <a name="Advanced-linking-configuration"></a>
72 <h3 class="section">1.1 Advanced linking configuration<span class="pull-right"><a class="anchor hidden-xs" href="#Advanced-linking-configuration" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Advanced-linking-configuration" aria-hidden="true">TOC</a></span></h3>
73
74 <p>If you compiled FFmpeg libraries statically and you want to use them to
75 build your own shared library, you may need to force PIC support (with
76 <code>--enable-pic</code> during FFmpeg configure) and add the following option
77 to your project LDFLAGS:
78 </p>
79 <div class="example">
80 <pre class="example">-Wl,-Bsymbolic
81 </pre></div>
82
83 <p>If your target platform requires position independent binaries, you should
84 pass the correct linking flag (e.g. <code>-pie</code>) to <code>--extra-ldexeflags</code>.
85 </p>
86 <a name="BSD"></a>
87 <h3 class="section">1.2 BSD<span class="pull-right"><a class="anchor hidden-xs" href="#BSD" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-BSD" aria-hidden="true">TOC</a></span></h3>
88
89 <p>BSD make will not build FFmpeg, you need to install and use GNU Make
90 (<code>gmake</code>).
91 </p>
92 <a name="g_t_0028Open_0029Solaris"></a>
93 <h3 class="section">1.3 (Open)Solaris<span class="pull-right"><a class="anchor hidden-xs" href="#_0028Open_0029Solaris" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-_0028Open_0029Solaris" aria-hidden="true">TOC</a></span></h3>
94
95 <p>GNU Make is required to build FFmpeg, so you have to invoke (<code>gmake</code>),
96 standard Solaris Make will not work. When building with a non-c99 front-end
97 (gcc, generic suncc) add either <code>--extra-libs=/usr/lib/values-xpg6.o</code>
98 or <code>--extra-libs=/usr/lib/64/values-xpg6.o</code> to the configure options
99 since the libc is not c99-compliant by default. The probes performed by
100 configure may raise an exception leading to the death of configure itself
101 due to a bug in the system shell. Simply invoke a different shell such as
102 bash directly to work around this:
103 </p>
104 <div class="example">
105 <pre class="example">bash ./configure
106 </pre></div>
107
108 <a name="Darwin"></a><a name="Darwin-_0028Mac-OS-X_002c-iPhone_0029"></a>
109 <h3 class="section">1.4 Darwin (Mac OS X, iPhone)<span class="pull-right"><a class="anchor hidden-xs" href="#Darwin-_0028Mac-OS-X_002c-iPhone_0029" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Darwin-_0028Mac-OS-X_002c-iPhone_0029" aria-hidden="true">TOC</a></span></h3>
110
111 <p>The toolchain provided with Xcode is sufficient to build the basic
112 unacelerated code.
113 </p>
114 <p>Mac OS X on PowerPC or ARM (iPhone) requires a preprocessor from
115 <a href="https://github.com/FFmpeg/gas-preprocessor">https://github.com/FFmpeg/gas-preprocessor</a> or
116 <a href="https://github.com/yuvi/gas-preprocessor">https://github.com/yuvi/gas-preprocessor</a>(currently outdated) to build the optimized
117 assembly functions. Put the Perl script somewhere
118 in your PATH, FFmpeg&rsquo;s configure will pick it up automatically.
119 </p>
120 <p>Mac OS X on amd64 and x86 requires <code>yasm</code> to build most of the
121 optimized assembly functions. <a href="http://www.finkproject.org/">Fink</a>,
122 <a href="http://www.gentoo.org/proj/en/gentoo-alt/prefix/bootstrap-macos.xml">Gentoo Prefix</a>,
123 <a href="https://mxcl.github.com/homebrew/">Homebrew</a>
124 or <a href="http://www.macports.org">MacPorts</a> can easily provide it.
125 </p>
126
127 <a name="DOS"></a>
128 <h2 class="chapter">2 DOS<span class="pull-right"><a class="anchor hidden-xs" href="#DOS" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-DOS" aria-hidden="true">TOC</a></span></h2>
129
130 <p>Using a cross-compiler is preferred for various reasons.
131 <a href="http://www.delorie.com/howto/djgpp/linux-x-djgpp.html">http://www.delorie.com/howto/djgpp/linux-x-djgpp.html</a>
132 </p>
133
134 <a name="OS_002f2"></a>
135 <h2 class="chapter">3 OS/2<span class="pull-right"><a class="anchor hidden-xs" href="#OS_002f2" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-OS_002f2" aria-hidden="true">TOC</a></span></h2>
136
137 <p>For information about compiling FFmpeg on OS/2 see
138 <a href="http://www.edm2.com/index.php/FFmpeg">http://www.edm2.com/index.php/FFmpeg</a>.
139 </p>
140
141 <a name="Windows"></a>
142 <h2 class="chapter">4 Windows<span class="pull-right"><a class="anchor hidden-xs" href="#Windows" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Windows" aria-hidden="true">TOC</a></span></h2>
143
144 <p>To get help and instructions for building FFmpeg under Windows, check out
145 the FFmpeg Windows Help Forum at <a href="http://ffmpeg.zeranoe.com/forum/">http://ffmpeg.zeranoe.com/forum/</a>.
146 </p>
147 <a name="Native-Windows-compilation-using-MinGW-or-MinGW_002dw64"></a>
148 <h3 class="section">4.1 Native Windows compilation using MinGW or MinGW-w64<span class="pull-right"><a class="anchor hidden-xs" href="#Native-Windows-compilation-using-MinGW-or-MinGW_002dw64" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Native-Windows-compilation-using-MinGW-or-MinGW_002dw64" aria-hidden="true">TOC</a></span></h3>
149
150 <p>FFmpeg can be built to run natively on Windows using the MinGW-w64
151 toolchain. Install the latest versions of MSYS2 and MinGW-w64 from
152 <a href="http://msys2.github.io/">http://msys2.github.io/</a> and/or <a href="http://mingw-w64.sourceforge.net/">http://mingw-w64.sourceforge.net/</a>.
153 You can find detailed installation instructions in the download section and
154 the FAQ.
155 </p>
156 <p>Notes:
157 </p>
158 <ul>
159 <li> Building natively using MSYS2 can be sped up by disabling implicit rules
160 in the Makefile by calling <code>make -r</code> instead of plain <code>make</code>. This
161 speed up is close to non-existent for normal one-off builds and is only
162 noticeable when running make for a second time (for example during
163 <code>make install</code>).
164
165 </li><li> In order to compile FFplay, you must have the MinGW development library
166 of <a href="http://www.libsdl.org/">SDL</a> and <code>pkg-config</code> installed.
167
168 </li><li> By using <code>./configure --enable-shared</code> when configuring FFmpeg,
169 you can build the FFmpeg libraries (e.g. libavutil, libavcodec,
170 libavformat) as DLLs.
171
172 </li></ul>
173
174 <a name="Microsoft-Visual-C_002b_002b-or-Intel-C_002b_002b-Compiler-for-Windows"></a>
175 <h3 class="section">4.2 Microsoft Visual C++ or Intel C++ Compiler for Windows<span class="pull-right"><a class="anchor hidden-xs" href="#Microsoft-Visual-C_002b_002b-or-Intel-C_002b_002b-Compiler-for-Windows" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Microsoft-Visual-C_002b_002b-or-Intel-C_002b_002b-Compiler-for-Windows" aria-hidden="true">TOC</a></span></h3>
176
177 <p>FFmpeg can be built with MSVC 2012 or earlier using a C99-to-C89 conversion utility
178 and wrapper, or with MSVC 2013 and ICL natively.
179 </p>
180 <p>You will need the following prerequisites:
181 </p>
182 <ul>
183 <li> <a href="https://github.com/libav/c99-to-c89/">C99-to-C89 Converter &amp; Wrapper</a>
184 (if using MSVC 2012 or earlier)
185 </li><li> <a href="http://code.google.com/p/msinttypes/">msinttypes</a>
186 (if using MSVC 2012 or earlier)
187 </li><li> <a href="http://msys2.github.io/">MSYS2</a>
188 </li><li> <a href="http://yasm.tortall.net/">YASM</a>
189 (Also available via MSYS2&rsquo;s package manager.)
190 </li></ul>
191
192 <p>To set up a proper environment in MSYS2, you need to run <code>msys_shell.bat</code> from
193 the Visual Studio or Intel Compiler command prompt.
194 </p>
195 <p>Place <code>yasm.exe</code> somewhere in your <code>PATH</code>. If using MSVC 2012 or
196 earlier, place <code>c99wrap.exe</code> and <code>c99conv.exe</code> somewhere in your
197 <code>PATH</code> as well.
198 </p>
199 <p>Next, make sure any other headers and libs you want to use, such as zlib, are
200 located in a spot that the compiler can see. Do so by modifying the <code>LIB</code>
201 and <code>INCLUDE</code> environment variables to include the <strong>Windows-style</strong>
202 paths to these directories. Alternatively, you can try and use the
203 <code>--extra-cflags</code>/<code>--extra-ldflags</code> configure options. If using MSVC
204 2012 or earlier, place <code>inttypes.h</code> somewhere the compiler can see too.
205 </p>
206 <p>Finally, run:
207 </p>
208 <div class="example">
209 <pre class="example">For MSVC:
210 ./configure --toolchain=msvc
211
212 For ICL:
213 ./configure --toolchain=icl
214
215 make
216 make install
217 </pre></div>
218
219 <p>If you wish to compile shared libraries, add <code>--enable-shared</code> to your
220 configure options. Note that due to the way MSVC and ICL handle DLL imports and
221 exports, you cannot compile static and shared libraries at the same time, and
222 enabling shared libraries will automatically disable the static ones.
223 </p>
224 <p>Notes:
225 </p>
226 <ul>
227 <li> It is possible that coreutils&rsquo; <code>link.exe</code> conflicts with MSVC&rsquo;s linker.
228 You can find out by running <code>which link</code> to see which <code>link.exe</code> you
229 are using. If it is located at <code>/bin/link.exe</code>, then you have the wrong one
230 in your <code>PATH</code>. Either move or remove that copy, or make sure MSVC&rsquo;s
231 <code>link.exe</code> takes precedence in your <code>PATH</code> over coreutils&rsquo;.
232
233 </li><li> If you wish to build with zlib support, you will have to grab a compatible
234 zlib binary from somewhere, with an MSVC import lib, or if you wish to link
235 statically, you can follow the instructions below to build a compatible
236 <code>zlib.lib</code> with MSVC. Regardless of which method you use, you must still
237 follow step 3, or compilation will fail.
238 <ol>
239 <li> Grab the <a href="http://zlib.net/">zlib sources</a>.
240 </li><li> Edit <code>win32/Makefile.msc</code> so that it uses -MT instead of -MD, since
241 this is how FFmpeg is built as well.
242 </li><li> Edit <code>zconf.h</code> and remove its inclusion of <code>unistd.h</code>. This gets
243 erroneously included when building FFmpeg.
244 </li><li> Run <code>nmake -f win32/Makefile.msc</code>.
245 </li><li> Move <code>zlib.lib</code>, <code>zconf.h</code>, and <code>zlib.h</code> to somewhere MSVC
246 can see.
247 </li></ol>
248
249 </li><li> FFmpeg has been tested with the following on i686 and x86_64:
250 <ul>
251 <li> Visual Studio 2010 Pro and Express
252 </li><li> Visual Studio 2012 Pro and Express
253 </li><li> Visual Studio 2013 Pro and Express
254 </li><li> Intel Composer XE 2013
255 </li><li> Intel Composer XE 2013 SP1
256 </li></ul>
257 <p>Anything else is not officially supported.
258 </p>
259 </li></ul>
260
261 <a name="Linking-to-FFmpeg-with-Microsoft-Visual-C_002b_002b"></a>
262 <h4 class="subsection">4.2.1 Linking to FFmpeg with Microsoft Visual C++<span class="pull-right"><a class="anchor hidden-xs" href="#Linking-to-FFmpeg-with-Microsoft-Visual-C_002b_002b" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Linking-to-FFmpeg-with-Microsoft-Visual-C_002b_002b" aria-hidden="true">TOC</a></span></h4>
263
264 <p>If you plan to link with MSVC-built static libraries, you will need
265 to make sure you have <code>Runtime Library</code> set to
266 <code>Multi-threaded (/MT)</code> in your project&rsquo;s settings.
267 </p>
268 <p>You will need to define <code>inline</code> to something MSVC understands:
269 </p><div class="example">
270 <pre class="example">#define inline __inline
271 </pre></div>
272
273 <p>Also note, that as stated in <strong>Microsoft Visual C++</strong>, you will need
274 an MSVC-compatible <a href="http://code.google.com/p/msinttypes/">inttypes.h</a>.
275 </p>
276 <p>If you plan on using import libraries created by dlltool, you must
277 set <code>References</code> to <code>No (/OPT:NOREF)</code> under the linker optimization
278 settings, otherwise the resulting binaries will fail during runtime.
279 This is not required when using import libraries generated by <code>lib.exe</code>.
280 This issue is reported upstream at
281 <a href="http://sourceware.org/bugzilla/show_bug.cgi?id=12633">http://sourceware.org/bugzilla/show_bug.cgi?id=12633</a>.
282 </p>
283 <p>To create import libraries that work with the <code>/OPT:REF</code> option
284 (which is enabled by default in Release mode), follow these steps:
285 </p>
286 <ol>
287 <li> Open the <em>Visual Studio Command Prompt</em>.
288
289 <p>Alternatively, in a normal command line prompt, call <samp>vcvars32.bat</samp>
290 which sets up the environment variables for the Visual C++ tools
291 (the standard location for this file is something like
292 <samp>C:\Program Files (x86_\Microsoft Visual Studio 10.0\VC\bin\vcvars32.bat</samp>).
293 </p>
294 </li><li> Enter the <samp>bin</samp> directory where the created LIB and DLL files
295 are stored.
296
297 </li><li> Generate new import libraries with <code>lib.exe</code>:
298
299 <div class="example">
300 <pre class="example">lib /machine:i386 /def:..\lib\foo-version.def  /out:foo.lib
301 </pre></div>
302
303 <p>Replace <code>foo-version</code> and <code>foo</code> with the respective library names.
304 </p>
305 </li></ol>
306
307 <a name="Cross-compilation-for-Windows-with-Linux"></a><a name="Cross-compilation-for-Windows-with-Linux-1"></a>
308 <h3 class="section">4.3 Cross compilation for Windows with Linux<span class="pull-right"><a class="anchor hidden-xs" href="#Cross-compilation-for-Windows-with-Linux-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Cross-compilation-for-Windows-with-Linux-1" aria-hidden="true">TOC</a></span></h3>
309
310 <p>You must use the MinGW cross compilation tools available at
311 <a href="http://www.mingw.org/">http://www.mingw.org/</a>.
312 </p>
313 <p>Then configure FFmpeg with the following options:
314 </p><div class="example">
315 <pre class="example">./configure --target-os=mingw32 --cross-prefix=i386-mingw32msvc-
316 </pre></div>
317 <p>(you can change the cross-prefix according to the prefix chosen for the
318 MinGW tools).
319 </p>
320 <p>Then you can easily test FFmpeg with <a href="http://www.winehq.com/">Wine</a>.
321 </p>
322 <a name="Compilation-under-Cygwin"></a>
323 <h3 class="section">4.4 Compilation under Cygwin<span class="pull-right"><a class="anchor hidden-xs" href="#Compilation-under-Cygwin" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Compilation-under-Cygwin" aria-hidden="true">TOC</a></span></h3>
324
325 <p>Please use Cygwin 1.7.x as the obsolete 1.5.x Cygwin versions lack
326 llrint() in its C library.
327 </p>
328 <p>Install your Cygwin with all the &quot;Base&quot; packages, plus the
329 following &quot;Devel&quot; ones:
330 </p><div class="example">
331 <pre class="example">binutils, gcc4-core, make, git, mingw-runtime, texinfo
332 </pre></div>
333
334 <p>In order to run FATE you will also need the following &quot;Utils&quot; packages:
335 </p><div class="example">
336 <pre class="example">diffutils
337 </pre></div>
338
339 <p>If you want to build FFmpeg with additional libraries, download Cygwin
340 &quot;Devel&quot; packages for Ogg and Vorbis from any Cygwin packages repository:
341 </p><div class="example">
342 <pre class="example">libogg-devel, libvorbis-devel
343 </pre></div>
344
345 <p>These library packages are only available from
346 <a href="http://sourceware.org/cygwinports/">Cygwin Ports</a>:
347 </p>
348 <div class="example">
349 <pre class="example">yasm, libSDL-devel, libfaac-devel, libaacplus-devel, libgsm-devel, libmp3lame-devel,
350 libschroedinger1.0-devel, speex-devel, libtheora-devel, libxvidcore-devel
351 </pre></div>
352
353 <p>The recommendation for x264 is to build it from source, as it evolves too
354 quickly for Cygwin Ports to be up to date.
355 </p>
356 <a name="Crosscompilation-for-Windows-under-Cygwin"></a>
357 <h3 class="section">4.5 Crosscompilation for Windows under Cygwin<span class="pull-right"><a class="anchor hidden-xs" href="#Crosscompilation-for-Windows-under-Cygwin" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Crosscompilation-for-Windows-under-Cygwin" aria-hidden="true">TOC</a></span></h3>
358
359 <p>With Cygwin you can create Windows binaries that do not need the cygwin1.dll.
360 </p>
361 <p>Just install your Cygwin as explained before, plus these additional
362 &quot;Devel&quot; packages:
363 </p><div class="example">
364 <pre class="example">gcc-mingw-core, mingw-runtime, mingw-zlib
365 </pre></div>
366
367 <p>and add some special flags to your configure invocation.
368 </p>
369 <p>For a static build run
370 </p><div class="example">
371 <pre class="example">./configure --target-os=mingw32 --extra-cflags=-mno-cygwin --extra-libs=-mno-cygwin
372 </pre></div>
373
374 <p>and for a build with shared libraries
375 </p><div class="example">
376 <pre class="example">./configure --target-os=mingw32 --enable-shared --disable-static --extra-cflags=-mno-cygwin --extra-libs=-mno-cygwin
377 </pre></div>
378
379 <a name="Plan-9"></a>
380 <h2 class="chapter">5 Plan 9<span class="pull-right"><a class="anchor hidden-xs" href="#Plan-9" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Plan-9" aria-hidden="true">TOC</a></span></h2>
381
382 <p>The native <a href="http://plan9.bell-labs.com/plan9/">Plan 9</a> compiler
383 does not implement all the C99 features needed by FFmpeg so the gcc
384 port must be used.  Furthermore, a few items missing from the C
385 library and shell environment need to be fixed.
386 </p>
387 <ul>
388 <li> GNU awk, grep, make, and sed
389
390 <p>Working packages of these tools can be found at
391 <a href="http://code.google.com/p/ports2plan9/downloads/list">ports2plan9</a>.
392 They can be installed with <a href="http://9front.org/">9front&rsquo;s</a> <code>pkg</code>
393 utility by setting <code>pkgpath</code> to
394 <code>http://ports2plan9.googlecode.com/files/</code>.
395 </p>
396 </li><li> Missing/broken <code>head</code> and <code>printf</code> commands
397
398 <p>Replacements adequate for building FFmpeg can be found in the
399 <code>compat/plan9</code> directory.  Place these somewhere they will be
400 found by the shell.  These are not full implementations of the
401 commands and are <em>not</em> suitable for general use.
402 </p>
403 </li><li> Missing C99 <code>stdint.h</code> and <code>inttypes.h</code>
404
405 <p>Replacement headers are available from
406 <a href="http://code.google.com/p/plan9front/issues/detail?id=152">http://code.google.com/p/plan9front/issues/detail?id=152</a>.
407 </p>
408 </li><li> Missing or non-standard library functions
409
410 <p>Some functions in the C library are missing or incomplete.  The
411 <code><a href="http://ports2plan9.googlecode.com/files/gcc-apelibs-1207.tbz">gcc-apelibs-1207</a></code> package from
412 <a href="http://code.google.com/p/ports2plan9/downloads/list">ports2plan9</a>
413 includes an updated C library, but installing the full package gives
414 unusable executables.  Instead, keep the files from <code>gccbin.tgz</code>
415 under <code>/386/lib/gnu</code>.  From the <code>libc.a</code> archive in the
416 <code>gcc-apelibs-1207</code> package, extract the following object files and
417 turn them into a library:
418 </p>
419 <ul>
420 <li> <code>strerror.o</code>
421 </li><li> <code>strtoll.o</code>
422 </li><li> <code>snprintf.o</code>
423 </li><li> <code>vsnprintf.o</code>
424 </li><li> <code>vfprintf.o</code>
425 </li><li> <code>_IO_getc.o</code>
426 </li><li> <code>_IO_putc.o</code>
427 </li></ul>
428
429 <p>Use the <code>--extra-libs</code> option of <code>configure</code> to inform the
430 build system of this library.
431 </p>
432 </li><li> FPU exceptions enabled by default
433
434 <p>Unlike most other systems, Plan 9 enables FPU exceptions by default.
435 These must be disabled before calling any FFmpeg functions.  While the
436 included tools will do this automatically, other users of the
437 libraries must do it themselves.
438 </p>
439 </li></ul>
440
441
442       <p style="font-size: small;">
443         This document was generated using <a href="http://www.gnu.org/software/texinfo/"><em>makeinfo</em></a>.
444       </p>
445     </div>
446   </body>
447 </html>