Man pages in FreeBSD 9 are broken

I just installed FreeBSD 9 on two machines, quite different hardware, one embedded AMD and one Quad Core Intel Core2Duo. Anyway, both machines do this on any man page:

Code:
# man vi
/usr/bin/man: eval: line 396: syntax error near unexpected token `|'
/usr/bin/man: eval: line 396: `/usr/bin/zcat /usr/share/man/man1/vi.1.gz |  |  -Tascii -P-c | more'
/usr/bin/man: line 396: warning: syntax errors in . or eval will cause future versions of the shell to abort as Posix requires
Any help would be appreciated.
 
Code:
-- Using architecture: amd64:amd64
-- Using pager: more
-- Using manual sections: 1:1aout:8:2:3:n:4:5:6:7:9:l
-- Searching PATH for man directories
--   Adding /usr/share/man to manpath
--   Adding /usr/local/man to manpath
-- Adding default manpath entries
--   Adding /usr/share/openssl/man to manpath
-- Parsing config file: /usr/local/etc/man.d/perl5.12.4.conf
--   Adding /usr/local/lib/perl5/5.12.4/man to manpath
--   Adding /usr/local/lib/perl5/5.12.4/perl/man to manpath
-- Using manual path: /usr/share/man:/usr/local/man:/usr/share/openssl/man:/usr/local/lib/perl5/5.12.4/man:/usr/local/lib/perl5/5.12.4/perl/man
-- Using locale paths: .
-- Using standard page width
-- Searching for vi
--     Found manpage /usr/share/man/man1/vi.1.gz
--     Skipping catpage: not found or old
-- Command: /usr/bin/zcat /usr/share/man/man1/vi.1.gz |  |  -Tascii -P-c | more
 
The last line is wrong, maybe others. A 9.0-RC3 VM I had lying around shows this:
Code:
-- Command: /usr/bin/zcat /usr/share/man/man1/vi.1.gz | tbl | groff -S -P-h -Wall -mtty-char -man -Tascii -P-c | more

Have you changed settings in your shell startup file?
 
Code:
[tj@lianli ~]$ man -ddd vi
-- Using architecture: amd64:amd64
-- Using pager: more
-- Using manual sections: 1:1aout:8:2:3:n:4:5:6:7:9:l
-- Searching PATH for man directories
--   Adding /usr/share/man to manpath
--   Skipping duplicate manpath entry /usr/share/man
--   Adding /usr/local/man to manpath
-- Adding default manpath entries
--   Skipping duplicate manpath entry /usr/share/man
--   Adding /usr/share/openssl/man to manpath
--   Skipping duplicate manpath entry /usr/local/man
-- Parsing config file: /usr/local/etc/man.d/perl5.12.4.conf
--   MANPATH /usr/local/lib/perl5/5.12.4/man
--     MANPATH
--   Adding /usr/local/lib/perl5/5.12.4/man to manpath
--   MANPATH /usr/local/lib/perl5/5.12.4/perl/man
--     MANPATH
--   Adding /usr/local/lib/perl5/5.12.4/perl/man to manpath
-- Using manual path: /usr/share/man:/usr/local/man:/usr/share/openssl/man:/usr/local/lib/perl5/5.12.4/man:/usr/local/lib/perl5/5.12.4/perl/man
-- Using locale paths: .
-- Using standard page width
-- Searching for vi
-- Searching section 1
--   Searching directory /usr/share/man/man1
--     Found manpage /usr/share/man/man1/vi.1.gz
--     Skipping catpage: not found or old
-- Command: /usr/bin/zcat /usr/share/man/man1/vi.1.gz |  |  -Tascii -P-c | more
 
Here's a fun shell code to test in our shell vs bash:

Code:
FOO=bar

baz() {
  local FOO

  echo $FOO
}

baz

Code:
$ sh baz.sh
bar
$ bash baz.sh

$

Not sure exactly which one I would consider the bug. I think I like the FreeBSD version better. SUSv4 doesn't document the 'local' built-in at all.
 
Back
Top