Open 7stud opened 7 years ago
I'll investigate and try to fix it, but it looks like evm's version of Erlang is trying to use your system's path to build the dialyzer.
On Thu, Mar 23, 2017 at 8:47 AM, 7stud notifications@github.com wrote:
I have erlang 17.5 installed in /usr/local/lib. evm considers that my "system" install. After installing evm, I downloaded erlang 19.2, and I can switch back and forth between my two versions of erlang using:
$ evm system (erlang 17.5)
$ evm use 19.2 (erlang 19.2)
I was able to set up dialyzer with erlang 17.5, but when I switch to erlang 19.2 and try to setup dialyzer, here is what happens :
~/erlang_programs$ evm use 19.2
~/erlang_programs$ dialyzer Checking whether the PLT /Users/7stud/.dialyzer_plt is up-to-date... no (the PLT /Users/7stud/.dialyzer_plt was built with an old version of Dialyzer) Compiling some key modules to native code... done in 0m0.24s Rebuilding the information in /Users/7stud/.dialyzer_plt... dialyzer: Analysis failed with error: Could not scan the following file(s): Could not get core Erlang code for: /usr/local/lib/erlang/lib/stdlib-2.4/ebin/timer.beam Could not get core Erlang code for: /usr/local/lib/erlang/lib/stdlib-2.4/ebin/sys.beam Could not get core Erlang code for: /usr/local/lib/erlang/lib/stdlib-2.4/ebin/supervisor_bridge.beam Could not get core Erlang code for: /usr/local/lib/erlang/lib/stdlib-2.4/ebin/supervisor.beam Could not get core Erlang code for: /usr/local/lib/erlang/lib/stdlib-2.4/ebin/lists.beam Could not get core Erlang code for: /usr/local/lib/erlang/lib/stdlib-2.4/ebin/proc_lib.beam Could not get core Erlang code for: /usr/local/lib/erlang/lib/stdlib-2.4/ebin/gen_event.beam Could not get core Erlang code for: /usr/local/lib/erlang/lib/stdlib-2.4/ebin/gen_server.beam Could not get core Erlang code for: /usr/local/lib/erlang/lib/stdlib-2.4/ebin/array.beam Could not get core Erlang code for: /usr/local/lib/erlang/lib/kernel-3.2/ebin/seq_trace.beam Could not get core Erlang code for: /usr/local/lib/erlang/lib/kernel-3.2/ebin/rpc.beam Could not get core Erlang code for: /usr/local/lib/erlang/lib/kernel-3.2/ebin/gen_udp.beam Could not get core Erlang code for: /usr/local/lib/erlang/lib/kernel-3.2/ebin/gen_tcp.beam Could not get core Erlang code for: /usr/local/lib/erlang/lib/kernel-3.2/ebin/file.beam Could not get core Erlang code for: /usr/local/lib/erlang/lib/kernel-3.2/ebin/disk_log.beam Could not get core Erlang code for: /usr/local/lib/erlang/lib/kernel-3.2/ebin/code.beam Could not get core Erlang code for: /usr/local/lib/erlang/lib/kernel-3.2/ebin/application.beam Could not get core Erlang code for: /usr/local/lib/erlang/lib/erts-6.4/ebin/erlang.beam Last messages in the log cache: Reading files and computing callgraph...
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/robisonsantos/evm/issues/26, or mute the thread https://github.com/notifications/unsubscribe-auth/AAHvLdryTipWC6sqi-5tajPpmK2QR9wEks5ropQKgaJpZM4Mm84J .
-- Robison W R Santos
If you do:
$ evm use 19.2
$ mv $HOME/.dialyzer_plt $HOME/.dialyzer_plt_system
$ cd ~/erlang_programs
$ dialyzer
Do you still get the same error?
You can then go back to the old plt file by renaming it back, if you want.
$ mv $HOME/.dialyzer_plt_system $HOME/.dialyzer_plt
Also, do you have your LD_LIBRARY_PATH set with anything?
What's the result of
echo $LD_LIBRARY_PATH
?
As a temporary workaround, I changed the name of the file--just like you suggested--then everything worked correctly using erlang 19.2 and dialyzer.
I get a blank line for echo $LD_LIBRARY_PATH
:
$ echo $LD_LIBRARY_PATH
$
The plt file will have to be re-created/updated every time you move to a new erlang version. I think that one way to solve this would be to store the current plt file when we "evm use" a different erlang version and restore the plt created for that version, if available from the evm tmp storage.
That way you can have one dialyzer_plt for each version always working.
If I have time, I'll try to work on that during the weekend.
On Fri, Mar 24, 2017 at 3:05 AM, 7stud notifications@github.com wrote:
As a temporary workaround, I changed the name of the file, then everything worked correctly using 19.2 and dialyzer.
I get a blank line for echo $LD_LIBRARY_PATH.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/robisonsantos/evm/issues/26#issuecomment-288981705, or mute the thread https://github.com/notifications/unsubscribe-auth/AAHvLZZ_b1A_ldYb7HgpBytH5sLL7jOxks5ro5V9gaJpZM4Mm84J .
-- Robison W R Santos
No worries. It's not anything that will affect me too much. I just wanted to let you know about the issue.
My 5 cents, this is not an issue. If you change erlang version, all bets are off, you need to completely remove _build and whatever folder has the PLT. Anything else will result in failed builds, analyses, or worse, inconsistent artifacts that fail later.
I have
erlang 17.5
installed in /usr/local/lib.evm
considers that my "system" install. After installing evm, I downloadederlang 19.2
, and I can switch back and forth between my two versions of erlang using:I was able to set up dialyzer with erlang 17.5, but when I switch to erlang 19.2 and try to setup dialyzer, here is what happens :
17.5: $ which dialyzer /usr/local/bin/dialyzer
19.2: $ which dialyzer /Users/7stud/.evm/erlang_versions/otp_src_19.2/bin/dialyzer