Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I can't compile mruby in cygwin envrionment #4884

Closed
ykominami opened this issue Dec 20, 2019 · 2 comments
Closed

I can't compile mruby in cygwin envrionment #4884

ykominami opened this issue Dec 20, 2019 · 2 comments

Comments

@ykominami
Copy link

I can't compile latest mruby in cygwin environment.

ruby ./minirake
(in /cygdrive/v/ext3/ghq/src/github.com/mruby/mruby)
CC    mrbgems/mruby-compiler/core/codegen.c -> build/test/mrbgems/mruby-compiler/core/codegen.o
      0 [main] ruby 3584 dofork: child -1 - forked process 19016 died unexpectedly, retry 0, exit code 0xC0000005, errno 11
1083773 [main] ruby 3584 dofork: child -1 - forked process 20880 died unexpectedly, retry 0, exit code 0xC0000005, errno 11
2130728 [main] ruby 3584 dofork: child -1 - forked process 21180 died unexpectedly, retry 0, exit code 0xC0000005, errno 11

OS
Windows10(64bit)
Build environment
Cygwin 64bit
Ruby
ruby 2.6.4p104 (2019-08-28 revision 67798) [x86_64-cygwin]

I found #4085.
Kisima reported same error message.
matz closed that in #4101 on Sep 4, 2018.

But, I can't compile mruby(8780974) in cygwin.

I change mruby code as shown below.

diff --git a/minirake b/minirake
index 8df395e9..05871bc2 100755
--- a/minirake
+++ b/minirake
@@ -499,7 +499,7 @@ class RakeApp
   def run
     handle_options

-    unless $rake_root_fiber
+    if $rake_root_fiber
       require 'fiber'
       $rake_root_fiber = Fiber.current
     end

This change resolve compiler error caused by using Fiber in cygwin.

But another problem happens.
It is resolved by code change shown below.

$ git diff
diff --git a/lib/mruby/build.rb b/lib/mruby/build.rb
index 55b82cd2..c080857a 100644
--- a/lib/mruby/build.rb
+++ b/lib/mruby/build.rb
@@ -280,7 +280,7 @@ EOS
       if name.is_a?(Array)
         name.flatten.map { |n| cygwin_filename(n) }
       else
-        `cygpath -w "#{filename(name)}"`.strip
+        '"%s"' % `cygpath -w "#{filename(name)}"`.strip
       end
     end
@matz
Copy link
Member

matz commented Dec 20, 2019

Use rake instead of minirake for Cygwin. We will remove minirake in the future. (mruby 3.0?)

@matz matz closed this as completed Dec 20, 2019
@shuujii
Copy link
Contributor

shuujii commented Dec 20, 2019

I agree to remove minirake 👍 Personally, I think there is almost no problem without minirake (rather there are some problems such as limitations due to incompatibility with Rake and increased maintenance costs), so I think we can delete it in the near future if we take the following countermeasures:

  • Make minirake a just wrapper for rake.
  • Change the --pull-gems option to be specified by an environment variable, etc.

FYI, parallel execution is possible with rake -m.

take-cheeze added a commit to take-cheeze/mruby that referenced this issue Dec 21, 2019
take-cheeze added a commit to take-cheeze/mruby that referenced this issue Dec 22, 2019
take-cheeze added a commit to take-cheeze/mruby that referenced this issue Dec 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants