flex(1) on Solnix vs Linux and the BSDs
flex is not in the Solnix base system; install pkgs.solnix.flex. The Solnix page is a short option summary (table compression and debugging only), while the FreeBSD page is the full manual. The most visible difference is that Solnix documents -v output as going to stdout, where FreeBSD documents stderr.
The manual pages
What Solnix runs
Not installed by default: add pkgs.solnix.flex. No other illumos variants are shipped. The Solnix page is dated May 2017 (The Flex Project) and refers readers to the Texinfo manual (`info flex`) for full documentation.
Differences
| Compared with | Topic | What differs |
|---|---|---|
| FreeBSD | -v output stream | Solnix documents -v as writing the scanner statistics summary to stdout. FreeBSD documents it as writing to stderr. A script that captures or discards one stream may behave differently on the other system.Source: Solnix flex(1) -v, --verbose; FreeBSD flex(1) -v, --verbose |
| FreeBSD | -s long option name | The Solnix page spells the long form of -s as --nodefault. The FreeBSD page spells it --no-default. The short -s behaves the same on both: it suppresses the default ECHO rule.Source: Solnix flex(1) -s, --nodefault; FreeBSD flex(1) -s, --no-default |
| FreeBSD | -t / --stdout not documented on Solnix | FreeBSD documents -t (--stdout) to write the scanner to standard output instead of lex.yy.c. The Solnix page does not list -t, so the manual does not say how output is redirected there. Check `flex --help` after installing.Source: FreeBSD flex(1) -t, --stdout; Solnix flex(1) OPTIONS (no -t) |
| FreeBSD | options missing from the Solnix page | FreeBSD documents -i (case-insensitive), -l (lex compatibility), -B and -I (batch/interactive), -h and -c/-n (no-ops kept for POSIX). The Solnix page lists none of them. The manual does not say whether the Solnix flex accepts them.Source: FreeBSD flex(1) -i, -l, -B, -h, -c, -n; Solnix flex(1) DESCRIPTION |
| FreeBSD | synopsis and input handling | Solnix lists `flex [OPTIONS] [FILE]...` and does not say what happens with no file. FreeBSD documents reading standard input when no file is given, and generating lex.yy.c. FreeBSD's synopsis also shows -o output, -P prefix and -S skeleton.Source: Solnix flex(1) SYNOPSIS; FreeBSD flex(1) SYNOPSIS, DESCRIPTION |
| FreeBSD | lex name | The FreeBSD page is titled `flex, lex`, so lex is documented as a name for this program. The Solnix page names only flex. The manual does not say whether installing pkgs.solnix.flex provides a lex command. Source: FreeBSD flex(1) NAME; Solnix flex(1) NAME |
| FreeBSD | table compression options | Solnix documents the -C family (-Ca, -Ce, -Cf, -CF, -Cm, -Cr) and says -Cem is the default compression. FreeBSD's synopsis shows -C[aefFmr]. Both give -f as -Cfr and -F as -CFr. The visible FreeBSD text does not show its default.Source: Solnix flex(1) Table Compression; FreeBSD flex(1) SYNOPSIS, -f, -F |
| FreeBSD | debug and trace | Solnix lists -T/--trace and --hex (hexadecimal instead of octal in debug output). Solnix describes -d only as 'enable debug mode in scanner'. FreeBSD describes the -d output as `--accepting rule at line N` lines on stderr, controlled by yy_flex_debug.Source: Solnix flex(1) Debugging (-d, -T, --hex); FreeBSD flex(1) -d |
Standards
- POSIX: flex is not a POSIX.1-2024 utility.
- FreeBSD:
-cand-nare described as do-nothing, deprecated options included for POSIX compliance. - Solnix: The Solnix page has no STANDARDS section.
Writing portable scripts
- Use short options (
-s,-v,-w,-d,-p) rather than long names;--nodefaultand--no-defaultdiffer between the two pages. - Do not depend on which stream
-vwrites to: redirect both stdout and stderr if you parse the statistics. - On Solnix, check that flex is installed (pkgs.solnix.flex) before a build step calls it.
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.