General things about pkgsrc/IRIX

Since porting the NetBSD Packages Collection to IRIX in December of 2002, it has become quite functional and useful by now (the last bulk build results show around 1700 packages building out of the box). However, since IRIX differs significantly from other platforms there are still a few issues that arise. Most of them relate to the choice of compiler and what ABI is used. On this page I'll try to write up a few notes about issues that I've encountered or am aware of. If you run into other issues or know the solution or workarounds for some of the things listed here, please let me know.

Most of this documentation is written for IRIX 6.5.x; older versions of IRIX may be significantly different and require other tweaks. Especially IRIX <6 appears quite broken, but some people have still managed to use pkgsrc on it.

Bootstrap kits and binary packages

As noted on the pkgsrc website, binary bootstrap kits and binary packages for pkgsrc/IRIX are available. For convenience, here are the links:


Depending on your version of IRIX, there are different compilers you may be able to use. Most of the packages I use are compiled using SGI's MIPSPro compiler chain version 7.41. You may also wish to use gcc from SGI's freeware collection. Or gcc from pkgsrc (though of course you first need a compiler to bootstrap pkgsrc). Or, if you are using an older version of IRIX, you might have to use the IDO compiler chain.


IRIX supports three different ABIs: o32, n32 and (n)64. See ABI(1) on your IRIX system for details. Not all IRIX systems support all ABIs, and pkgsrc currently only supports one ABI at a time. That is, if you are using IRIX64 you need to choose if you wish to use "64" or "n32" as the ABI -- once you have made a choice, you can not switch ABIs!

Most problems relate to the compiler and the linker using different default ABI, or a conflict between the CFLAGS passed to the compiler and the default when linking object files that have been generated without CFLAGS.

For the MIPSPro compiler chain, this can be solved (for the most part), by setting the proper preference in /etc/compiler.defaults and clearing the SGI_ABI environment variable.

For gcc, you can tweak the defaults in the specs file that gcc uses. To determine the location of your specs file, issue gcc -v. For gcc3 from SGI's Freeware Collection, that file is /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/specs. A diff to tweak gcc to generate 64bit mips4 code by default can be found here.

Individual Packages

Some packages that require special attention or that have not yet been fixed in pkgsrc (for example, because patches are still being tested) are noted below:

  • lang/gcc3-c:

    gcc3-c can NOT be built with ABI set to "64". You need to set ABI=32 in your /etc/mk.conf before building this package.

  • graphics/tiff:

    It appears that under IRIX 6.5.27, the stdarg.h header is somehow funky -- tiff (and others) will complain that va_list is undefined. To work around this, I copied the stdarg.h and internal/stdarg_core.h from a 6.5.23 system. This appears to work, though is of course not The Right Thing and should be fixed for real at some point!

Open PRs

A list of all open PRs that are related to pkgsrc/IRIX can be found here. If you have patches or know workarounds, please let me know.

(contact me)