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

ERL-241: erts/start_scripts sometimes fails compile with: mv: cannot stat 'RELEASES': No such file or directory #3439

Closed
OTP-Maintainer opened this issue Sep 1, 2016 · 1 comment
Labels
bug Issue is reported as a bug priority:medium team:VM Assigned to OTP team VM
Milestone

Comments

@OTP-Maintainer
Copy link

Original reporter: kentnl
Affected versions: OTP-18.3, OTP-17.4, OTP-19.0
Fixed in version: OTP-19.1
Component: erts
Migrated from: https://bugs.erlang.org/browse/ERL-241


Forwarded bug from https://bugs.gentoo.org/show_bug.cgi?id=537206 

Primary analysis suggests that something transpires that invokes the target

{quote}{{erts/start_scripts/RELEASES.src}}{quote}

Prior to the building of 

{quote}{{erts/start_scripts/start_sasl.rel}}{quote}

https://github.com/erlang/otp/blob/maint/erts/start_scripts/Makefile#L193-L196
{quote}{code:Make}
RELEASES.src:
    $(gen_verbose)$(INSTALL_DIR) $(SS_TMP)
    $(V_at)( cd $(SS_TMP) && \
    $(ERL) -noinput +B -eval 'release_handler:create_RELEASES("%ERL_ROOT%", "$(SS_ROOT)", "$(SS_ROOT)/start_sasl.rel", []), halt()')
    $(V_at)mv RELEASES RELEASES.src
{code}{quote}

This appears to have the {{create_RELEASES}} invocation silently fail,and then the subsequent {{mv}} fails.

Reproducing the problem at a global context is not straight forward, but it is mostly straight
forward to demonstrate that directly invoking the {{RELEASES.src}} target on a clean directory fails due to failure to ensure dependencies build.

Suggested fixes are either 

{quote}{code:diff}
-RELEASES.src:
+RELEASES.src: $(SS_ROOT)/start_sasl.rel
{code}{quote}

or

{quote}{code:diff}
-RELEASES.src:
+RELEASES.src: $(REL_SCRIPTS)
{code}{quote}

I however don't know which is the right approach because I don't fully understand what side effects may exist, if any, from the respective choices.

I have however tested the first of these two, and it resolves the problem for me to the best of my understanding.


@OTP-Maintainer
Copy link
Author

egil said:

Your suggestion looks good. I'll add a fix for it to 19.1. Thanks!

@OTP-Maintainer OTP-Maintainer added bug Issue is reported as a bug team:VM Assigned to OTP team VM priority:medium labels Feb 10, 2021
@OTP-Maintainer OTP-Maintainer added this to the OTP-19.1 milestone Feb 10, 2021
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 priority:medium team:VM Assigned to OTP team VM
Projects
None yet
Development

No branches or pull requests

1 participant