Homebrew / legacy-homebrew

💀 The former home of Homebrew/homebrew (deprecated)
https://brew.sh
26.97k stars 11.34k forks source link

Unable to install midnight-commander #8587

Closed celil-kj closed 12 years ago

celil-kj commented 13 years ago

Trying to run

$ brew install mc

crashes my computer. Has anybody been able to install the midnight-commander package successfully?

adamv commented 13 years ago

Crashes your computer how? Locks it up hard? Kernel panic?

Please post your brew --config.

celil-kj commented 13 years ago

It locks it up. Applications become unresponsive. Trying to close the terminal returns an error code. Were you able to install midnight-commander on your computer successfully?

$ brew --config
HOMEBREW_VERSION: 0.8
HEAD: 8ebbe58c2d8b64caee8cb6691fb5dd94d3260d9b
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_REPOSITORY: /usr/local
HOMEBREW_LIBRARY_PATH: /usr/local/Library/Homebrew
Hardware: quad-core 64-bit arrandale
OS X: 10.7.2
Kernel Architecture: x86_64
Ruby: 1.8.7-249
/usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
Xcode: 4.1
GCC-4.0: N/A 
GCC-4.2: build 5666 
LLVM: build 2335 
MacPorts or Fink? false
X11 installed? true
Sharpie commented 13 years ago

Just to make sure, when you say "unresponsive" do you mean the entire Terminal.app goes fully dead or do you mean that the window running the install is unresponsive to keyboard input but other windows and menus still work.

adamv commented 13 years ago

Please do an brew install -v midnight-commander and post the results or at least let us know where it appears to be stopping.

celil-kj commented 13 years ago

Here is the relevant output

Making install in extfs
make[5]: Nothing to be done for `install-exec-am'.
test -z "/usr/local/Cellar/midnight-commander/4.7.5.3/libexec/mc/extfs.d" || ../../../../config/install-sh -c -d "/usr/local/Cellar/midnight-commander/4.7.5.3/libexec/mc/extfs.d"
test -z "/usr/local/Cellar/midnight-commander/4.7.5.3/libexec/mc/extfs.d" || ../../../../config/install-sh -c -d "/usr/local/Cellar/midnight-commander/4.7.5.3/libexec/mc/extfs.d"
test -z "/usr/local/Cellar/midnight-commander/4.7.5.3/etc/mc" || ../../../../config/install-sh -c -d "/usr/local/Cellar/midnight-commander/4.7.5.3/etc/mc"
mkdir: /usr/local/Cellar/midnight-commander/4.7.5.3/libexec: File exists
mkdir: /usr/local/Cellar/midnight-commander/4.7.5.3/libexec/mc: File exists
mkdir: /usr/local/Cellar/midnight-commander/4.7.5.3/libexec/mc/extfs.d: File exists
 /usr/bin/install -c -m 644 sfs.ini '/usr/local/Cellar/midnight-commander/4.7.5.3/etc/mc'
 /usr/bin/install -c bpp rpm trpm u7z a+ apt+ audio deb deba debd dpkg+ iso9660 hp48+ lslR mailfs patchfs rpms+ s3+ uace ualz uar uarc uarj uc1541 ucab uha ulha urar uzip uzoo '/usr/local/Cellar/midnight-commander/4.7.5.3/libexec/mc/extfs.d'
 /usr/bin/install -c -m 644 README README.extfs '/usr/local/Cellar/midnight-commander/4.7.5.3/libexec/mc/extfs.d'
Making install in fish
make[5]: Nothing to be done for `install-exec-am'.
test -z "/usr/local/Cellar/midnight-commander/4.7.5.3/libexec/mc/fish" || ../../../../config/install-sh -c -d "/usr/local/Cellar/midnight-commander/4.7.5.3/libexec/mc/fish"
test -z "/usr/local/Cellar/midnight-commander/4.7.5.3/libexec/mc/fish" || ../../../../config/install-sh -c -d "/usr/local/Cellar/midnight-commander/4.7.5.3/libexec/mc/fish"
### 500
### 000
### 000
../../../../config/install-sh: fork: Resource temporarily unavailable
make[5]: *** [install-fishDATA] Error 128
make[5]: *** Waiting for unfinished jobs....
### 500
### 000
### 000
### 000
### 000
### 000
/private/tmp/homebrew-midnight-commander-4.7.5.3-llYa/mc-4.7.5.3/lib/vfs/mc-vfs/fish/mkdir: fork: Resource temporarily unavailable
make[5]: *** [install-fishSCRIPTS] Error 1
make[4]: *** [install-am] Error 2
make[3]: *** [install-recursive] Error 1
make[2]: *** [install-recursive] Error 1
make[1]: *** [install-recursive] Error 1
make: *** [install-recursive] Error 1
Sharpie commented 13 years ago

Works fine for me on 10.7.2 w/ XCode 4.1.

The error you are getting:

../../../../config/install-sh: fork: Resource temporarily unavailable

Usually occurs when the Kernel refuses to launch a new process because it has hit a limit on the number of programs it will allow to be active at once.

Basically, you have too many programs running so it refuses to start a new one to run install-sh.

IvoNet commented 13 years ago

I just restarted my mac after MC hoged my i7 for more than 2 hours and tried the command you suggested. brew install -v midnight-commander and got the same error as above. I don't have to many processes running but the MC job started lots. I had many sh and grep processes running. Had to do a hard kill of my pc to get it to stop. Trying to log of returned a logout-timeout. my brew --config: OMEBREW_VERSION: 0.8 HEAD: ed1a04798886f914bca4f1c6b5229b59e21fe0b5 HOMEBREW_PREFIX: /usr/local HOMEBREW_CELLAR: /usr/local/Cellar HOMEBREW_REPOSITORY: /usr/local HOMEBREW_LIBRARY_PATH: /usr/local/Library/Homebrew Hardware: quad-core 64-bit sandybridge OS X: 10.7.2 Kernel Architecture: x86_64 Ruby: 1.8.7-249 /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby Xcode: 4.2 GCC-4.0: N/A GCC-4.2: build 5666 LLVM: build 2336 MacPorts or Fink? false X11 installed? true

adamv commented 13 years ago

Speculation: the optimization flags under Xcode 4.2 are going into a spin?

IvoNet commented 13 years ago

Have tried it a couple of ways now by eliminating all orher processes and the fork problem persists. I think you must be right.

Ivo.

On 17 nov. 2011, at 18:42, Adam Vandenbergreply@reply.github.com wrote:

Speculation: the optimization flags under Xcode 4.2 are going into a spin?


Reply to this email directly or view it on GitHub: https://github.com/mxcl/homebrew/issues/8587#issuecomment-2779159

Sharpie commented 13 years ago

Allright, I just got a VM set up with XCode 4.2---I'll try to see if the build process is causing a fork bomb.

Sharpie commented 13 years ago

Midnight-commander installs smoothly for me on OS X 10.7.2 with XCode 4.2. No evidence of rampant forking.

IvoNet commented 13 years ago

What is your brew --config ?

Ivo.

On 17 nov. 2011, at 23:41, Charlie Sharpsteenreply@reply.github.com wrote:

Midnight-commander installs smoothly for me on OS X 10.7.2 with XCode 4.2. No evidence of rampant forking.


Reply to this email directly or view it on GitHub: https://github.com/mxcl/homebrew/issues/8587#issuecomment-2783201

adamv commented 13 years ago

Note I recently updated this to version 4.8.0.

Sharpie commented 13 years ago

@IvoNet

https://gist.github.com/1191673/45da238787190a9afe7b7a79f4ce16b756b180f9

IvoNet commented 13 years ago

I just tried again with brew install -v midnight-commander and still get the fork hog. The same as above. Before this I did a brew update.

Sharpie commented 13 years ago

Perhaps the following will work:

export HOMEBREW_MAKE_JOBS=1
brew install midnight-commander
IvoNet commented 13 years ago

export HOMEBREW_MAKE_JOBS=1 brew install midnight-commander

Tried that just now with this result: Warning: Formula already installed: midnight-commander

Then I tried: export HOMEBREW_MAKE_JOBS=1 brew uninstall midnight-commander brew install -v midnight-commander

and it resulted in the same fork hog but now the process stops and does not hang the system.

Sharpie commented 13 years ago

Well... I'm out of ideas. Until someone figures out what conditions are required to reproduce this problem, there is not much we can do.

remino commented 13 years ago

I'm having the same problem. After upading Homebrew, calling the following command:

brew install -v mc

Leads to a continuous memory and processing hog increase, while getting stuck at this part of make install:

test -z "/usr/local/Cellar/midnight-commander/4.8.0/libexec/mc/fish" || ../../../../config/install-sh -c -d "/usr/local/Cellar/midnight-commander/4.8.0/libexec/mc/fish"

adamv commented 13 years ago

@remino: Can you gist your brew --config and brew doctor please? Thanks!

remino commented 13 years ago

Thanks for the reply and sorry for my late one.

I just updated Homebrew again, but I'm getting the same problem.

brew --config:

HOMEBREW_VERSION: 0.8
HEAD: 9425c3bd1e59a84cc99af1a5d130a607f63f4970
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_REPOSITORY: /usr/local
HOMEBREW_LIBRARY_PATH: /usr/local/Library/Homebrew
Hardware: dual-core 64-bit penryn
OS X: 10.7.2
Kernel Architecture: x86_64
Ruby: 1.8.7-249
/usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
Xcode: 4.1
GCC-4.0: N/A
GCC-4.2: build 5666
LLVM: build 2335
Clang: 2.1-163.7.1
MacPorts or Fink? false
X11 installed? true

brew doctor:

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/libgio-2.0.0.dylib
    /usr/local/lib/libglib-2.0.0.dylib
    /usr/local/lib/libgmodule-2.0.0.dylib
    /usr/local/lib/libgobject-2.0.0.dylib
    /usr/local/lib/libgthread-2.0.0.dylib
    /usr/local/lib/libintl.8.dylib

Unbrewed .la files 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 .la files:
    /usr/local/lib/libgio-2.0.la
    /usr/local/lib/libglib-2.0.la
    /usr/local/lib/libgmodule-2.0.la
    /usr/local/lib/libgobject-2.0.la
    /usr/local/lib/libgthread-2.0.la
    /usr/local/lib/libintl.la

Some folders in /usr/local/share/locale aren't writable.
This can happen if you "sudo make install" software that isn't managed
by Homebrew. If a brew tries to add locale information to one of these
folders, then the install will fail during the link step.
You should probably `chown` them:

    /usr/local/share/locale/fi_FI
    /usr/local/share/locale/fi_FI/LC_MESSAGES
    /usr/local/share/locale/ia
    /usr/local/share/locale/ia/LC_MESSAGES
    /usr/local/share/locale/it_IT
    /usr/local/share/locale/it_IT/LC_MESSAGES
    /usr/local/share/locale/sv_SE
    /usr/local/share/locale/sv_SE/LC_MESSAGES

Some folders in /usr/local/share/man aren't writable.
This can happen if you "sudo make install" software that isn't managed
by Homebrew. If a brew tries to add locale information to one of these
folders, then the install will fail during the link step.
You should probably `chown` them:

    /usr/local/share/man/es
    /usr/local/share/man/es/man1
    /usr/local/share/man/hu
    /usr/local/share/man/hu/man1
    /usr/local/share/man/it
    /usr/local/share/man/it/man1
    /usr/local/share/man/pl
    /usr/local/share/man/pl/man1
    /usr/local/share/man/ru
    /usr/local/share/man/ru/man1
    /usr/local/share/man/sr
    /usr/local/share/man/sr/man1

gettext was detected in your PREFIX.

The gettext provided by Homebrew is "keg-only", meaning it does not
get linked into your PREFIX by default.

If you `brew link gettext` then a large number of brews that don't
otherwise have a `depends_on 'gettext'` will pick up gettext anyway
during the `./configure` step.

If you have a non-Homebrew provided gettext, other problems will happen
especially if it wasn't compiled with the proper architectures.

I ended up installing Midnight Commander using a package by Rudix:

http://code.google.com/p/rudix/wiki/mc

This is why brew doctor outputs the above. Before the installation of the package, it output nothing and echo $? output 0.

2bits commented 12 years ago

Looks like they are at version 4.8.1 now. Maybe that will help, but I can't connect to their website atm.

adamv commented 12 years ago

@remino the detected gettext will be a problem, as will the non-writable share folders. This will have to be resolved first.

eneagoe commented 12 years ago

I ran into the same issue, with the latest mc formula (445f286652b85c3e8e87839bad64c28ad2dc80661778571a0b59c2b920ef60ac) - the make install step is fork-bombing my system. Brew doctor is not reporting any issues and the config is: HOMEBREW_VERSION: 0.9 HEAD: e576a60c6588a68b6294d13096c5e645cfe4d965 HOMEBREW_PREFIX: /usr/local HOMEBREW_CELLAR: /usr/local/Cellar CPU: 8-core 64-bit sandybridge OS X: 10.7.3 Kernel Architecture: x86_64 Xcode: 4.3.2 GCC-4.0: N/A GCC-4.2: N/A LLVM: build 2336 Clang: 3.1 build 318 MacPorts or Fink? false X11: /usr/X11 System Ruby: 1.8.7-249 /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby Which Perl: /usr/bin/perl Which Python: /usr/bin/python Which Ruby: /Users/eneagoe/.rvm/rubies/ruby-1.9.2-p290/bin/ruby

2bits commented 12 years ago

It works for me on Lion with a Core i5 & 8GB of RAM. If you've read this whole issue, and I suppose you have, you'll know that we can't reproduce this unfortunately. I suggest you do several things.

  1. Edit the formula with brew edit mc or in your preferred text editor and add system 'make' so it looks like this

    system 'make'
    system "make install"
  2. If that doesn't solve your problem, then do this also, pasting the output into a gist if it fails:

    export HOMEBREW_MAKE_JOBS=1
    brew install -v mc 2>&1 | pbcopy
  3. If it fails, try installing the stable mc-4.8.1.3 that you can find at the bottom of their download page instead of the one we have listed in the formula, 4.8.3. You will have to change the sha256 also, which you can see listed on their site below the tarball.
  4. If everything you've tried still fails, reply here and link us the gists along with the other info in the wiki.
eneagoe commented 12 years ago

Thank you for the help - the problem is actually in the mc distribution, it's not at all related to homebrew. The 'make install' step is actually fork-bombing (it seems that the Fish VFS is the culprit). The only thing that helped was compiling mc with the --disable-vfs flag.

2bits commented 12 years ago

That's good to hear you got it working. I wish I knew why I can't reproduce this on Lion with a Core i5. Does it work if you leave vfs enabled but do this?

system 'make'
system 'make -j1 install'
eneagoe commented 12 years ago

Unfortunately that didn't work either. The system still becomes completely unresponsive after make install. A very quick ps after that shows a ton of sh and grep processes, but that's all I could figure out.

2bits commented 12 years ago

@adamv @sharpie as this is reoccurring, we should probably do something about it. The problem has been seen in the wild, http://forums.freebsd.org/showthread.php?t=18399

We can either create that directory before we call make install or we can make --disable-vfs the default and create an option to enable it.

@eneagoe You've been a big help. You don't have to do this if you're busy, but would you gist your terminal output when it bombs during the separate steps?

system 'make'
system 'make -j1 install'

That should show us two people have the hang on the same step remino listed above. Because the issue seems to revolve around its usage of an old, replaceable install-sh, you could also try installing automake and libtool then inserting this line right after def install like this:

def install
  system 'autoreconf', '-ivf'

and try it again. That gets you a new install-sh with some relevant bugfixes. Either way, thanks for reporting this.

2bits commented 12 years ago

@celil-kj @IvoNet could you guys try the autoreconf -ivf hack I posted above to see if that solves your fork hog problem? Thanks.

eneagoe commented 12 years ago

Sorry for the late reply. I've posted a few gists, with the output from running 'brew install -v mc'

  1. with "system make install" https://gist.github.com/2629264
  2. with "system make -j1 install" https://gist.github.com/2629282
  3. With automake and libtool re-installed, I added system 'autoreconf', '-ivf' to the formula: https://gist.github.com/2629301

After I added "--disable-vfs-fish" to the 'system "./configure"' options, without having to use the autoreconf option, the build and install succeeded.

2bits commented 12 years ago

Thanks a lot for helping. I will submit a pull request to change the formula, where it disables vfs-fish by default but has an option to enable it if the user wants to try. Those gists will help the mc developers track this down.

2bits commented 12 years ago

@eneagoe The mc bug report is asking for a few items. Please gist these when you have some time. Thanks again for you help.

LC_MESSAGES=C mc -V
LC_MESSAGES=C mc -F
mc --configure-options
echo $SHELL
eneagoe commented 12 years ago

LC_MESSAGES=C mc -V output is at https://gist.github.com/2630028 LC_MESSAGES=C mc -F output is at https://gist.github.com/2630038 mc --configure-options output is at https://gist.github.com/2630041 echo $SHELL gives '/bin/bash'

Sharpie commented 12 years ago

The mc bug report is asking for a few items.

For reference, here is the bug report:

https://www.midnight-commander.org/ticket/2806

2bits commented 12 years ago

@eneagoe The developers have asked in the bug report for your config.log. We also ask for that in the Bug Reporting wiki, but I guess we overlooked that here. Would you please build this again so that if fails using the lastest mc formula like this:

brew update
brew rm mc
brew install -vd --fish mc
cat config.log | pbcopy
exit 1

and paste the ouput into a new gist please? Thanks.

eneagoe commented 12 years ago

Unfortunately the config.log is empty (zero size). It's probably because the brew install -vd --fish mc never finishes - I had to kill it with an interrupt signal after 15 minutes, the system was completely unresponsive. It probably won't help, but the last lines in the shell output were

test -z "/usr/local/Cellar/midnight-commander/4.8.3/libexec/mc/fish" || ../../../../config/install-sh -c -d "/usr/local/Cellar/midnight-commander/4.8.3/libexec/mc/fish" ../../../../config/install-sh: fork: Resource temporarily unavailable

500

make[5]: * [install-fishSCRIPTS] Error 128 make[5]: * Waiting for unfinished jobs.... ./ls: fork: Resource temporarily unavailable ../../../../config/install-sh: fork: Resource temporarily unavailable ../../../../config/install-sh: fork: Resource temporarily unavailable make[5]: * [install-fishDATA] Error 128 make[4]: * [install-am] Error 2 make[3]: * [install-recursive] Error 1 make[2]: * [install-recursive] Error 1 make[1]: * [install-recursive] Error 1 make: * [install-recursive] Error 1

^C Error: Interrupt /usr/local/Library/Homebrew/utils.rb:95:in wait' /usr/local/Library/Homebrew/utils.rb:95:insystem' /usr/local/Library/Homebrew/utils.rb:102:in safe_system' /usr/local/Library/Homebrew/formula.rb:413:insystem' /usr/local/Library/Formula/midnight-commander.rb:18:in install' /usr/local/Library/Homebrew/build.rb:88:ininstall' /usr/local/Library/Homebrew/formula.rb:192:in brew' /usr/local/Library/Homebrew/formula.rb:519:instage' /usr/local/Library/Homebrew/extend/fileutils.rb:22:in mktemp' /usr/local/Library/Homebrew/formula.rb:515:instage' /usr/local/Library/Homebrew/formula.rb:187:in brew' /usr/local/Library/Homebrew/build.rb:67:ininstall' /usr/local/Library/Homebrew/build.rb:30 /usr/local/Library/Formula/midnight-commander.rb:13 ==> Rescuing build... When you exit this shell Homebrew will attempt to finalise the installation. If nothing is installed or the shell exits with a non-zero error code, Homebrew will abort. The installation prefix is: /usr/local/Cellar/midnight-commander/4.8.3 Aborting due to non-zero exit status

2bits commented 12 years ago

That is good info, and much appreciated. I'll forward it along to the developers.

2bits commented 12 years ago

The thread issue over there has gone cold. At least we tried.

eneagoe commented 12 years ago

It's definitely not a problem in homebrew, and we found a work-around, so it's fine for now. Thank you very much for the effort!

2bits commented 12 years ago

@eneagoe @celil-kj @IvoNet Hello again. The MC developers have crafted a patch and would like you to test whether it fixes the fork bombs. The way to test this out would be to

brew rm -f mc
brew install -v --HEAD https://github.com/2bits/homebrew/raw/26c9ae796d1e6504165a820c21a12c75d0b1d448/Library/Formula/midnight-commander.rb

I'm asking you to build the HEAD of their software tree because the patch applies to that, not to 4.8.3. If you can verify that this works, then the fix should appear in 4.8.4. This formula doesn't have the --fish option. I lost that commit when I accidentally deleted that branch from my repo. This formula just builds all the modules like before. Thanks for your help.

eneagoe commented 12 years ago

Unfortunately the patch doesn't fix the problem, it still forks-bomb the system, still because of the fish vfs module. I did get a config.log this time, though: https://gist.github.com/2894589

2bits commented 12 years ago

Thanks, I'll let them know.