msgfmt(1) on Solnix vs Linux and the BSDs
On Solnix, msgfmt is the illumos msgfmt at /usr/bin/msgfmt, with -D, -f, -g, -o, -s, -v and --strict, and long forms of -D, -f, -o and -v. It lacks GNU msgfmt's check, statistics and Java, C#, Tcl and Qt modes, and adds -s and -g to pick the catalog format.
The manual pages
- Solnix: msgfmt(1) from
pkgs.solnix.illumos-world-man; the default on Solnix · illumos.org - Solnix: msgfmt(1) from
pkgs.solnix.gettext; add the package to get it - Linux: msgfmt(1) gettext-1.0
- NetBSD: msgfmt(1) 11.0
- Standard: POSIX.1-2024 (IEEE Std 1003.1-2024),
msgfmt
What Solnix runs
A default Solnix system runs the illumos msgfmt at /usr/bin/msgfmt. No other illumos variants are shipped. The GNU gettext msgfmt (gettext-tools 0.22.5 page) is published by pkgs.solnix.gettext and is not on PATH by default. Add that package to get it.
Differences
| Compared with | Topic | What differs |
|---|---|---|
| Linux, NetBSD | same program as GNU gettext | The pkgs.solnix.gettext msgfmt is GNU gettext-tools 0.22.5, the same program as the Linux (1.0) and NetBSD (0.16.1) pages. The /usr/bin/msgfmt on PATH is a different program.Source: Solnix msgfmt(1) from pkgs.solnix.gettext (GNU gettext-tools 0.22.5); Linux msgfmt(1) (gettext-tools 1.0); NetBSD msgfmt(1) (gettext-tools 0.16.1) |
| Linux, NetBSD | -s and -g catalog format | Solnix /usr/bin/msgfmt has -s (generate a Solaris message catalog) and -g (generate a GNU-compatible catalog). They are mutually exclusive. Linux and NetBSD msgfmt document neither option.Source: illumos msgfmt(1) OPTIONS -g, -s; Linux msgfmt(1) DESCRIPTION; NetBSD msgfmt(1) DESCRIPTION |
| Linux, NetBSD | strict mode meaning | On Solnix, --strict appends .mo to the output file name if it lacks that suffix, and is ignored for Solaris catalogs. The Linux and NetBSD pages describe --strict only as enabling strict Uniforum mode.Source: illumos msgfmt(1) OPTIONS (--strict); Linux msgfmt(1) --strict; NetBSD msgfmt(1) --strict |
| Linux, NetBSD | -v meaning | Solnix -v lists duplicate msgids for Solaris catalogs, and for GNU-compatible catalogs diagnoses anomalies such as mismatched newlines or printf % specifiers. The Linux and NetBSD pages describe -v only as 'increase verbosity level'.Source: illumos msgfmt(1) OPTIONS -v; Linux msgfmt(1) -v, --verbose; NetBSD msgfmt(1) -v, --verbose |
| Linux, NetBSD | checking options missing | Solnix /usr/bin/msgfmt documents no -c/--check, --check-format, --check-header, --check-domain, -C, --check-accelerators or --statistics. Linux and NetBSD document all of them.Source: illumos msgfmt(1) SYNOPSIS, OPTIONS; Linux msgfmt(1) Input file interpretation, Informative output; NetBSD msgfmt(1) Input file interpretation, Informative output |
| Linux, NetBSD | output modes missing | Solnix /usr/bin/msgfmt has no Java (-j, --java2), C# (--csharp, --csharp-resources), Tcl (--tcl) or Qt (--qt) output modes, and no -r, -l or -d. Linux and NetBSD document all of these.Source: illumos msgfmt(1) SYNOPSIS; Linux msgfmt(1) Operation mode; NetBSD msgfmt(1) Operation mode |
| Linux | desktop and XML modes | Linux msgfmt has --desktop and --xml modes (with --template, -L and -k), as does the pkgs.solnix.gettext page. The illumos msgfmt has neither mode.Source: Linux msgfmt(1) Operation mode; Solnix msgfmt(1) from pkgs.solnix.gettext Operation mode; illumos msgfmt(1) SYNOPSIS |
| Linux, NetBSD | output tuning options | Solnix /usr/bin/msgfmt has no -a/--alignment or --no-hash, which Linux and NetBSD document. It also lacks --no-convert, --no-redundancy and --endianness, which Linux and the pkgs.solnix.gettext page document and NetBSD does not.Source: illumos msgfmt(1) SYNOPSIS; Linux msgfmt(1) Output details; NetBSD msgfmt(1) Output details; Solnix msgfmt(1) from pkgs.solnix.gettext Output details |
| Linux, NetBSD | default output file names | With no -o, Solnix writes messages.mo (or domainname.mo per domain directive) for Solaris catalogs or with --strict, and messages or domainname otherwise; with -o, domain directives are ignored. The GNU pages describe no default name.Source: illumos msgfmt(1) USAGE (domain directive), OPTIONS -o; Linux msgfmt(1) Output file location; NetBSD msgfmt(1) Output file location |
| Linux, NetBSD | -h and -V | Linux and NetBSD msgfmt document -h (help) and -V (version). The illumos page documents neither.Source: Linux msgfmt(1) Informative output; NetBSD msgfmt(1) Informative output; illumos msgfmt(1) SYNOPSIS, OPTIONS |
| Linux, NetBSD | input syntax options | Linux and NetBSD msgfmt accept -P (Java .properties) and --stringtable-input (NeXTstep/GNUstep .strings) as input. The Solnix illumos msgfmt does not document them.Source: Linux msgfmt(1) Input file syntax; NetBSD msgfmt(1) Input file syntax; illumos msgfmt(1) SYNOPSIS |
Everyday tasks
| Task | Solnix | Linux | NetBSD |
|---|---|---|---|
| compile a .po file into a message object | msgfmt filename.po | msgfmt filename.po | msgfmt filename.po |
| compile a .po file into a named output file | msgfmt -o output-file filename.po | — | msgfmt -o output-file filename.po |
| add a directory to the input file search list | msgfmt -D directory filename.po | msgfmt -D directory filename.po | msgfmt -D directory filename.po |
| generate a GNU-compatible message catalog | msgfmt -g filename.po | — | — |
Standards
- POSIX: msgfmt is a POSIX.1-2024 utility.
Writing portable scripts
- In portable scripts use msgfmt
-ofile filename.po, plus-Dand-f, which the illumos, Linux and NetBSD pages all list. Avoid-v,--strict,-c,-gand-s, which differ or are missing. - Always give
-oexplicitly. On Solnix the default output name depends on the catalog format and--strict, and the GNU pages do not describe default names.
Every difference here is taken from the manual pages linked above: Solnix's published page, Linux (man-pages and the GNU and util-linux manuals), FreeBSD, OpenBSD and NetBSD. Each row names its source. Where a manual is silent, this page is too. Compiled 2026-10-26. Found a mistake? Mail hackers@lists.solnix.io.