homebrew-bundle: Topological sort failed

Similar to #240, I want to run brew bundle dump:

Error: topological sort failed: ["libtiff", "webp"]
Formulae dependency graph sorting failed (likely due to a circular dependency)!

I’m trying to dump everything to a brewfile (for my Dotfiles setup); brew list | column -c 80 gives

ack			jpeg			python
archey			libevent		python3
autoconf		libmodplug		python@2
automake		libmpc			readline
bash			libogg			ruby
bash-completion@2	libpng			scala
brew-cask-completion	libtiff			sdl2
coreutils		libtool			sdl2_image
cowsay			libvorbis		sdl2_ttf
exiftool		libyaml			shellcheck
figlet			lolcat			sl
findutils		lua			smlnj
fortune			luajit			solarus
freetype		make			sphinx-doc
gcc			moreutils		sqlite
gdbm			mpfr			tmux
gettext			nethack			tree
git			openssl			universal-ctags
gitsh			parallel		unrar
gmp			pcre2			vim
gnu-sed			perl			webp
go			physfs			xz
heroku			pkg-config		zelda-roth-se
heroku-node		ponysay			zsdx
htop			proselint		zsxd
hub			pstree
isl			pv

I checked brew info libtiff webp and couldn’t see any dependencies that might be circular… they do both depend on jpeg, but I wouldn’t have expected that to be an issue.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 21 (10 by maintainers)

Most upvoted comments

Glad you both got it sorted 🎉.

This has just been the result of removing options in Homebrew/homebrew-core. Some revisions probably should have been added and weren’t. This will be resolved when https://github.com/Homebrew/homebrew-core/issues/31510 is closed.

Curious about the root cause/why “reinstalling” didn’t work, but this did.

brew reinstall will in some cases use the formula file embedded inside the keg. This is often desirable (for boring reasons) but wasn’t in this case. I’m adjusting the messaging again in https://github.com/Homebrew/homebrew-bundle/pull/425 so it’ll tell you what to do and that is as good as we’ll get for resolution for this for now.

Thanks to both of you for staying responsive and helpful. Couldn’t have debugged this without you both ❤️