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

Erlang/Elixir no longer works #613

Closed
jmerriweather opened this issue Jul 1, 2016 · 38 comments
Closed

Erlang/Elixir no longer works #613

jmerriweather opened this issue Jul 1, 2016 · 38 comments

Comments

@jmerriweather
Copy link

As of the latest build 14379 Erlang no longer works. I've tried lxrun /uninstall /full /y and reinstalled however it still doesn't work. I've also attempted installing the previous version of Erlang 18.3.4.

Seems like it might be file system related, the error we get is
erl: Is a directory

When i go to the directory it should be located in I get the following:
no-erl

@benhillis
Copy link
Member

What apt-get packages did you install prior to running erl? After I ran apt-get install erlang-base I'm able to run erl:

ben@BENHILL-VM3:/usr/bin$ which erl
/usr/bin/erl
ben@BENHILL-VM3:/usr/bin$ erl
Erlang R16B03 (erts-5.10.4) [source] [64-bit] [smp:4:4] [async-threads:10] [kernel-poll:false]

Eshell V5.10.4  (abort with ^G)
1>

@jastax
Copy link

jastax commented Jul 2, 2016

I'm running into the same issue. I followed the elixir installation guide: http://elixir-lang.org/install.html.


Next try:

$ apt-get install erlang-base
$ erl
image

@jmerriweather
Copy link
Author

I also followed the steps on elixir-lang: http://elixir-lang.org/install.html
Ubuntu by default includes a very old version of Erlang, so you'll need to grab the latest version from Erlang Solutions.
I did the following:

wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb
sudo dpkg -i erlang-solutions_1.0_all.deb

then:

sudo apt-get update
sudo apt-get install esl-erlang

@cararemixed
Copy link

I've also confirmed the issue (ESL builds are up to date and outside of this issue, very solid). I also had issues building Erlang from source with a similar sort of X is not a file sort of error. It seems like there is a bug in the VFS translation somewhere.

@jmerriweather
Copy link
Author

Still doesn't work as of insider build 14385

@jmerriweather
Copy link
Author

@benhillis Still doesn't work as of insider build 14388

@AlejandroHuerta
Copy link

Looks like they're pretty busy making fixes for the A release, telling from the latest entry on the release notes. Hopefully this is resolved before the official release on 8/2

@JBraungardt
Copy link

Same problems on build 1493.3

@nahtnam
Copy link

nahtnam commented Aug 3, 2016

Im having the same issue here. How do I get rid of erlang? Right now I keep getting erl is a directory.

@nahtnam
Copy link

nahtnam commented Aug 3, 2016

Fixed it by running sudo apt-get purge esl-erlang and then following this: http://stackoverflow.com/a/27215937

But when I do erl -v, I get a huge crash.dump

@doughsay
Copy link

doughsay commented Aug 4, 2016

I've tried several things now as well, the most promising being what's described here: http://elixir-lang.org/install.html

This causes the bash: /usr/bin/erl: Is a directory error, and the above described behavior with the bin directory acting funny.

The basic erlang package from the base repo installs and seems to work fine, but it's too old at version 16.0. We need 18.0 or higher to run Elixir... Using the erlang solutions repo to install either erlang or esl-erlang doesn't work...

Any updates on this?

EDIT: sorry I meant to also include that I'm on the official anniversary update here, no inside build.

@doughsay
Copy link

doughsay commented Aug 4, 2016

Here's an interesting idea... Ubuntu 16.04 (the latest LTS release) includes erlang 18.3 in it's base repo. If we could use the latest Ubuntu with BashOnWindows, that might solve our issues? What are the chances of being able to upgrade the Ubuntu version?

@nahtnam
Copy link

nahtnam commented Aug 4, 2016

I've heard that people have problems upgrading Ubuntu with bash on windows.

@doughsay
Copy link

doughsay commented Aug 4, 2016

Yeah... I'm looking more to encourage an official upgrade to 16.04. Not to attempt it using apt-get.

@doughsay
Copy link

doughsay commented Aug 4, 2016

Guys, this it totally possible, I've got it working. It was a huge hassle, and I haven't done much stability testing, but it seems to work.

capture2
capture3

Effectively, this is what I did (sorry I can't remember exact steps):

0.5) Modify your sudoers file to allow nopasswd for your account.
1.) Upgrade to the latest Ubuntu using http://www.omgubuntu.co.uk/2016/08/upgrade-bash-windows-10-ubuntu-16-04-lts
2.) Step 1 hosed my sudo, which was very hard to fix, so I suggest doing step 0.5 first! If your sudo is hosed like mine, the second solution of this article helped me: http://stackoverflow.com/questions/10232121/set-environment-variable-ssh-askpass-or-askpass-in-sudoers-resp
3.) sudo apt-get install erlang elixir
4.) upgrade to a newer elixir using exenv
5.) you should now have a working up-to-date elixir environment!

@Andorbal
Copy link

Andorbal commented Aug 4, 2016

Looks like the '/usr/bin/erl: Is a directory` error is caused by a bad symlink.

This is what the symlink looked like after installed esl-erlang:
image

I fixed it manually: $ sudo ln -s ../lib/erlang/bin/erl erl and now it's back to the Crash dump is being written to: error.

@colago
Copy link

colago commented Aug 5, 2016

same here

@bramd
Copy link

bramd commented Aug 11, 2016

+1

1 similar comment
@sb89
Copy link

sb89 commented Aug 12, 2016

+1

@cararemixed
Copy link

Rather than bump this with +1's. Are there steps we can take to help Microsoft reproduce or narrow down the issue? I've been trying each preview with the same results but I'd be happy to strace with specific flags.

The specific issue may seem unimportant since it's not Ubuntu's Erlang package but one from Erlang Solutions instead. The reality is that many (most?) Erlang and Elixir developers require more recent releases (think of this similar to telling someone to use node 0.10 or older for modern node dev).

@romerod
Copy link

romerod commented Aug 13, 2016

I've installed it like that:
wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb && sudo dpkg -i erlang-solutions_1.0_all.deb
sudo apt-get update
sudo apt-get install esl-erlang=1:18.3
sudo rm /usr/bin/erl
sudo ln -s /usr/lib/erlang/bin/erl /usr/bin/erl
sudo apt-get install elixir

And it works on the official 14393 build, had to fix the simlink like @Andorbal suggested

The esl-erlang build which doesn't seem to work on "bash on windows" is 19.0.2
image

image

@jon49
Copy link

jon49 commented Aug 15, 2016

Make sure to purge esl-erlang first before installing the older version 1:18.3

@dylantf
Copy link

dylantf commented Oct 26, 2016

Have there been any updates to this problem? It looks like it still persists on 19.1

@cararemixed
Copy link

I haven't run an strace on it but my hunch is that the new timer stuff that landed in 19.x may relate to missing syscalls. You might want to look for options in configure to see if anything can be toggled.

@RoadRunnr
Copy link

Comparing a strace of 19.1 on WSL with one on native Linux, it appears as if this would be the cruelprint:

118   sendmsg(6, {msg_name(0)=NULL, msg_iov(1)=[{"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\t\0\0\0\10\0\0\0\v\0\0\0\0\0\0\0", 32}], msg_controllen=32, [{cmsg_len=28, cmsg_level=SOL_SOCKET, cmsg_type=SCM_RIGHTS, [9, 8, 11]}], msg_flags=0}, 0 <unfinished ...>
118   <... sendmsg resumed> )           = -1 EINVAL (Invalid argument)

Doing the same on Linux yields this:

3290  sendmsg(10, {msg_name(0)=NULL, msg_iov(1)=[{"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\r\0\0\0\f\0\0\0\17\0\0\0\0\0\0\0", 32}], msg_controllen=32, [{cmsg_len=28, cmsg_level=SOL_SOCKET, cmsg_type=SCM_RIGHTS, [13, 12, 15]}], msg_flags=0}, 0 <unfinished ...>
3290  <... sendmsg resumed> )           = 32

The use of SCM_RIGHTS is new in 19.0. It was introduced in this commit: erlang/otp@14c7fef

#514 and #1326 are about the same problem with SCM_RIGHTS.

@sunilmut
Copy link
Member

sunilmut commented Dec 1, 2016

Thanks @RoadRunnr for detailed analysis. Very helpful! We already have a bug to track #514. Will prioritize it. For validation, is the repro the same as posted by @romerod ?

@cararemixed
Copy link

@sunilmut The steps from @romerod will reproduce it (as long as you use version 19.x instead of 18.x, which is from before the change to use SCM_RIGHTS). The 19.x is installed by default if you leave the constraint off of the erlang or esl-erlang package install.

@kgeo
Copy link

kgeo commented Dec 1, 2016

I followed @romerod installation advise, but I forgot to hold the package at the 18.3 release, After a while I carelessly apt-get upgraded and nothing worked and I had to reinstall 18.3.

So don't forget to
sudo apt-mark hold esl-erlang
after installation until the issue is resolved.

@sunilmut
Copy link
Member

sunilmut commented Feb 1, 2017

Just an update that the fix for this has been checked in the dev branch and should soon hit the release branch.

@jmerriweather
Copy link
Author

I can confirm that this issue has now been fixed in the latest insider build 15042

image

@selfup
Copy link

selfup commented Apr 23, 2017

@jmerriweather Still an issue unfortunately :(

Even after the new Creators Update.

Edit/Update

Seems I updated wrong somehow. Look below.

Also #613 (comment) is the correct way of doing things

@selfup
Copy link

selfup commented Apr 23, 2017

Going to wipe 14.04 and upgrade to 16.04 via:

C:\> lxrun /uninstall /full /y

C:\> lxrun /install

Works after some crazy shenanigans 😂

Had to revert prior to Creators Update (seems I did something wrong here before)

Did a refresh

Then re-updated (took a while)

Now everything works! 🎉

Also #613 (comment) is the correct way of doing things

@dimitarvp
Copy link

dimitarvp commented Apr 24, 2017

  1. Updated to the Creators Update (version 1703).
  2. Did sudo do-release-upgrade in the Windows 10 Ubuntu bash shell.
  3. Version:
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.2 LTS"
  1. elixir -v worked just fine:
$ elixir -v
Erlang/OTP 19 [erts-8.3] [source-d5c06c6] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false]

Elixir 1.4.2

@kgeo
Copy link

kgeo commented Apr 25, 2017

Thanks dimitarvp!
Worked here as well.
Small question: why do you have elixir 1.4.2? I am still getting 1.4.1 (and OTP 18). Tried to reenable the elixir repo and upgrade, but that did not change the version.

@dimitarvp
Copy link

@kgeo I simply download the precompiled version and extract it in a directory which is in my $PATH (~/bin/elixir). I don't use Ubuntu's package manager for Elixir (if I understood your question correctly).

@cgregfreeman
Copy link

It looks like this now doesn't work with OTP 20

@jmerriweather
Copy link
Author

image

@cgregfreeman OTP 20 looks to be working for me. Tested on 1703 (Build 15063.447)

@cgregfreeman
Copy link

Thank you, @jmerriweather . After forcing the update to 15063, I was able to get OTP 20 to work without a hitch.

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