Homebrew: `brew uses --install gcc` has no effect

I would like to get a list of installed packages that depend on gcc (installed with homebrew). When I try:

brew uses --installed gcc

it does not work. And if I check for example. r dependencies with brew deps r

, it returns gcc

(among others). So I guess I brew uses

should at least return a value r

.

Has anyone faced a similar issue and could shed some light on this?

+3


source to share


1 answer


This is not an authoritative answer, but it seems to me that it has something to do with r

depends on :fortran

, which is a kind of virtual dependency that can be solved in different ways. brew deps

answers the question what do I need to install before installing this formula. And in your case, he decides that the installation gcc

is the way to meet the requirement :fortran

. But the opposite is apparently not supported: he doesn't know, just by looking at gcc

, that this can be used to resolve a virtual dependency:fortran

... This is somewhat plausible considering how virtual dependencies are implemented in Homebrew. It usually just scans the filesystem to see if the required binary is available (including those shipped outside of Homebrew), but it doesn't link to the formula dependency after it finds a candidate.

(Actually, this case can be even more complicated. If you look at brew deps r --tree

, you can see that the dependency is actually on :gcc

, which is another layer of virtual dependency.)



Not directly relevant to your question, note that deps

recursive by default, but uses

not. Therefore, to get a symmetrical picture, you need to use deps -1

or uses --recursive

.

+1


source







All Articles