Opened 9 months ago

Closed 9 months ago

Last modified 9 months ago

#69332 closed defect (fixed)

dependency cycle involving ghc, texlive, gd2

Reported by: 0xnurl (Nur Lan) Owned by: essandess (Steve Smith)
Priority: Normal Milestone:
Component: ports Version: 2.9.1
Keywords: Cc: essandess (Steve Smith), drkp (Dan Ports), ryandesign (Ryan Carsten Schmidt), mascguy (Christopher Nielsen), judaew (Vadym-Valdis Yudaiev)
Port: dvipng gd2 ghc libavif pandoc texlive texlive-bin-extra

Description

MacOS 14.2.1 (23C71). Installed macports for scratch. (clean uninstall, reinstall)

Running port install graphviz fails with the following:

$ sudo port install graphviz
--->  Computing dependencies for graphviz
The following dependencies will be installed:
 cabal
 dvipng
 gd2
 ghc
 libavif
 pandoc
 texlive
 texlive-bin-extra
Continue? [Y/n]:
Error: The following dependencies were not installed because all of them have unmet dependencies (likely due to a dependency cycle): gd2 libavif pandoc cabal ghc texlive texlive-bin-extra dvipng
Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.
Error: Processing of port graphviz failed

Change History (8)

comment:1 Changed 9 months ago by jmroot (Joshua Root)

Cc: essandess drkp ryandesign mascguy judaew added
Summary: graphviz @ 2.9.1 installation fails: "unmet dependencies (likely due to a dependency cycle)"dependency cycle involving ghc, texlive, gd2

ghc -> texlive -> texlive-bin-extra -> dvipng -> gd2 -> libavif -> pandoc -> ghc

comment:2 Changed 9 months ago by jmroot (Joshua Root)

Port: dvipng gd2 ghc libavif pandoc texlive texlive-bin-extra added; graphviz removed

comment:3 Changed 9 months ago by drkp (Dan Ports)

You could probably fix the dependency cycle by removing ghc's dependency on the texlive metaport and adding whichever specific texlive ports it actually needs, assuming that doesn't include texlive-bin-extra (I haven't checked). This is probably a good idea anyway (will it work if the texlive installed is the +minimal variant?)

Either way, though, it still seems not great that installing gd2/libavif requires pulling in such heavyweight dependencies...

comment:4 Changed 9 months ago by ryandesign (Ryan Carsten Schmidt)

The heavy ghc dependency comes from pandoc. libavif only needs pandoc to build the documentation which is in the docs variant which is on by default on recent macOS versions. A solution could be to disable the docs variant by default or better yet move the documentation to a separate libavif-docs subport.

comment:5 in reply to:  3 Changed 9 months ago by 0xnurl (Nur Lan)

Replying to drkp:

You could probably fix the dependency cycle by removing ghc's dependency on the texlive metaport and adding whichever specific texlive ports it actually needs, assuming that doesn't include texlive-bin-extra (I haven't checked). This is probably a good idea anyway (will it work if the texlive installed is the +minimal variant?)

Either way, though, it still seems not great that installing gd2/libavif requires pulling in such heavyweight dependencies...

Thank you. How do I do that?

comment:6 Changed 9 months ago by essandess (Steve Smith)

ghc’s user manual is built using hadrian docs, which itself uses sphinx/xelatex/latex:

Therefore, it should work to replace ghc’s dependency on texlive with texlive-xetex. And this will eliminate the dependency on texlive-bin-extra:

port echo rdepof:texlive-xetex | grep texlive-bin-extra

Definitely test beforehand with the CI within a PR, though.

comment:7 Changed 9 months ago by essandess (Steve Smith)

Version 0, edited 9 months ago by essandess (Steve Smith) (next)

comment:8 Changed 9 months ago by essandess (Steve Smith)

Owner: set to essandess
Resolution: fixed
Status: newclosed

In 7c851507b22995644f6bb62390368e9092fde6ec/macports-ports (master):

ghc: Fix dependency loop

Note: See TracTickets for help on using tickets.