This file is indexed.

/usr/share/doc/libav/platform.html is in libav-tools 6:11.12-1~deb8u1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
<!DOCTYPE html>
<html>
<!-- Created on February 18, 2018 by texi2html 1.82 -->
<!--
texi2html was written by: 
            Lionel Cons <Lionel.Cons@cern.ch> (original author)
            Karl Berry  <karl@freefriends.org>
            Olaf Bachmann <obachman@mathematik.uni-kl.de>
            and many others.
Maintained by: Many creative people.
Send bugs and suggestions to <texi2html-bug@nongnu.org>

-->
<head>
<title>Libav documentation : Platform Specific information: </title>

<meta name="description" content="Platform Specific information: ">
<meta name="keywords" content="Libav documentation : Platform Specific information: ">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="texi2html 1.82">

<style type="text/css">
<!--
.container {
  margin-right: auto;
  margin-left: auto;
  width: 1070px;
}
body {
  font-size: 14px;
  line-height: 20px;
  color: #333333;
  background-color: #ffffff;
}
a {
  color: #0088cc;
  text-decoration: none;
}
a:hover {
  color: #005580;
  text-decoration: underline;
}
p {
  margin: 0 0 10px;
}
h2,
h3,
h4 {
  margin: 10px 0;
  font-family: inherit;
  font-weight: bold;
  line-height: 1;
  border-color: #D6E9C6;
  color: #468847;
  border-style: solid;
  border-width: 0 0 1px;
  padding-left: 0.5em;
}

h1 a,
h2 a,
h3 a,
h4 a {
  color: inherit;
}
h1 {
  font-size: 30px;
  line-height: 40px;
}
h2 {
  font-size: 20px;
  line-height: 40px;
}
h3 {
  font-size: 18px;
  line-height: 40px;
}
code,
pre {
  padding: 0 3px 2px;
  font-family: monospace;
  font-size: 12px;
  color: #333333;
  border-radius: 3px;
}
pre {
  display: block;
  padding: 9.5px;
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 20px;
  word-break: break-all;
  word-wrap: break-word;
  white-space: pre;
  white-space: pre-wrap;
  background-color: #f5f5f5;
  border: 1px solid #ccc;
  border-radius: 4px;
}

code {
  padding: 2px 4px;
  color: #d14;
  background-color: #f7f7f9;
  border: 1px solid #e1e1e8;
}
pre code {
  padding: 0;
  color: inherit;
  background-color: transparent;
  border: 0;
}
.alert {
  padding: 8px 35px 8px 14px;
  margin-bottom: 20px;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
  background-color: #fcf8e3;
  border: 1px solid #fbeed5;
  border-radius: 4px;
  color: #c09853;
}

.alert-danger,
.alert-error {
  background-color: #f2dede;
  border-color: #eed3d7;
  color: #b94a48;
}
.alert-info {
  background-color: #d9edf7;
  border-color: #bce8f1;
  color: #3a87ad;
}

ul.toc {
  list-style-type: none;
}
-->
</style>

<link rel="icon" href="favicon.png" type="image/png" />
</head>
<body>
<div class="container">

<a name="SEC_Top"></a>
<h1 class="settitle">Platform Specific information</h1>

<a name="SEC_Contents"></a>
<h1>Table of Contents</h1>
<div class="contents">

<ul class="toc">
  <li><a name="toc-Unix_002dlike" href="#Unix_002dlike">1. Unix-like</a>
  <ul class="toc">
    <li><a name="toc-Advanced-linking-configuration" href="#Advanced-linking-configuration">1.1 Advanced linking configuration</a></li>
    <li><a name="toc-BSD" href="#BSD">1.2 BSD</a></li>
    <li><a name="toc-_0028Open_0029Solaris" href="#g_t_0028Open_0029Solaris">1.3 (Open)Solaris</a></li>
    <li><a name="toc-Darwin-_0028OS-X_002c-iPhone_0029" href="#Darwin-_0028OS-X_002c-iPhone_0029">1.4 Darwin (OS X, iPhone)</a></li>
  </ul></li>
  <li><a name="toc-DOS" href="#DOS">2. DOS</a></li>
  <li><a name="toc-OS_002f2" href="#OS_002f2">3. OS/2</a></li>
  <li><a name="toc-Windows" href="#Windows">4. Windows</a>
  <ul class="toc">
    <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>
    <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>
    <ul class="toc">
      <li><a name="toc-Linking-to-Libav-with-Microsoft-Visual-C_002b_002b" href="#Linking-to-Libav-with-Microsoft-Visual-C_002b_002b">4.2.1 Linking to Libav with Microsoft Visual C++</a></li>
    </ul></li>
    <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>
    <li><a name="toc-Compilation-under-Cygwin" href="#Compilation-under-Cygwin">4.4 Compilation under Cygwin</a></li>
    <li><a name="toc-Crosscompilation-for-Windows-under-Cygwin" href="#Crosscompilation-for-Windows-under-Cygwin">4.5 Crosscompilation for Windows under Cygwin</a></li>
  </ul></li>
  <li><a name="toc-Plan-9" href="#Plan-9">5. Plan 9</a></li>
</ul>
</div>

<a name="Unix_002dlike"></a>
<h1 class="chapter"><a href="platform.html#toc-Unix_002dlike">1. Unix-like</a></h1>

<p>Some parts of Libav cannot be built with version 2.15 of the GNU
assembler which is still provided by a few AMD64 distributions. To
make sure your compiler really uses the required version of gas
after a binutils upgrade, run:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">$(gcc -print-prog-name=as) --version
</pre></td></tr></table>

<p>If not, then you should install a different compiler that has no
hard-coded path to gas. In the worst case pass <code>--disable-asm</code>
to configure.
</p>
<a name="Advanced-linking-configuration"></a>
<h2 class="section"><a href="platform.html#toc-Advanced-linking-configuration">1.1 Advanced linking configuration</a></h2>

<p>If you compiled Libav libraries statically and you want to use them to
build your own shared library, you may need to force PIC support (with
<code>--enable-pic</code> during Libav configure) and add the following option
to your project LDFLAGS:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">-Wl,-Bsymbolic
</pre></td></tr></table>

<p>If your target platform requires position independent binaries, you should
pass the correct linking flag (e.g. <code>-pie</code>) to <code>--extra-ldexeflags</code>.
</p>
<a name="BSD"></a>
<h2 class="section"><a href="platform.html#toc-BSD">1.2 BSD</a></h2>

<p>BSD make will not build Libav, you need to install and use GNU Make
(<code>gmake</code>).
</p>
<a name="g_t_0028Open_0029Solaris"></a>
<h2 class="section"><a href="platform.html#toc-_0028Open_0029Solaris">1.3 (Open)Solaris</a></h2>

<p>GNU Make is required to build Libav, so you have to invoke (<code>gmake</code>),
standard Solaris Make will not work. When building with a non-c99 front-end
(gcc, generic suncc) add either <code>--extra-libs=/usr/lib/values-xpg6.o</code>
or <code>--extra-libs=/usr/lib/64/values-xpg6.o</code> to the configure options
since the libc is not c99-compliant by default. The probes performed by
configure may raise an exception leading to the death of configure itself
due to a bug in the system shell. Simply invoke a different shell such as
bash directly to work around this:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">bash ./configure
</pre></td></tr></table>

<p><a name="Darwin"></a>
</p><a name="Darwin-_0028OS-X_002c-iPhone_0029"></a>
<h2 class="section"><a href="platform.html#toc-Darwin-_0028OS-X_002c-iPhone_0029">1.4 Darwin (OS X, iPhone)</a></h2>

<p>The toolchain provided with Xcode is sufficient to build the basic
unacelerated code.
</p>
<p>OS X on PowerPC or ARM (iPhone) requires a preprocessor from
<a href="git://git.libav.org/gas-preprocessor.git">git://git.libav.org/gas-preprocessor.git</a> to build the optimized
assembly functions. Put the Perl script somewhere
in your PATH, Libav&rsquo;s configure will pick it up automatically.
</p>
<p>OS X on AMD64 and x86 requires <code>yasm</code> to build most of the
optimized assembly functions <a href="http://mxcl.github.com/homebrew/">Homebrew</a>,
<a href="http://www.gentoo.org/proj/en/gentoo-alt/prefix/bootstrap-macos.xml">Gentoo Prefix</a>
or <a href="http://www.macports.org">MacPorts</a> can easily provide it.
</p>

<a name="DOS"></a>
<h1 class="chapter"><a href="platform.html#toc-DOS">2. DOS</a></h1>

<p>Using a cross-compiler is preferred for various reasons.
<a href="http://www.delorie.com/howto/djgpp/linux-x-djgpp.html">http://www.delorie.com/howto/djgpp/linux-x-djgpp.html</a>
</p>

<a name="OS_002f2"></a>
<h1 class="chapter"><a href="platform.html#toc-OS_002f2">3. OS/2</a></h1>

<p>For information about compiling Libav on OS/2 see
<a href="http://www.edm2.com/index.php/FFmpeg">http://www.edm2.com/index.php/FFmpeg</a>.
</p>

<a name="Windows"></a>
<h1 class="chapter"><a href="platform.html#toc-Windows">4. Windows</a></h1>

<a name="Native-Windows-compilation-using-MinGW-or-MinGW_002dw64"></a>
<h2 class="section"><a href="platform.html#toc-Native-Windows-compilation-using-MinGW-or-MinGW_002dw64">4.1 Native Windows compilation using MinGW or MinGW-w64</a></h2>

<p>Libav can be built to run natively on Windows using the MinGW or MinGW-w64
toolchains. Install the latest versions of MSYS and MinGW or MinGW-w64 from
<a href="http://www.mingw.org/">http://www.mingw.org/</a> or <a href="http://mingw-w64.sourceforge.net/">http://mingw-w64.sourceforge.net/</a>.
You can find detailed installation instructions in the download section and
the FAQ.
</p>
<p>Notes:
</p>
<ul>
<li> Building natively using MSYS can be sped up by disabling implicit rules
in the Makefile by calling <code>make -r</code> instead of plain <code>make</code>. This
speed up is close to non-existent for normal one-off builds and is only
noticeable when running make for a second time (for example during
<code>make install</code>).

</li><li> In order to compile AVplay, you must have the MinGW development library
of <a href="http://www.libsdl.org/">SDL</a> and <code>pkg-config</code> installed.

</li><li> By using <code>./configure --enable-shared</code> when configuring Libav,
you can build all libraries as DLLs.

</li></ul>

<a name="Microsoft-Visual-C_002b_002b-or-Intel-C_002b_002b-Compiler-for-Windows"></a>
<h2 class="section"><a href="platform.html#toc-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></h2>

<p>Libav can be built with MSVC 2012 or earlier using a C99-to-C89 conversion utility
and wrapper, or with MSVC 2013 and ICL natively.
</p>
<p>You will need the following prerequisites:
</p>
<ul>
<li> <a href="https://github.com/libav/c99-to-c89/">C99-to-C89 Converter &amp; Wrapper</a>
(if using MSVC 2012 or earlier)
</li><li> <a href="http://code.google.com/p/msinttypes/">msinttypes</a>
(if using MSVC 2012 or earlier)
</li><li> <a href="http://www.mingw.org/">MSYS</a>
</li><li> <a href="http://yasm.tortall.net/">YASM</a>
</li><li> <a href="http://gnuwin32.sourceforge.net/packages/bc.htm">bc for Windows</a> if
you want to run <a href="fate.html">FATE</a>.
</li></ul>

<p>To set up a proper environment in MSYS, you need to run <code>msys.bat</code> from
the Visual Studio or Intel Compiler command prompt.
</p>
<p>Place <code>yasm.exe</code> somewhere in your <code>PATH</code>. If using MSVC 2012 or
earlier, place <code>c99wrap.exe</code> and <code>c99conv.exe</code> somewhere in your
<code>PATH</code> as well.
</p>
<p>Next, make sure any other headers and libs you want to use, such as zlib, are
located in a spot that the compiler can see. Do so by modifying the <code>LIB</code>
and <code>INCLUDE</code> environment variables to include the <strong>Windows-style</strong>
paths to these directories. Alternatively, you can try and use the
<code>--extra-cflags</code>/<code>--extra-ldflags</code> configure options. If using MSVC
2012 or earlier, place <code>inttypes.h</code> somewhere the compiler can see too.
</p>
<p>Finally, run:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">For MSVC:
./configure --toolchain=msvc

For ICL:
./configure --toolchain=icl

make
make install
</pre></td></tr></table>

<p>If you wish to compile shared libraries, add <code>--enable-shared</code> to your
configure options. Note that due to the way MSVC and ICL handle DLL imports and
exports, you cannot compile static and shared libraries at the same time, and
enabling shared libraries will automatically disable the static ones.
</p>
<p>Notes:
</p>
<ul>
<li> It is possible that coreutils&rsquo; <code>link.exe</code> conflicts with MSVC&rsquo;s linker.
You can find out by running <code>which link</code> to see which <code>link.exe</code> you
are using. If it is located at <code>/bin/link.exe</code>, then you have the wrong one
in your <code>PATH</code>. Either move or remove that copy, or make sure MSVC&rsquo;s
<code>link.exe</code> takes precedence in your <code>PATH</code> over coreutils&rsquo;.

</li><li> If you wish to build with zlib support, you will have to grab a compatible
zlib binary from somewhere, with an MSVC import lib, or if you wish to link
statically, you can follow the instructions below to build a compatible
<code>zlib.lib</code> with MSVC. Regardless of which method you use, you must still
follow step 3, or compilation will fail.
<ol>
<li> Grab the <a href="http://zlib.net/">zlib sources</a>.
</li><li> Edit <code>win32/Makefile.msc</code> so that it uses -MT instead of -MD, since
this is how Libav is built as well.
</li><li> Edit <code>zconf.h</code> and remove its inclusion of <code>unistd.h</code>. This gets
erroneously included when building Libav.
</li><li> Run <code>nmake -f win32/Makefile.msc</code>.
</li><li> Move <code>zlib.lib</code>, <code>zconf.h</code>, and <code>zlib.h</code> to somewhere MSVC
can see.
</li></ol>

</li><li> Libav has been tested with the following on i686 and x86_64:
<ul>
<li> Visual Studio 2010 Pro and Express
</li><li> Visual Studio 2012 Pro and Express
</li><li> Visual Studio 2013 Pro and Express
</li><li> Intel Composer XE 2013
</li><li> Intel Composer XE 2013 SP1
</li></ul>
<p>Anything else is not officially supported.
</p>
</li></ul>

<a name="Linking-to-Libav-with-Microsoft-Visual-C_002b_002b"></a>
<h3 class="subsection"><a href="platform.html#toc-Linking-to-Libav-with-Microsoft-Visual-C_002b_002b">4.2.1 Linking to Libav with Microsoft Visual C++</a></h3>

<p>If you plan to link with MSVC-built static libraries, you will need
to make sure you have <code>Runtime Library</code> set to
<code>Multi-threaded (/MT)</code> in your project&rsquo;s settings.
</p>
<p>You will need to define <code>inline</code> to something MSVC understands:
</p><table><tr><td>&nbsp;</td><td><pre class="example">#define inline __inline
</pre></td></tr></table>

<p>Also note, that as stated in <strong>Microsoft Visual C++</strong>, you will need
an MSVC-compatible <a href="http://code.google.com/p/msinttypes/">inttypes.h</a>.
</p>
<p>If you plan on using import libraries created by dlltool, you must
set <code>References</code> to <code>No (/OPT:NOREF)</code> under the linker optimization
settings, otherwise the resulting binaries will fail during runtime.
This is not required when using import libraries generated by <code>lib.exe</code>.
This issue is reported upstream at
<a href="http://sourceware.org/bugzilla/show_bug.cgi?id=12633">http://sourceware.org/bugzilla/show_bug.cgi?id=12633</a>.
</p>
<p>To create import libraries that work with the <code>/OPT:REF</code> option
(which is enabled by default in Release mode), follow these steps:
</p>
<ol>
<li> Open the <em>Visual Studio Command Prompt</em>.

<p>Alternatively, in a normal command line prompt, call &lsquo;<tt>vcvars32.bat</tt>&rsquo;
which sets up the environment variables for the Visual C++ tools
(the standard location for this file is something like
&lsquo;<tt>C:\Program Files (x86_\Microsoft Visual Studio 10.0\VC\bin\vcvars32.bat</tt>&rsquo;).
</p>
</li><li> Enter the &lsquo;<tt>bin</tt>&rsquo; directory where the created LIB and DLL files
are stored.

</li><li> Generate new import libraries with <code>lib.exe</code>:

<table><tr><td>&nbsp;</td><td><pre class="example">lib /machine:i386 /def:..\lib\foo-version.def  /out:foo.lib
</pre></td></tr></table>

<p>Replace <code>foo-version</code> and <code>foo</code> with the respective library names.
</p>
</li></ol>

<p><a name="Cross-compilation-for-Windows-with-Linux"></a>
</p><a name="Cross-compilation-for-Windows-with-Linux-1"></a>
<h2 class="section"><a href="platform.html#toc-Cross-compilation-for-Windows-with-Linux-1">4.3 Cross compilation for Windows with Linux</a></h2>

<p>You must use the MinGW cross compilation tools available at
<a href="http://www.mingw.org/">http://www.mingw.org/</a>.
</p>
<p>Then configure Libav with the following options:
</p><table><tr><td>&nbsp;</td><td><pre class="example">./configure --target-os=mingw32 --cross-prefix=i386-mingw32msvc-
</pre></td></tr></table>
<p>(you can change the cross-prefix according to the prefix chosen for the
MinGW tools).
</p>
<p>Then you can easily test Libav with <a href="http://www.winehq.com/">Wine</a>.
</p>
<a name="Compilation-under-Cygwin"></a>
<h2 class="section"><a href="platform.html#toc-Compilation-under-Cygwin">4.4 Compilation under Cygwin</a></h2>

<p>Please use Cygwin 1.7.x as the obsolete 1.5.x Cygwin versions lack
llrint() in its C library.
</p>
<p>Install your Cygwin with all the &quot;Base&quot; packages, plus the
following &quot;Devel&quot; ones:
</p><table><tr><td>&nbsp;</td><td><pre class="example">binutils, gcc4-core, make, git, mingw-runtime, texi2html
</pre></td></tr></table>

<p>In order to run FATE you will also need the following &quot;Utils&quot; packages:
</p><table><tr><td>&nbsp;</td><td><pre class="example">bc, diffutils
</pre></td></tr></table>

<p>If you want to build Libav with additional libraries, download Cygwin
&quot;Devel&quot; packages for Ogg and Vorbis from any Cygwin packages repository:
</p><table><tr><td>&nbsp;</td><td><pre class="example">libogg-devel, libvorbis-devel
</pre></td></tr></table>

<p>These library packages are only available from
<a href="http://sourceware.org/cygwinports/">Cygwin Ports</a>:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">yasm, libSDL-devel, libfaac-devel, libgsm-devel, libmp3lame-devel,
libschroedinger1.0-devel, speex-devel, libtheora-devel, libxvidcore-devel
</pre></td></tr></table>

<p>The recommendation for x264 is to build it from source, as it evolves too
quickly for Cygwin Ports to be up to date.
</p>
<a name="Crosscompilation-for-Windows-under-Cygwin"></a>
<h2 class="section"><a href="platform.html#toc-Crosscompilation-for-Windows-under-Cygwin">4.5 Crosscompilation for Windows under Cygwin</a></h2>

<p>With Cygwin you can create Windows binaries that do not need the cygwin1.dll.
</p>
<p>Just install your Cygwin as explained before, plus these additional
&quot;Devel&quot; packages:
</p><table><tr><td>&nbsp;</td><td><pre class="example">gcc-mingw-core, mingw-runtime, mingw-zlib
</pre></td></tr></table>

<p>and add some special flags to your configure invocation.
</p>
<p>For a static build run
</p><table><tr><td>&nbsp;</td><td><pre class="example">./configure --target-os=mingw32 --extra-cflags=-mno-cygwin --extra-libs=-mno-cygwin
</pre></td></tr></table>

<p>and for a build with shared libraries
</p><table><tr><td>&nbsp;</td><td><pre class="example">./configure --target-os=mingw32 --enable-shared --disable-static --extra-cflags=-mno-cygwin --extra-libs=-mno-cygwin
</pre></td></tr></table>

<a name="Plan-9"></a>
<h1 class="chapter"><a href="platform.html#toc-Plan-9">5. Plan 9</a></h1>

<p>The native <a href="http://plan9.bell-labs.com/plan9/">Plan 9</a> compiler
does not implement all the C99 features needed by Libav so the gcc
port must be used.  Furthermore, a few items missing from the C
library and shell environment need to be fixed.
</p>
<ul>
<li> GNU awk, grep, make, and sed

<p>Working packages of these tools can be found at
<a href="http://code.google.com/p/ports2plan9/downloads/list">ports2plan9</a>.
They can be installed with <a href="http://9front.org/">9front&rsquo;s</a> <code>pkg</code>
utility by setting <code>pkgpath</code> to
<code>http://ports2plan9.googlecode.com/files/</code>.
</p>
</li><li> Missing/broken <code>head</code> and <code>printf</code> commands

<p>Replacements adequate for building Libav can be found in the
<code>compat/plan9</code> directory.  Place these somewhere they will be
found by the shell.  These are not full implementations of the
commands and are <em>not</em> suitable for general use.
</p>
</li><li> Missing C99 <code>stdint.h</code> and <code>inttypes.h</code>

<p>Replacement headers are available from
<a href="http://code.google.com/p/plan9front/issues/detail?id=152">http://code.google.com/p/plan9front/issues/detail?id=152</a>.
</p>
</li><li> Missing or non-standard library functions

<p>Some functions in the C library are missing or incomplete.  The
<code><a href="http://ports2plan9.googlecode.com/files/gcc-apelibs-1207.tbz">gcc-apelibs-1207</a></code> package from
<a href="http://code.google.com/p/ports2plan9/downloads/list">ports2plan9</a>
includes an updated C library, but installing the full package gives
unusable executables.  Instead, keep the files from <code>gccbin.tgz</code>
under <code>/386/lib/gnu</code>.  From the <code>libc.a</code> archive in the
<code>gcc-apelibs-1207</code> package, extract the following object files and
turn them into a library:
</p>
<ul>
<li> <code>strerror.o</code>
</li><li> <code>strtoll.o</code>
</li><li> <code>snprintf.o</code>
</li><li> <code>vsnprintf.o</code>
</li><li> <code>vfprintf.o</code>
</li><li> <code>_IO_getc.o</code>
</li><li> <code>_IO_putc.o</code>
</li></ul>

<p>Use the <code>--extra-libs</code> option of <code>configure</code> to inform the
build system of this library.
</p>
</li><li> FPU exceptions enabled by default

<p>Unlike most other systems, Plan 9 enables FPU exceptions by default.
These must be disabled before calling any Libav functions.  While the
included tools will do this automatically, other users of the
libraries must do it themselves.
</p>
</li></ul>

<footer class="footer pagination-right">
<span class="label label-info">This document was generated by <em>Sebastian Ramacher</em> on <em>February 18, 2018</em> using <a href="http://www.nongnu.org/texi2html/"><em>texi2html 1.82</em></a>.</span></footer></div>