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

"Couldn't install" error because kerl uses random install script #289

Closed
llaisdy opened this issue Jul 16, 2018 · 7 comments
Closed

"Couldn't install" error because kerl uses random install script #289

llaisdy opened this issue Jul 16, 2018 · 7 comments

Comments

@llaisdy
Copy link

llaisdy commented Jul 16, 2018

Dear All

I am running kerl 1.8.3 on MacOS 10.13.4. I have successfully built and installed erlang releases using kerl on this machine in the recent past (but n.b. with kerl 1.5.1).

My latest attempt got the "Couldn't install" error message:

$  kerl install r203 ~/bin/erl_kerl_builds/r203
Installing Erlang/OTP 20.3 (r203) in /Users/ivan/bin/erl_kerl_builds/r203...
Couldn't install Erlang/OTP 20.3 (r203) in /Users/ivan/bin/erl_kerl_builds/r203

Digging into the kerl shell script I ran the relevant shell function (from do_install line 816) with out the ">/dev/null 2>&1" to see a more informative error message ...

$ cd .kerl/builds/r203/otp_src_20.3/

$ ERL_TOP=/Users/ivan/.kerl/builds/r203/otp_src_20.3 ./otp_build release -a /Users/ivan/bin/erl_kerl_builds/r203

=== Entering application stdlib
make  RELEASE_PATH="/Users/ivan/bin/erl_kerl_builds/r203"   release_spec
mkdir -p "/Users/ivan/bin/erl_kerl_builds/r203/lib/stdlib-3.4.4/src"
/Library/Frameworks/R.framework/Resources/bin/install -c -m 644 -p array.erl base64.erl
  beam_lib.erl ... win32reg.erl zip.erl erl_parse.yrl
  "/Users/ivan/bin/erl_kerl_builds/r203/lib/stdlib-3.4.4/src"
/Library/Frameworks/R.framework/Resources/bin/install: line 34: /bin/R: No such file or directory

The kerl script is using the install script from my R installation, or rather, what seems to be my default install script:

$ which install
/Library/Frameworks/R.framework/Resources/bin/install

My questions are:

  • does the kerl set up not have an install of its own?

  • is there a standard install which my R installation might be masking?

Thanks

Ivan

@fenollp
Copy link
Contributor

fenollp commented Jul 16, 2018

Looks like R is too high in your $PATH. Try putting it at the tail.

On osx I have: (consider that I did brew install coreutils)

0 ~  (21.0) λ which install
/usr/local/opt/coreutils/libexec/gnubin/install
0 ~  (21.0) λ whereis install
/usr/bin/install

@llaisdy
Copy link
Author

llaisdy commented Jul 16, 2018

Good point. I add things to the front, which is probably a bad idea.

@llaisdy
Copy link
Author

llaisdy commented Jul 16, 2018

That fixed it, thanks. Had to rebuild

@llaisdy llaisdy closed this as completed Jul 16, 2018
@thoughtarray
Copy link

thoughtarray commented Apr 6, 2020

Hi all. I was debating on whether to open a new ticket or reopen this one—it seems very closely related.

I'm on MacOS 10.15.3 & kerl 1.8.7, but I believe this issue affects many versions of MacOS.

I was receiving an unhelpful Couldn't install Erlang/OTP [blah] in [blah] message. I was about to brew install coreutils like fenollp, but I got to doing something else and discovered that (after having updated XCode) I needed to accept the CLI terms & conditions (sudo xcodebuild -license accept).

I believe it'd be MacOS user-friendly to add a check for this. Or at lease output the error messages by default.

@jadeallenx
Copy link
Collaborator

Hi, thanks for the report. Can you please help me understand what you're asking kerl should check?

That your install script is what you expect? Or that xcode doesn't complain? Or both? I'm looking for the desired behavior as you see it. Thanks!

@thoughtarray
Copy link

Hi @mrallen1, thanks for responding.

The desired result is to know why kerl install is failing. In this case, it was because of XCode licensing. The lowest impact change would just be outputting errors to STDERR. The next level would be including some kind of check to see if the installation failure is because of an XCode license acceptance issue. This check is pretty common and is included in tools like brew (which is how I installed kerl).

@jadeallenx
Copy link
Collaborator

Ah, I see. Instead of eating the errors in /dev/null, we should capture them and emit them if the command fails. That's good feedback. I will open a new ticket on your behalf :)

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

4 participants