Closed NobbZ closed 8 years ago
I am not sure how ESL distributes erlang on Debian. I compile from source using kerl
or use Homebrew.
First make sure you have the erl_docgen
app (which should be shipped with OTP).
Your trace says docgen_otp_spes:module/2
is not found, which I can't replicate:
0 erldocs master λ find /usr/local -name docgen_otp_specs.erl
/usr/local/Cellar/erlang/18.2.1/lib/erlang/lib/erl_docgen-0.4.1/src/docgen_otp_specs.erl
Then cd into erldocs and run make test
As you can see, it is inplace:
% find /usr/lib/erlang -name '*docgen*'
/usr/lib/erlang/lib/erl_docgen-0.4.1
/usr/lib/erlang/lib/erl_docgen-0.4.1/src/docgen_otp_specs.erl
/usr/lib/erlang/lib/erl_docgen-0.4.1/src/docgen_edoc_xml_cb.erl
/usr/lib/erlang/lib/erl_docgen-0.4.1/src/docgen_xmerl_xml_cb.erl
Also this is in the code-path as far as I can see:
1> io:format("~p~n", [code:get_path()]).
[..., "/usr/lib/erlang/lib/erl_docgen-0.4.1", ...] % stripped
edit: Just tried make test, after a clean. As expected, erldocs is compiled first, then I do get output similar to the one above and make complains about errors.
I just left my laptop alone for a while and used evm
to install 18.2. compiling and running tests using that do work.
Further testing shows that the version used to compile seems irrelevant. Regardless of which one I use for compiling, when I am running systems erlang, then I get the error described above, when I switch to evm
's 18.2 everything works fine.
So it seems as if the escript isn't as self-contained as it should be. Or am I missing something on self-contained?
Escripts are not supposed to contain OTP releases. You have an issue with ESL-packaged Erlang on your laptop, unrelated to erldocs.
I don't know if this also happens with other 18.x, but with the latest OTP from erlang-solutions for ubuntu and debian it does happen.
I compiled
erldocs
frommaster
(f042748) using the aforementioned erlang version. When I want to use it like./erldocs .
I do get the trace in this gist for every single file in the project. This example is the last block of output when trying to runerldocs
in its own sourcedirectory.