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

3.3.* fails to compile #1341

Closed
Licenser opened this issue Oct 2, 2016 · 8 comments
Closed

3.3.* fails to compile #1341

Licenser opened this issue Oct 2, 2016 · 8 comments

Comments

@Licenser
Copy link
Contributor

Licenser commented Oct 2, 2016

Environment

A freshly checked out rebar3 from the upstream repo, git checkout 3.3.0 for the version

Erlang/OTP 18 [erts-7.3.1] [source] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false]

Eshell V7.3.1  (abort with ^G)

Current behaviour

Running bootstrap failes on a freshly checked out 3.3.*

./bootstrap
Dependency providers already exists
Dependency getopt already exists
Dependency cf already exists
Dependency erlware_commons already exists
Dependency certifi already exists
===> Verifying dependencies...
===> Compiling rebar
===> Cleaning out bbmustache...
===> Cleaning out certifi...
===> Cleaning out cf...
===> Cleaning out cth_readable...
===> Cleaning out erlware_commons...
===> Cleaning out eunit_formatters...
===> Cleaning out getopt...
===> Cleaning out providers...
===> Cleaning out rebar...
===> Cleaning out relx...
===> Cleaning out ssl_verify_fun...
===> Cleaning out ssl_verify_hostname...
===> Verifying dependencies...
===> Compiling getopt
===> Compiling providers
===> Compiling cf
===> Compiling erlware_commons
===> Compiling bbmustache
===> Compiling relx
===> Compiling eunit_formatters
===> Compiling cth_readable
===> Compiling certifi
===> Compiling ssl_verify_fun
===> Compiling rebar
===> Building escript...
escript: exception error: no match of right hand side value error
  in function  rebar_prv_escriptize:find_deps_of_deps/3 (src/rebar_prv_escriptize.erl, line 240)
  in call from rebar_prv_escriptize:find_deps/2 (src/rebar_prv_escriptize.erl, line 234)
  in call from rebar_prv_escriptize:escriptize/2 (src/rebar_prv_escriptize.erl, line 104)
  in call from rebar_prv_escriptize:do/1 (src/rebar_prv_escriptize.erl, line 72)
  in call from rebar_core:do/2 (src/rebar_core.erl, line 125)```

Expected behaviour

I would expect it t compile.

@ferd
Copy link
Collaborator

ferd commented Oct 2, 2016

This could have been the following thing fixed in 3.3.1:

though I guess it wouldn't make sense right yet. Could you clear _build and retry?

@Licenser
Copy link
Contributor Author

Licenser commented Oct 2, 2016

I doubt so, it also happens when using 3.3.1 or master. I'll try to kill the index and see if that changes things.

@Licenser
Copy link
Contributor Author

Licenser commented Oct 2, 2016

removing ~/.cache/rebar3 doesn't change it either.

@Licenser
Copy link
Contributor Author

Licenser commented Oct 2, 2016

@ferd
Copy link
Collaborator

ferd commented Oct 2, 2016

From the debug output we've found that sasl is seen as a system dep, but not found in the root path, which triggers/fails the checks at https://github.com/erlang/rebar3/blob/master/src/rebar_prv_escriptize.erl#L243-L246 and tries to find it from local deps.

We should see if we can cope with that somehow or if the error is reasonable to expect. I'm thinking the SASL-but-not-in-a-root-lib is a fun edge case here, since for most libs in ERL_LIBS, this would be a reasonable error.

@Licenser
Copy link
Contributor Author

Licenser commented Oct 2, 2016

This was created by having code:root_dir/0 and the ERL_LIBS environment variable be two different things. (yay symlinks!)

@ferd
Copy link
Collaborator

ferd commented Oct 2, 2016

ERL_LIBS can be different from root_dir(), it just happens that apps in ERL_LIBS shadowed those in root_dir() -- that's even edgier of a case!

@Licenser
Copy link
Contributor Author

Licenser commented Oct 2, 2016

I see your edge and raise you another edge ERL_LIB pointed to a directory that was a symlink to what root_dir() was.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants