The native Plan 9 compiler does not implement all the C99 features needed by Libav so the gcc port must be used. Moreover, a few items missing from the C library and shell environment need to be fixed.
GNU awk, grep, make, and sed
Missing/broken head and printf commands
Replacements adequate for building Libav can be found in the compat/plan9 directory. Place these somewhere they will be found by the shell. These are not full implementations of the commands and are not suitable for general use.
Missing C99 stdint.h and inttypes.h
Replacement headers are available from http://code.google.com/p/plan9front/issues/detail?id=152 .
Missing or non-standard C library functions
Some functions in the C library are missing or incomplete. The gcc-apelibs-1207 package from ports2plan9 includes an updated C library, but installing the full package gives unusable executables. Instead, keep the files from gccbin.tgz under /386/lib/gnu. From the libc.a archive in the gcc-apelibs-1207 package, extract the following object files and turn them into a library:
Use the --extra-libs option of configure to inform the build system of this library.
FPU exceptions enabled by default.
- 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.