[MacRuby-devel] [macruby] #90: macruby fails to install (problem with File.join)
macruby
ruby-noreply at macosforge.org
Wed Jun 25 14:26:56 PDT 2008
#90: macruby fails to install (problem with File.join)
-----------------------------------+----------------------------------------
Reporter: jakub.suder at gmail.com | Owner: lsansonetti at apple.com
Type: defect | Status: new
Priority: blocker | Milestone:
Component: MacRuby | Keywords:
-----------------------------------+----------------------------------------
Current trunk version (rev. 305) fails to install on my computer. I'm
running OSX 10.5.3, I have version 0.2 installed from the binary package
and tried to install the latest version from source. It compiles
successfully, but sudo rake install throws such exception:
(in /Users/psionides/Downloads/macruby-trunk2)
./miniruby instruby.rb --make="/usr/bin/make" --dest-dir=""
--extout=".ext" --mflags="" --make-flags="" --data-mode=0644 --prog-
mode=0755 --installed-list .installed.list --mantype="doc"
installing binary commands
/Users/psionides/Downloads/macruby-trunk2/lib/fileutils.rb:1259:in
`initialize': Is a directory -
/Library/Frameworks/MacRuby.framework/Versions/0.3/usr/bin/
(Errno::EPERM::ENOENT::ESRCH::EINTR::EIO::ENXIO::E2BIG::ENOEXEC::EBADF::ECHILD::EAGAIN::ENOMEM::EACCES::EFAULT::ENOTBLK::EBUSY::EEXIST::EXDEV::ENODEV::ENOTDIR::EISDIR::EINVAL::ENFILE::EMFILE::ENOTTY::ETXTBSY::EFBIG::ENOSPC::ESPIPE::EROFS::EMLINK::EPIPE::EDOM::ERANGE::EDEADLK::ENAMETOOLONG::ENOLCK::ENOSYS::ENOTEMPTY::ELOOP::ENOMSG::EIDRM::ENOSTR::ENODATA::ETIME::ENOSR::EREMOTE::ENOLINK::EPROTO::EMULTIHOP::EBADMSG::EOVERFLOW::EILSEQ::EUSERS::ENOTSOCK::EDESTADDRREQ::EMSGSIZE::EPROTOTYPE::ENOPROTOOPT::EPROTONOSUPPORT::ESOCKTNOSUPPORT::EOPNOTSUPP::EPFNOSUPPORT::EAFNOSUPPORT::EADDRINUSE::EADDRNOTAVAIL::ENETDOWN::ENETUNREACH::ENETRESET::ECONNABORTED::ECONNRESET::ENOBUFS::EISCONN::ENOTCONN::ESHUTDOWN::ETOOMANYREFS::ETIMEDOUT::ECONNREFUSED::EHOSTDOWN::EHOSTUNREACH::EALREADY::EINPROGRESS::ESTALE::EDQUOT::NOERROR)
from /Users/psionides/Downloads/macruby-
trunk2/lib/fileutils.rb:1259:in `open'
from /Users/psionides/Downloads/macruby-
trunk2/lib/fileutils.rb:1259:in `block in copy_file'
from /Users/psionides/Downloads/macruby-
trunk2/lib/fileutils.rb:1258:in `open'
from /Users/psionides/Downloads/macruby-
trunk2/lib/fileutils.rb:1258:in `copy_file'
from /Users/psionides/Downloads/macruby-
trunk2/lib/fileutils.rb:462:in `copy_file'
from /Users/psionides/Downloads/macruby-
trunk2/lib/fileutils.rb:838:in `block in install'
from /Users/psionides/Downloads/macruby-
trunk2/lib/fileutils.rb:1392:in `block in fu_each_src_dest'
from /Users/psionides/Downloads/macruby-
trunk2/lib/fileutils.rb:1406:in `fu_each_src_dest0'
from /Users/psionides/Downloads/macruby-
trunk2/lib/fileutils.rb:1390:in `fu_each_src_dest'
from /Users/psionides/Downloads/macruby-
trunk2/lib/fileutils.rb:834:in `install'
from instruby.rb:133:in `install'
from instruby.rb:233:in `block in <main>'
from instruby.rb:412:in `call'
from instruby.rb:412:in `block (2 levels) in <main>'
from instruby.rb:409:in `each'
from instruby.rb:409:in `block in <main>'
from instruby.rb:405:in `each'
from instruby.rb:405:in `<main>'
rake aborted!
I've investigated this error, and it seems that the call "File.join(dest,
File.basename(src))" in fu_each_src_dest0 function in fileutils.rb doesn't
always return what it should. In this case src = 'macruby', dest =
'/Library/Frameworks/MacRuby.framework/Versions/0.3/usr/bin/', but the
result is '/Library/Frameworks/MacRuby.framework/Versions/0.3/usr/bin/'
instead of
'/Library/Frameworks/MacRuby.framework/Versions/0.3/usr/bin/macruby'. I
ended up in the code of rb_file_join function in file.c, where strings are
concatenated using CFStringAppend, but in this case CFStringAppend only
appends the first string (.../usr/bin), and appending another (macruby)
doesn't work, I don't know why.
I found that this area of code was modified in changesets 213 and 214, and
when I reverted those changes, the installation passed that point at which
it previously failed (although it still failed later on another path).
That's all I was able to figure out, I hope this helps...
--
Ticket URL: <http://ruby.macosforge.org/trac/ticket/90>
macruby <http://ruby.macosforge.org/>
More information about the MacRuby-devel
mailing list