erlang / erlide_eclipse

Eclipse IDE for Erlang
http://erlide.org
202 stars 70 forks source link

unable to open erlide project created with different version of erlang #313

Closed geib closed 6 years ago

geib commented 6 years ago

I recently upgraded to erlang R19, on a mac with homebrew.

After the upgrade I am unable to open projects created and developed while erlang R18 was installed. The erlide.log provides no information.

screen shot 2018-02-07 at 3 45 40 pm
vladdu commented 6 years ago

Does the log give more details?

vladdu commented 6 years ago

Also, can you use the erlang->troubleshooting preference page? If yes, what does it say?

geib commented 6 years ago

I created a new workspace, and then a new erlang project, which never references the R18 erlang install. I get the same error, and this snippet from the erlide.log that seems relevant is here:

08:32:51,374 F: (OtpNodeProxy.java:426) : START node :> [/usr/local/lib/erlang/bin/erl, -sname, 19_b71f7_geib_c1ab2@null, -setcookie, erlide] /Users/geib/workspaces/erlide_test 08:32:51,374 F: (OtpNodeProxy.java:306) : Runtime 19_b71f7_geib_c1ab2@null starting 08:32:51,374 F: (BackendFactory.java:54) : Create backend b71f7_geib_c1ba2_erlide 08:32:51,376 F: (OtpNodeProxy.java:426) : START node :> [./bin/erl, -sname, b71f7_geib_c1ba2_erlide@null, -setcookie, erlide] /Users/geib/workspaces/erlide_test 08:32:51,376 F: (OtpNodeProxy.java:306) : Runtime b71f7_geib_c1ba2_erlide@null starting 08:32:51,381 F: (OtpNodeProxy.java:213) : 19_b71f7_geib_c1ab2@null: waiting connection to peer... 08:32:51,381 S: (OtpNodeProxy.java:439) : Could not create runtime: [./bin/erl, -sname, b71f7_geib_c1ba2_erlide@null, -setcookie, erlide] 08:32:51,382 S: (OtpNodeProxy.java:440) : Cannot run program "./bin/erl" (in directory "/Users/geib/workspaces/erlide_test"): error=2, No such file or directory java.io.IOException: Cannot run program "./bin/erl" (in directory "/Users/geib/workspaces/erlide_test"): error=2, No such file or directory at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048) at org.erlide.runtime.internal.OtpNodeProxy$OtpNodeProxyService.startRuntimeProcess(OtpNodeProxy.java:436) at org.erlide.runtime.internal.OtpNodeProxy$OtpNodeProxyService.startUp(OtpNodeProxy.java:359) at com.google.common.util.concurrent.AbstractExecutionThreadService$1$2.run(AbstractExecutionThreadService.java:55) at com.google.common.util.concurrent.Callables$3.run(Callables.java:93) at java.lang.Thread.run(Thread.java:745) Caused by: java.io.IOException: error=2, No such file or directory at java.lang.UNIXProcess.forkAndExec(Native Method) at java.lang.UNIXProcess.(UNIXProcess.java:248) at java.lang.ProcessImpl.start(ProcessImpl.java:134) at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029) ... 5 more 08:32:51,383 S: (OtpRpcProvider.java:20) : No Erlang runtime is installed! (Expected the service to be RUNNING, but the service has FAILED) 08:32:51,418 F: (ErlideScanner.java:73) : null

vladdu commented 6 years ago

Ok, so erlide can't find Erlang. Where do you have it installed? Is it configured in Preferences>Erlang>Instlled runtimes?

geib commented 6 years ago

Erlang is locate at /usr/local/lib/erlang/...

I was looking at the troubleshooting preference page, and I just discovered that I am unable to set the values for ~/.erlide_hosts. When I put values there and then save, the file is not written.

screen shot 2018-02-08 at 9 03 31 am screen shot 2018-02-08 at 9 03 46 am
geib commented 6 years ago

I think this is somewhat of red herring. I discovered that when homebrew installs older versions of erlang it uses some funky file paths with the "@" in the path, i.e. erlang@19...

I downloaded and built from source and pointed erlide at that install and everything is working fine.

This may be more an issue with Eclipse, not sure. The installed path ends up being /usr/local/opt/erlang@19/lib/erlang just for your information.

vladdu commented 6 years ago

That makes sense, probably /usr/local/bin/erlang is just a symlink and we look for more stuff alongside it, that doesn't exist there. You could try to use the long path in Eclipse, it would be interesting to know if it works.

I will see if I can provide more informative messages, or at least strongly recommend to use locally built Erlang installations. I think you can close this if it works now?

geib commented 6 years ago

Yes, I just tried the long path. "/usr/local/opt/erlang@19/lib/erlang" works.

Thanks.