#65718 closed defect (fixed)

zsh: install failure for macOS 13

Reported by: David-Noble-at-work (David Noble) Owned by: larryv (Lawrence Velázquez)
Priority: Normal Milestone:
Component: ports Version: 2.7.99
Keywords: ventura Cc:
Port: zsh

Description (last modified by mascguy (Christopher Nielsen))

I built and installed macports-base from the source on master. All packages but one upgraded: zsh-5.9. I uninstalled zsh, cleaned all packages, and tried again, knowing that likely wouldn't help but also wouldn't hurt.

Output attached.

Attachments (1)

zsh-log-macos-13-beta-5.log (221.2 KB) - added by mascguy (Christopher Nielsen) 19 months ago.

Download all attachments as: .zip

Change History (14)

comment:1 Changed 19 months ago by mascguy (Christopher Nielsen)

Description: modified (diff)
Keywords: ventura added; zsh macOS13 Ventura removed
Owner: set to larryv
Port: zsh added; zsh-5.9 removed
Status: newassigned
Summary: macOS 13.0 beta 5 |zsh: install failure for macOS 13 beta 5

Changed 19 months ago by mascguy (Christopher Nielsen)

Attachment: zsh-log-macos-13-beta-5.log added

comment:2 Changed 19 months ago by mascguy (Christopher Nielsen)

Version: 2.7.99

comment:3 Changed 19 months ago by larryv (Lawrence Velázquez)

Status: assignedaccepted
:debug:destroot Executing proc-post-org.macports.destroot-destroot-0
:debug:destroot system -W /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_shells_zsh/zsh/work/destroot/opt/local/share/man: soelim man1/zshall.1 >zshall.1.soelim
:info:destroot sh: soelim: command not found
:info:destroot Command failed: soelim man1/zshall.1 >zshall.1.soelim

Well that's unfortunate.

comment:4 Changed 19 months ago by jmroot (Joshua Root)

Milestone: MacPorts Future

Insert reminder to read and abide by your NDA here. If soelim is missing from the beta OS, that's probably something that should be reported to Apple.

comment:5 Changed 17 months ago by mikecappella (MrC)

I just ran into this today. Installing groff solved the issue, but of course this drags in a huge number of dependencies.

comment:6 in reply to:  5 Changed 17 months ago by larryv (Lawrence Velázquez)

Yeah, I'm reluctant to depend on groff, although at least it wouldn't impact binary installations.

comment:7 Changed 17 months ago by larryv (Lawrence Velázquez)

Can someone on Ventura check whether running soelim is still necessary?

  1. Comment out the system and move commands in the post-destroot block (lines 76 and 77).
  2. Install the modified port.
  3. Run man /opt/local/share/man/man1/zshall.1.gz. (Adjust for your MacPorts prefix if necessary.)

This historically produced a bunch of errors like this:

<standard input>:474: can't open `man1/zshroadmap.1': No such file or directory
<standard input>:475: can't open `man1/zshmisc.1': No such file or directory
<standard input>:476: can't open `man1/zshexpn.1': No such file or directory
<standard input>:477: can't open `man1/zshparam.1': No such file or directory
<standard input>:478: can't open `man1/zshoptions.1': No such file or directory
<standard input>:479: can't open `man1/zshbuiltins.1': No such file or directory
<standard input>:480: can't open `man1/zshzle.1': No such file or directory
<standard input>:481: can't open `man1/zshcompwid.1': No such file or directory
<standard input>:482: can't open `man1/zshcompsys.1': No such file or directory
<standard input>:483: can't open `man1/zshcompctl.1': No such file or directory
<standard input>:484: can't open `man1/zshmodules.1': No such file or directory
<standard input>:485: can't open `man1/zshcalsys.1': No such file or directory
<standard input>:486: can't open `man1/zshtcpsys.1': No such file or directory
<standard input>:487: can't open `man1/zshzftpsys.1': No such file or directory
<standard input>:488: can't open `man1/zshcontrib.1': No such file or directory

Is this still the case on Ventura?

comment:8 Changed 17 months ago by tramir (Mircea Trandafir)

Can confirm that I was able to install the modified zsh port and got no errors after man /opt/local/share/man/man1/zshall.1.gz.

comment:9 in reply to:  8 Changed 17 months ago by larryv (Lawrence Velázquez)

And when you run man /opt/local/share/man/man1/zshall.1.gz all the included man pages are also visible? (You can verify this by searching for "ZSHROADMAP", which only appears in the included file zshroadmap.1.)

comment:10 Changed 17 months ago by jmroot (Joshua Root)

Summary: zsh: install failure for macOS 13 beta 5zsh: install failure for macOS 13

comment:11 Changed 17 months ago by tbaumgard (Tim Baumgard)

I can confirm that commenting out those lines gets it to install without errors and ZSHROADMAP is in the output of man /opt/local/share/man/man1/zshall.1.gz.

Apple appears to be using the latest version of mandoc to generate man pages in the current release version of macOS (13.0 22A380). I have no clue when they moved to it. I'm certainly not an expert on mandoc but have used it to an extent on OpenBSD where most of its development comes from. mandoc doesn't provide a soelim executable, and I don't think it ever has. It just loads the .so directives when man ... is called.

I'm guessing, but it sounds like from the historical error messages that previous versions of man were expecting those man pages to be in /opt/local/share/man/man1/man1 (notice the two man1 directories). It might have been man-db, but I ran into a similar issue at some point.

I also noticed mandoc_soelim on Ventura when I was poking around, but I think that's probably vestigial. If I had to guess, it was a shim Apple used to migrate over to mandoc over time. It would certainly explain why soelim is no longer included.

Anyway, you can kind of independently verify the fix on older versions of macOS by downloading the source for zsh, installing mandoc from ports since it's the version Apple includes in Ventura, doing something like mandoc -T man zshall.1 > zshall.test.1 in the zsh source, and then man ./zshall.test.1, making sure you're using the mandoc version of man.

comment:12 in reply to:  11 Changed 17 months ago by larryv (Lawrence Velázquez)

Replying to tbaumgard:

I can confirm that commenting out those lines gets it to install without errors and ZSHROADMAP is in the output of man /opt/local/share/man/man1/zshall.1.gz.

Thank you!

Apple appears to be using the latest version of mandoc to generate man pages in the current release version of macOS (13.0 22A380).

Yeah, that's what I suspected. Wikipedia mentions it, but it's good to hear it firsthand.

I'm guessing, but it sounds like from the historical error messages that previous versions of man were expecting those man pages to be in /opt/local/share/man/man1/man1 (notice the two man1 directories).

That's not quite it. The issue is that MacPorts gzip-compresses man pages, but groff does not do any preprocessing for .so requests. When asked to include whatever.1, it does not try to find, decompress, and include whatever.1.gz. When asked to include whatever.1.gz explicitly, it does not perform decompression but reads the gzip file as is and chokes predictably. This is why the port runs soelim on zshall.1 before base compresses all the man pages.

Something online (another Wikipedia page perhaps) gave me the notion that mandoc handles this more intelligently, which is why I asked for testing. I'm relieved to hear that it does; I was perilously close to writing a bare-bones soelim implementation in POSIX shell. 😰

Anyway, you can kind of independently verify the fix on older versions of macOS

No need, I'll take your word for it :)

comment:13 Changed 17 months ago by larryv (Lawrence Velázquez)

Resolution: fixed
Status: acceptedclosed

In 6d16c7f0c8d241a5b4370bccd12d5a03fe6856da/macports-ports (master):

zsh: Don't try to preprocess zshall.1 on Ventura

Preprocessing the zshall.1 man page fails on macOS 13 Ventura because
Apple no longer ships a utility named soelim. As I understand it,
this is because Ventura ships mandoc instead of groff. Fortunately
for us, mandoc does not seem to require our preprocessing in the first
place, so there's no reason to attempt it.

Revbump because users with the groff port installed were able to build
this port successfully, but their zshall.1 is different from the one
this revision produces.

Closes: #65718

Note: See TracTickets for help on using tickets.