grisp / rebar3_grisp

Rebar plug-in for GRiSP
https://www.grisp.org
Apache License 2.0
21 stars 10 forks source link

Rebar3 grisp build with nonexisting _grisp dir fails #9

Closed peerst closed 6 years ago

peerst commented 6 years ago
 $ rm -rf _grisp _build
 $ rebar3 grisp build
===> Fetching rebar3_grisp ({pkg,<<"rebar3_grisp">>,<<"0.1.0">>})
===> Downloaded package, caching at /Users/peer/.cache/rebar3/hex/default/packages/rebar3_grisp-0.1.0.tar
===> Compiling rebar3_grisp
===> Verifying dependencies...
===> Fetching grisp ({pkg,<<"grisp">>,<<"0.1.1">>})
===> Downloaded package, caching at /Users/peer/.cache/rebar3/hex/default/packages/grisp-0.1.1.tar
===> Fetching rebar3_eqc ({pkg,<<"rebar3_eqc">>,<<"0.0.10">>})
===> Downloaded package, caching at /Users/peer/.cache/rebar3/hex/default/packages/rebar3_eqc-0.0.10.tar
===> Fetching cf ({pkg,<<"cf">>,<<"0.1.2">>})
===> Downloaded package, caching at /Users/peer/.cache/rebar3/hex/default/packages/cf-0.1.2.tar
===> Compiling cf
===> Compiling rebar3_eqc
===> Fetching mapz ({pkg,<<"mapz">>,<<"0.3.0">>})
===> Downloaded package, caching at /Users/peer/.cache/rebar3/hex/default/packages/mapz-0.3.0.tar
===> Checking out Erlang/OTP 19.3.6
* Cloning...  (this may take a while)
===> Preparing GRiSP code
* Copying C code...
* Patching OTP...
===> Building
* Running autoconf...
* Running configure...  (this may take a while)
* Building...  (this may take a while)
* Installing...
spawn: Could not cd to /Users/peer/projects/grisp/grisp_sd/_grisp/otp/19.3.6/install
===> sh(rm -rf /Users/peer/projects/grisp/grisp_sd/_grisp/otp/19.3.6/install/*)
failed with return code 2 and the following output:

The directory install doesn't exist.

Workaraound: after it failed create the missing dir and retry

$ mkdir _grisp/otp/19.3.6/install
$ rebar3 grisp build
===> Verifying dependencies...
===> Checking out Erlang/OTP 19.3.6
* Using existing checkout
===> Preparing GRiSP code
* Copying C code...
* Patching OTP...
===> Building
* Running autoconf...
* Running configure...  (this may take a while)
* Building...  (this may take a while)
* Installing...
===> Done
holzingk commented 6 years ago

The new config advises users to run rebar3 compile before. But that's just a workaround.

peerst commented 6 years ago

That workaround didn’t work for me

peerst commented 6 years ago

Retried with the latest version: calling rebar3 compile doesn't create the missing directory nor does it fix the problem otherwise.

The only workaround that works for me is calling mkdir _grisp/otp/19.3.6/install after the first failed build. Or probably calling mkdir -p _grisp/otp/19.3.6/install before rebar3 grisp build

peerst commented 6 years ago

Now that I have the most current rebar3_grisp plugin (had a old one installed globaly) the workaround with rebar3 compile works for me too

peerst commented 6 years ago

Ok all, this was caused by old global rebar3_grisp plugins installed.

Caveat: updating global rebar3 plugins doesn't work with rebar3 plugins upgrade