Homebrew-core: cloc not installing required dependencies

Created on 9 Oct 2019  Â·  9Comments  Â·  Source: Homebrew/homebrew-core

  • [x] are reporting a bug others will be able to reproduce and not asking a question or requesting software. If you're not sure or want to ask a question do so on our Discourse: https://discourse.brew.sh. To get software added or changed in Homebrew please file a Pull Request
  • [x] have a problem with brew install (or upgrade, reinstall) a single, Homebrew/homebrew-core formula (not cask) on macOS? If it's a general brew problem please file this issue at Homebrew/brew: https://github.com/Homebrew/brew/issues/new/choose. If it's a Linux problem please file this issue at https://github.com/Homebrew/linuxbrew-core/issues/new/choose. If it's a brew cask problem please file this issue at https://github.com/Homebrew/homebrew-cask/issues/new/choose. If it's a tap (e.g. Homebrew/homebrew-php) problem please file this issue at the tap.
  • [x] ran brew update and can still reproduce the problem?
  • [ ] ran brew doctor, fixed all issues and can still reproduce the problem?
  • [ ] ran brew gist-logs <formula> (where <formula> is the name of the formula that failed) and included the output link?
  • [x] if brew gist-logs didn't work: ran brew config and brew doctor and included their output with your issue?

Installation of clog does not install required dependencies:

cloc
Can't locate Moo/Role.pm in @INC (you may need to install the Moo::Role module) (@INC contains: /usr/local/Cellar/cloc/1.84/libexec/lib/perl5/darwin-thread-multi-2level /usr/local/Cellar/cloc/1.84/libexec/lib/perl5 /usr/local/Cellar/perl/5.30.0/lib/perl5/site_perl/5.30.0/darwin-thread-multi-2level /usr/local/Cellar/perl/5.30.0/lib/perl5/site_perl/5.30.0 /usr/local/Cellar/perl/5.30.0/lib/perl5/5.30.0/darwin-thread-multi-2level /usr/local/Cellar/perl/5.30.0/lib/perl5/5.30.0 /usr/local/lib/perl5/site_perl/5.30.0/darwin-thread-multi-2level /usr/local/lib/perl5/site_perl/5.30.0) at /usr/local/Cellar/cloc/1.84/libexec/lib/perl5/Parallel/ForkManager/Child.pm line 12.
BEGIN failed--compilation aborted at /usr/local/Cellar/cloc/1.84/libexec/lib/perl5/Parallel/ForkManager/Child.pm line 12.
Compilation failed in require at /usr/local/Cellar/cloc/1.84/libexec/lib/perl5/Parallel/ForkManager.pm line 12.
BEGIN failed--compilation aborted at /usr/local/Cellar/cloc/1.84/libexec/lib/perl5/Parallel/ForkManager.pm line 12.
Compilation failed in require at /usr/local/Cellar/cloc/1.84/libexec/bin/cloc line 879.
BEGIN failed--compilation aborted at /usr/local/Cellar/cloc/1.84/libexec/bin/cloc line 879.

output of brew doctor and brew config

2:31 $ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected dylibs:
  /usr/local/lib/libwkhtmltox.0.12.5.dylib

Warning: Unbrewed header files were found in /usr/local/include.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected header files:
  /usr/local/include/python2.7/greenlet/greenlet.h
  /usr/local/include/wkhtmltox/image.h
  /usr/local/include/wkhtmltox/pdf.h

Warning: You have unlinked kegs in your Cellar.
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
  nss

Warning: Homebrew's sbin was not found in your PATH but you have installed
formulae that put executables in /usr/local/sbin.
Consider setting the PATH for example like so:
  echo 'export PATH="/usr/local/sbin:$PATH"' >> ~/.bash_profile
✘-1 ~
12:31 $ brew gist-logs cloc
Error: No logs.
✘-1 ~
12:31 $ brew config
HOMEBREW_VERSION: 2.1.13-2-ga05e4c1
ORIGIN: https://github.com/Homebrew/brew
HEAD: a05e4c1c0bc175ae7179aa20fec8ecce3712ef72
Last commit: 2 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: e022763bb9fb4335e31a79a80032ef07fbc9fa8a
Core tap last commit: 3 minutes ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_DEV_CMD_RUN: 1
CPU: octa-core 64-bit haswell
Homebrew Ruby: 2.3.7 => /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby
Clang: 10.0 build 1001
Git: 2.22.0 => /usr/local/bin/git
Curl: 7.54.0 => /usr/bin/curl
Java: 1.8.0_212, 1.8.0_144
macOS: 10.14.6-x86_64
CLT: 10.3.0.0.1.1562985497
Xcode: N/A
CLT headers: 10.3.0.0.1.1562985497
XQuartz: 2.7.11 => /opt/X11
✔ ~
12:32 $

outdated

Most helpful comment

I don't really understand why Homebrew can't simply install the Moo::Role package from cpan while installing cloc? (I'm not a perl user).

I did that and now cloc works fine for. For anyone else, these are the commands I used.

cpan App::cpanminus followed by /usr/local/Cellar/perl/5.30.0/bin/cpanm Moo::Role

All 9 comments

This was caused by brew perl installation. Feedback needed if package installation or brew doctor should detect and warn about potential problem caused by other brew packages.

We try to catch these cases, but cannot get all of them. It's not clear whether that would happen in a clean install, so we'll close for now.

So what was the answer here? It simply won't work if you have perl installed via Homebrew? I'm having the same issue and looking for the resolution.

I removed perl and packages which depends on perl. That was viable for me because I did not use those at all.

If you cannot do removals you could also try running command brew unlink perl to remove symlinks in the /usr/local/bin. If unlinking breaks dependant package features you are using you can link it back by using command brew link perl

Thanks. I have no idea why I have perl installed. I’ll see what can be done.

Same problem here, i had to brew unlink perl to get cloc to work. My vim installation requires perl, so i am forced to link/ unlink back and forth if i need cloc. Not sure if closing this issue is the right thing to do.

For clog it was ok to do but in the bigger scope there should be discussion if perl scripts should assume that user has brewer perl or system perl

I have not Catalina to check what is the truth but perl installation is not/will not be default on.

Earlier discussion was really short: https://discourse.brew.sh/t/mac-os-deprecating-system-scripting-languages/4941

I don't really understand why Homebrew can't simply install the Moo::Role package from cpan while installing cloc? (I'm not a perl user).

I did that and now cloc works fine for. For anyone else, these are the commands I used.

cpan App::cpanminus followed by /usr/local/Cellar/perl/5.30.0/bin/cpanm Moo::Role

Not sure if closing this issue is the right thing to do.

Up to the maintainers ultimately but there was this note when the issue was closed,

It's not clear whether that would happen in a clean install, so we'll close for now.

Can anyone reproduce with a completely clean install?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

xeoneux picture xeoneux  Â·  3Comments

ghostbar picture ghostbar  Â·  4Comments

sstadick picture sstadick  Â·  4Comments

BluePawDev picture BluePawDev  Â·  3Comments

jakepetroules picture jakepetroules  Â·  3Comments