Sign in

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.

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 withTopicWhat differs
Linux, NetBSDsame program as GNU gettextThe 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 formatSolnix /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, NetBSDstrict mode meaningOn 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 meaningSolnix -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, NetBSDchecking options missingSolnix /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, NetBSDoutput modes missingSolnix /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
Linuxdesktop and XML modesLinux 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, NetBSDoutput tuning optionsSolnix /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, NetBSDdefault output file namesWith 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 -VLinux 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, NetBSDinput syntax optionsLinux 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

TaskSolnixLinuxNetBSD
compile a .po file into a message objectmsgfmt filename.pomsgfmt filename.pomsgfmt filename.po
compile a .po file into a named output filemsgfmt -o output-file filename.po—msgfmt -o output-file filename.po
add a directory to the input file search listmsgfmt -D directory filename.pomsgfmt -D directory filename.pomsgfmt -D directory filename.po
generate a GNU-compatible message catalogmsgfmt -g filename.po——

Standards

Writing portable scripts

  • In portable scripts use msgfmt -o file filename.po, plus -D and -f, which the illumos, Linux and NetBSD pages all list. Avoid -v, --strict, -c, -g and -s, which differ or are missing.
  • Always give -o explicitly. 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.