sass / sassc-ruby

Use libsass with Ruby!
MIT License
363 stars 157 forks source link

Fails to install on JRuby + Windows #214

Closed slonopotamus closed 4 years ago

slonopotamus commented 4 years ago

See test project and build log.

I've also reported this bug as ruby/setup-ruby#81 because I'm not sure what party is to blame here.

eregon commented 4 years ago

This sounds like an issue of JRuby to me:

Installing sassc 2.4.0 with native extensions
C:/Users/runneradmin/.rubies/jruby-9.2.13.0/lib/ruby/stdlib/rubygems/ext/builder.rb:76: warning: unsupported popen option: err
C:/Users/runneradmin/.rubies/jruby-9.2.13.0/lib/ruby/stdlib/rubygems/ext/builder.rb:76: warning: unsupported popen option: err
C:/Users/runneradmin/.rubies/jruby-9.2.13.0/lib/ruby/stdlib/rubygems/ext/builder.rb:76: warning: unsupported popen option: err
process_begin: CreateProcess(NULL, cc -I. -I/include/java -IC:/Users/runneradmin/.rubies/jruby-9.2.13.0/lib/ruby/include/ruby/backward -IC:/Users/runneradmin/.rubies/jruby-9.2.13.0/lib/ruby/include -I. -I./libsass/include -fPIC -fno-omit-frame-pointer -fno-strict-aliasing -fexceptions -DLIBSASS_VERSION=\"3.6.4\" -m64 -march=native -mtune=native -o c99func.o -c ./libsass/src/c99func.c, ...) failed.
make (e=2): The system cannot find the file specified.

mingw32-make: *** [Makefile:204: c99func.o] Error 2

https://github.com/jruby/jruby/blob/2f0c49000a4479a259b3e54db9898accb749d44f/lib/ruby/stdlib/rubygems/ext/builder.rb#L75-L76

Could you report it there?

slonopotamus commented 4 years ago

Hmm... Google says that process_begin: CreateProcess(...) failed message comes from mingw32-make and means that cc was not found on PATH. Why you think it is JRuby fault?

slonopotamus commented 4 years ago

Though I'm not sure why it searches for cc instead of something like mingw-w32-gcc.

eregon commented 4 years ago
C:/Users/runneradmin/.rubies/jruby-9.2.13.0/lib/ruby/stdlib/rubygems/ext/builder.rb:76: warning: unsupported popen option: err

is clearly a message from JRuby.

But it might not be what causes the error.

And the precompiled 2.4.0 - June 02, 2020 x64-mingw32 version doesn't get used on JRuby it seems?

Hmm... Google says that process_begin: CreateProcess(...) failed message comes from mingw32-make and means that cc was not found on PATH. Why you think it is JRuby fault?

So maybe mingw/MSYS2 should be added to PATH for JRuby too? I'll reopen https://github.com/ruby/setup-ruby/issues/81

slonopotamus commented 4 years ago

What puzzles me is that it does find mingw32-make (which is too a part of mingw/MSYS2, AFAIK), but doesn't find compiler. Possibly cc executable name is actually wrong. I do not know yet where cc name comes from.

Dunno, will try to reproduce this locally.

slonopotamus commented 4 years ago

Closing, everyone agreed that this needs to be fixed on ruby/setup-ruby side.