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

ERROR: download_ex_doc failed. #8656

Closed
conradwt opened this issue Jul 11, 2024 · 6 comments · Fixed by #8707
Closed

ERROR: download_ex_doc failed. #8656

conradwt opened this issue Jul 11, 2024 · 6 comments · Fixed by #8707
Assignees
Labels
bug Issue is reported as a bug team:VM Assigned to OTP team VM

Comments

@conradwt
Copy link

Describe the bug

When building the documentation (i.e. Building docs...), I'm getting the following error message:

ERROR: download_ex_doc failed.
( cd /Users/conradwt/.asdf/plugins/erlang/kerl-home/builds/asdf_27.0.1/otp_src_27.0.1/erts/start_scripts/tmp && \
	  erlc -W  -I/Users/conradwt/.asdf/plugins/erlang/kerl-home/builds/asdf_27.0.1/otp_src_27.0.1/lib/kernel/ebin -I/Users/conradwt/.asdf/plugins/erlang/kerl-home/builds/asdf_27.0.1/otp_src_27.0.1/lib/stdlib/ebin -I/Users/conradwt/.asdf/plugins/erlang/kerl-home/builds/asdf_27.0.1/otp_src_27.0.1/lib/sasl/ebin +otp_build -o /Users/conradwt/.asdf/plugins/erlang/kerl-home/builds/asdf_27.0.1/otp_src_27.0.1/bin/start_sasl.script /Users/conradwt/.asdf/plugins/erlang/kerl-home/builds/asdf_27.0.1/otp_src_27.0.1/erts/start_scripts/start_sasl.rel )
/opt/local/bin/ginstall -c -d /Users/conradwt/.asdf/plugins/erlang/kerl-home/builds/asdf_27.0.1/otp_src_27.0.1/erts/start_scripts/tmp
( cd /Users/conradwt/.asdf/plugins/erlang/kerl-home/builds/asdf_27.0.1/otp_src_27.0.1/erts/start_scripts/tmp && \
	  erlc -W  -I/Users/conradwt/.asdf/plugins/erlang/kerl-home/builds/asdf_27.0.1/otp_src_27.0.1/lib/kernel/ebin -I/Users/conradwt/.asdf/plugins/erlang/kerl-home/builds/asdf_27.0.1/otp_src_27.0.1/lib/stdlib/ebin -I/Users/conradwt/.asdf/plugins/erlang/kerl-home/builds/asdf_27.0.1/otp_src_27.0.1/lib/sasl/ebin +no_warn_sasl +otp_build -o /Users/conradwt/.asdf/plugins/erlang/kerl-home/builds/asdf_27.0.1/otp_src_27.0.1/bin/start_clean.script /Users/conradwt/.asdf/plugins/erlang/kerl-home/builds/asdf_27.0.1/otp_src_27.0.1/erts/start_scripts/start_clean.rel )
/opt/local/bin/ginstall -c -d /Users/conradwt/.asdf/plugins/erlang/kerl-home/builds/asdf_27.0.1/otp_src_27.0.1/erts/start_scripts/tmp
( cd /Users/conradwt/.asdf/plugins/erlang/kerl-home/builds/asdf_27.0.1/otp_src_27.0.1/erts/start_scripts/tmp && \
	  erlc -W  -I/Users/conradwt/.asdf/plugins/erlang/kerl-home/builds/asdf_27.0.1/otp_src_27.0.1/lib/kernel/ebin -I/Users/conradwt/.asdf/plugins/erlang/kerl-home/builds/asdf_27.0.1/otp_src_27.0.1/lib/stdlib/ebin -I/Users/conradwt/.asdf/plugins/erlang/kerl-home/builds/asdf_27.0.1/otp_src_27.0.1/lib/sasl/ebin +no_warn_sasl +otp_build +no_dot_erlang -o /Users/conradwt/.asdf/plugins/erlang/kerl-home/builds/asdf_27.0.1/otp_src_27.0.1/bin/no_dot_erlang.script /Users/conradwt/.asdf/plugins/erlang/kerl-home/builds/asdf_27.0.1/otp_src_27.0.1/erts/start_scripts/no_dot_erlang.rel )
Neither sha1sum nor sha256sum found to verify /Users/conradwt/.asdf/plugins/erlang/kerl-home/builds/asdf_27.0.1/otp_src_27.0.1/bin/ex_doc
Please check manually that the correct ex_doc was downloaded.

To Reproduce

asdf install erlang 27.0.1

Expected behavior

I expected the build to complete without error.

Affected versions

OTP 27.0.1

Additional context

I didn't experience this issue when installing OTP 27.0 on Apple M1 using macOS 14.5.

@conradwt conradwt added the bug Issue is reported as a bug label Jul 11, 2024
@IngelaAndin IngelaAndin added the team:VM Assigned to OTP team VM label Jul 11, 2024
@jhogberg jhogberg added the stalled waiting for input by the Erlang/OTP team label Jul 15, 2024
@jhogberg
Copy link
Contributor

Thanks for your report! Unfortunately most of us are on vacation right now, we'll revisit this once we're back. :-)

@GRoguelon
Copy link

GRoguelon commented Jul 17, 2024

@conradwt I found the issue. The problem is located in otp_build, the build tries to check if either sha256sum or sha1sum commands are available. If not it returns the error you shared.

I see you are on macOS so you can fix it by installing coreutils.

With brew just do:

brew install coreutils

After you installed your Erlang version you can remove it, it is used only to check the integrity of ex_doc.

@conradwt
Copy link
Author

@GRoguelon Great catch because I totally missed this issue. Anyway, I'm guessing it may be best to leave these tools installed because ex_doc integrity will need to be checked for each new OTP installation >= 27.0.1.

It's interesting that OTP team would introduce a dependency that's not called out in the documentation and didn't exist in OTP 27.0.

@GRoguelon
Copy link

GRoguelon commented Jul 17, 2024

@conradwt I was blocked myself on the issue.

macOS has the command shasum which works exactly like the current implementation you just need to provide which hash function you want with the option -a, like: -a 256. Maybe it should be considered as fallback in case of miss on the sha256sum and sha1sum commands.

https://ss64.com/mac/shasum.html

@conradwt
Copy link
Author

@GRoguelon Shasum and other dependencies should be documented and added to the build process. The build process must use the appropriate command for the underlying OS here. This is only an issue for local development because most tend not to install docs in production.

@kikofernandez kikofernandez removed the stalled waiting for input by the Erlang/OTP team label Aug 12, 2024
kikofernandez added a commit that referenced this issue Aug 16, 2024
…ild-doc-on-osx/GH-8656

otp_build: add shasum to check hash on OSX

OTP-19193
@kikofernandez
Copy link
Contributor

fixed by #8707, closing issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is reported as a bug team:VM Assigned to OTP team VM
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants