Erlang/Elixir no longer works #613

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

Comments

Projects
None yet
@jmerriweather

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

This comment has been minimized.

Show comment
Hide comment
@benhillis

benhillis Jul 1, 2016

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>

Member

benhillis commented Jul 1, 2016

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>

@querynaut

This comment has been minimized.

Show comment
Hide comment
@querynaut

querynaut 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

querynaut 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

This comment has been minimized.

Show comment
Hide comment
@jmerriweather

jmerriweather Jul 3, 2016

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

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
@strmpnk

This comment has been minimized.

Show comment
Hide comment
@strmpnk

strmpnk Jul 5, 2016

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.

strmpnk commented Jul 5, 2016

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

This comment has been minimized.

Show comment
Hide comment
@jmerriweather

jmerriweather Jul 10, 2016

Still doesn't work as of insider build 14385

Still doesn't work as of insider build 14385

@jmerriweather

This comment has been minimized.

Show comment
Hide comment
@jmerriweather

jmerriweather Jul 13, 2016

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

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

@AlejandroHuerta

This comment has been minimized.

Show comment
Hide comment
@AlejandroHuerta

AlejandroHuerta Jul 14, 2016

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

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

This comment has been minimized.

Show comment
Hide comment
@JBraungardt

JBraungardt Jul 29, 2016

Same problems on build 1493.3

Same problems on build 1493.3

@nahtnam

This comment has been minimized.

Show comment
Hide comment
@nahtnam

nahtnam 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 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

This comment has been minimized.

Show comment
Hide comment
@nahtnam

nahtnam 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

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

This comment has been minimized.

Show comment
Hide comment
@doughsay

doughsay 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 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

This comment has been minimized.

Show comment
Hide comment
@doughsay

doughsay 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?

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

This comment has been minimized.

Show comment
Hide comment
@nahtnam

nahtnam Aug 4, 2016

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

nahtnam commented Aug 4, 2016

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

@doughsay

This comment has been minimized.

Show comment
Hide comment
@doughsay

doughsay Aug 4, 2016

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

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

This comment has been minimized.

Show comment
Hide comment
@doughsay

doughsay 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!

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

This comment has been minimized.

Show comment
Hide comment
@Andorbal

Andorbal 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.

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

This comment has been minimized.

Show comment
Hide comment
@colago

colago Aug 5, 2016

same here

colago commented Aug 5, 2016

same here

@bramd

This comment has been minimized.

Show comment
Hide comment

bramd commented Aug 11, 2016

+1

@sb89

This comment has been minimized.

Show comment
Hide comment

sb89 commented Aug 12, 2016

+1

@strmpnk

This comment has been minimized.

Show comment
Hide comment
@strmpnk

strmpnk Aug 12, 2016

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).

strmpnk commented Aug 12, 2016

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

This comment has been minimized.

Show comment
Hide comment
@romerod

romerod 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

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

This comment has been minimized.

Show comment
Hide comment
@jon49

jon49 Aug 15, 2016

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

jon49 commented Aug 15, 2016

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

@dyyylan

This comment has been minimized.

Show comment
Hide comment
@dyyylan

dyyylan Oct 26, 2016

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

dyyylan commented Oct 26, 2016

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

@strmpnk

This comment has been minimized.

Show comment
Hide comment
@strmpnk

strmpnk Oct 26, 2016

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.

strmpnk commented Oct 26, 2016

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.

@mglodack mglodack referenced this issue in mglodack/Bookmarks Oct 29, 2016

Open

Elixir Bash On Windows #65

@RoadRunnr

This comment has been minimized.

Show comment
Hide comment
@RoadRunnr

RoadRunnr Nov 30, 2016

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.

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

This comment has been minimized.

Show comment
Hide comment
@sunilmut

sunilmut Dec 1, 2016

Member

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 ?

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 ?

@strmpnk

This comment has been minimized.

Show comment
Hide comment
@strmpnk

strmpnk Dec 1, 2016

@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.

strmpnk commented Dec 1, 2016

@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

This comment has been minimized.

Show comment
Hide comment
@kgeo

kgeo 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.

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

This comment has been minimized.

Show comment
Hide comment
@sunilmut

sunilmut Feb 1, 2017

Member

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

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

This comment has been minimized.

Show comment
Hide comment
@jmerriweather

jmerriweather Feb 25, 2017

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

image

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

image

@selfup

This comment has been minimized.

Show comment
Hide comment
@selfup

selfup 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 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

This comment has been minimized.

Show comment
Hide comment
@selfup

selfup 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

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

This comment has been minimized.

Show comment
Hide comment
@dimitarvp

dimitarvp 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

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

This comment has been minimized.

Show comment
Hide comment
@kgeo

kgeo 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.

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

This comment has been minimized.

Show comment
Hide comment
@dimitarvp

dimitarvp Apr 25, 2017

@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).

@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

This comment has been minimized.

Show comment
Hide comment
@cgregfreeman

cgregfreeman Jul 1, 2017

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

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

@jmerriweather

This comment has been minimized.

Show comment
Hide comment
@jmerriweather

jmerriweather Jul 2, 2017

image

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

image

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

@cgregfreeman

This comment has been minimized.

Show comment
Hide comment
@cgregfreeman

cgregfreeman Jul 2, 2017

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

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