Nekoware Packaging Guide

From TechPubs Wiki

Revision as of 02:00, 9 October 2025 by Raion (talk | contribs) (Created page with " This article provides a basic introduction to packaging software for distribution through the Nekoware software archive. Nekoware's standards are reflected in the way we wrote this article. ==Required Equipment== ===Compilers=== For C-based, normal everyday programs we highly recommend using MIPSPro for compilation. If using C++, the type of C++ and complexity of the program will determine if fixing it for MIPSPro outweighs the work necessary to compiler. W...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This article provides a basic introduction to packaging software for distribution through the Nekoware software archive. Nekoware's standards are reflected in the way we wrote this article.

Required Equipment

Compilers

For C-based, normal everyday programs we highly recommend using MIPSPro for compilation. If using C++, the type of C++ and complexity of the program will determine if fixing it for MIPSPro outweighs the work necessary to compiler.

We support using GCC as well for building, with a few major caveats. C++ on GCC is incompatible with IRIX C++ libraries (libfam, libVk etc.). It also can cause issues with some C-based programs and libraries. In terms of performance, MIPSPro has been shown to consistently compile faster, and when micro-optimizations observed, it can build a program 15-20% faster. gdb is fundamentally broken on IRIX, unable to debug threads and having glitchy stack traces and other issues. GCC-built programs do not support the dbx debugger. In many cases, if a program is GCC-only and cannot be built with MIPSPro, a debugger won't work, and the porter will need to leverage debug macros and other alternative means.

Make, CMake etc.

Nekoware packages CMake 3.5 as of this writing, but CMake programs will require some hacks to work around and use MIPSPro. Try to use software with autotools.

For make, just use GNU Make. It's the best of the makes out there with the widest compatibility, the only time bmake may be necessary is on BSD-derived software.

Other tools

We mandate using pkgconf from nekoware instead of pkg-config. This is because pkg-config is a glib-dependent, obsolete piece of software.

We recommend either using neweoe diff (with command diff -urw) or GNU diff (diff -Naur) to build diffs.

Platform

IRIX 6.5.21 or higher is necessary due to certain C99 functions not being present on prior IRIX releases. It still may be possible to build and run IRIX software on a prior version, but bug reports will not be accepted.

Build Environment

This is the recommended build environment for MIPSPro:

CC=c99

CXX=CC

CFLAGS='-O2 -mips4 -TARG:proc=r10000'

CXXFLAGS='-O2 -mips4 -TARG:proc=r10000'

CPPFLAGS='-I/usr/nekoware/include -I/usr/include'

LDFLAGS='-L/usr/nekoware/lib32 -L/usr/lib32 -Wl,-rpath -Wl,/usr/nekoware/lib32'

PKG_CONFIG='/usr/nekoware/bin/pkgconf'

PKG_CONFIG_PATH='/usr/nekoware/lib32/pkgconfig'

ACLOCAL_PATH='/usr/nekoware/share/aclocal'

All Nekoware is installed relative to /usr/nekoware and should be built and linked against the libraries there.

For a bash or ksh shell, use export. Note for our purposes, we expect/use tcsh, as that's the primary IRIX interactive shell. For tcsh, setenv with a space instead of an equal sign works.

Library Directory: /usr/nekoware/lib32 (n32) or /usr/nekoware/lib64 (n64)

Man Directory: /usr/nekoware/share/man

Initscripts: /usr/nekoware/share/{progname]/init.d

Building with GCC

Do not use SGUG GCC 9 or didbs GCC versions for building. Use the GCC 6 located here: https://contrib.irixnet.org/raion/tardists/

The reason is that SGUG's GCC will link against libgcc.so in their directory. This is an unacceptable and will break the program on other installs.

Any GCC applications will require installing GCC for proper building if they link against a dynamic libgcc.so. Be aware.