-
Notifications
You must be signed in to change notification settings - Fork 297
Error: Bad file descriptor when install ace #3
Comments
From some reason I don't yet understand, Ruby 2.0 does not work with Homebrew on Linux. Can someone confirm whether Ruby 2.0 works with Homebrew on Mac OS X? If it doesn't work on OS X either, this issue should be moved to mxcl/homebrew. |
@janckerchen Please report |
This is an issue on all platforms. In Ruby 2.0, all file descriptors (except 0, 1, and 2) are marked close-on-exec by default. Homebrew uses a pipe to pass exceptions between the build process and the main process, but in Ruby 2.0 this descriptor is closed in the build process. So we either need to pass this fd hash as the last argument to exec on Ruby 2 (which means building up the args as an array because Ruby 1.8 doesn't accept this argument) or unset FD_CLOEXEC on the descriptor before exec'ing. |
@jacknagel The latter seems like a clean solution. Does anyone have the impetus to fix this? |
Looking into it, it doesn't appear it's possible to unset this flag (even from C, let alone ruby). So we'll have to go with the former. I'll work up a patch later. |
Thanks, Jack. |
@janckerchen As a workaround: brew tap homebrew/versions
brew install ruby193 |
I merged the patch into core. |
oh! my ruby version is ruby20, I install it just for confirm linux brew works well, ruby20 is default version in this brach. I uninstall it now and restore my default ruby19, all errors disappear. But life is not easy, right? here is another gift for you~, #6 "brew install ace" failed for other reason. I close this issue. |
my linuxbrew commit:
The text was updated successfully, but these errors were encountered: