WSL: Fail build ruby on last release (14332) zlib error

ddfznt@DED-WORKSPACE:~$ rbenv install 2.3.1
Downloading ruby-2.3.1.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.1.tar.bz2
Installing ruby-2.3.1...

BUILD FAILED (Ubuntu 14.04 using ruby-build 20160426-2-g82e275d)

Inspect or clean up the working tree at /tmp/ruby-build.20160502235511.12656
Results logged to /tmp/ruby-build.20160502235511.12656.log

Last 10 log lines:
Failed to configure tk/tkutil. It will not be installed.
configuring zlib
make[1]: Entering directory `/tmp/ruby-build.20160502235511.12656/ruby-2.3.1'
make -C ext/digest/sha2 -w --jobserver-fds=6,7 -j V= realclean
make[2]: Entering directory `/tmp/ruby-build.20160502235511.12656/ruby-2.3.1/ext/digest/sha2'
Makefile:39: *** missing separator.  Stop.
make[2]: Leaving directory `/tmp/ruby-build.20160502235511.12656/ruby-2.3.1/ext/digest/sha2'
make[1]: *** [ext/digest/sha2/realclean] Error 2
make[1]: Leaving directory `/tmp/ruby-build.20160502235511.12656/ruby-2.3.1'
make: *** [build-ext] Error 2

About this issue

  • Original URL
  • State: closed
  • Created 11 years ago
  • Reactions: 2
  • Comments: 30 (6 by maintainers)

Most upvoted comments

Thanks for reporting. I tried this locally and it looks like something is mangling the /tmp/ruby-build.20160502235511.12656/ruby-2.3.1/ext/digest/sha2/Makefile file. Line 39 doesn’t look well formed. One of our developers actually just made a fix today that could potentially explain this. I’ll give this a try on tomorrow’s build and let you know if that resolves this issue.

@ginolon - The fix for this issue did not make the 14342 build. It will be in a future Insider build.

@AbhimanyuAryan the fix is here https://github.com/Microsoft/BashOnWindows/issues/222#issuecomment-222317612 – you’ve actually replied to that thread, so I’m not sure why there’s confusion here.

This issue is about the Ruby build failing, and it’s not failing for you anymore, and also the issue is closed, so for other bugs you encounter that actually have to do with WSL/Bash on Windows, you may want to actually file another issue.

@AbhimanyuAryan as mentioned here (https://github.com/rvm/rvm/commit/691ccb9fefd932d4af20b2e22e6501b87e8549a3), you need sudo ln -sf /proc/self/fd /dev/fd

It worked finally I have received Windows Insider update today. On earlier built it didn’t. Earlier I had some connectivity issue thanks for the support man 😃

It’s a real Ubuntu except that it’s not running a real Linux kernel. It’s running directly on top of a modified Windows kernel, with some wrappers implementing and/or emulating the core low-level Linux system calls and other kernel functionality. So you can install any Ubuntu package and run any Ubuntu program, but when the program tries to run, if that program tries to (broadly speaking) call some low-level function that hasn’t been implemented correctly yet, you’ll get an error.

If you want real Ubuntu on top of a real Linux kernel on top of Windows, that’s called a Virtual Machine. Lots of ways to do that today, and it works quite well. But it doesn’t integrate as nicely with your Windows environment. That’s the trade-off – Windows and Linux represent a computer in slightly different ways from each other; so either you keep them a little bit separate (that’s what a VM does), or you stitch them together extremely carefully (what this project aims to do).

@ddfznt It looks like the bug fix I mentioned resolved the rbenv install issue:

root@BENHILL-VM7:~# rbenv install 2.3.1
Downloading ruby-2.3.1.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.1.tar.bz2
Installing ruby-2.3.1...
Installed ruby-2.3.1 to /root/.rbenv/versions/2.3.1
root@BENHILL-VM7:~/.rbenv/versions/2.3.1# ruby -v
rbenv: ruby: command not found

The `ruby' command exists in these Ruby versions:
  2.3.1

root@BENHILL-VM7:~/.rbenv/versions/2.3.1# cd bin
root@BENHILL-VM7:~/.rbenv/versions/2.3.1/bin# ./ruby -v
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux]

If you install Brightbox’s Ruby PPA package, and try to install some gems, you will get a bunch of other Makefile problems…