elixir icon indicating copy to clipboard operation
elixir copied to clipboard

Digest Update / boringssl compile error on MacOS 10.13 Beta 17A264c

Open LawJolla opened this issue 9 years ago • 16 comments

Environment

  • Elixir & Erlang versions (elixir 1.4.4):
  • Operating system: MacOS 10.13 Beta 17A264c

Current behavior

mix new test

 # mix.exs
  defp deps do
    [{:poison, "~> 2.2.0"}] # or any other dependency.. poison is just an example
  end

mix deps.get Error: Assertion failed: (ctx), function digest_update, file /BuildRoot/Library/Caches/com.apple.xbs/Sources/boringssl/boringssl-88.0.0.1.1/apple/crypto/digests.c, line 47.

This error message also occurs for mix test iex -S mix and occurs on any other project with any dependency.

This behavior occurred on two different Macs (2010 Mac Pro and 2015 MacBook) both running 10.13 beta.

Expected behavior

Compile without errors

###Discussion

This error is above my pay grade. 👍 I'm not sure if it could be an Erlang issue. If this is not an Elixir issue, please let me know.

Also, I know it's not typical to file issues on beta software. However, the error message suggested that something fundamental may have changed with Apple's SSL implementation (or a different directory/symlink), so I thought it worthwhile to bring to everyone's attention sooner than later.

Thank you for all of your hard work and making my life infinitely better in the process!

LawJolla avatar Jun 07 '17 04:06 LawJolla

Hi @LawJolla, we will leave this open in case others run into the same issue and we can discuss it, but we won't investigate it ourselves as it requires a beta OS version and it may be even an OS bug. Certainly it isn't an Elixir bug, maybe, maybe Erlang's.

josevalim avatar Jun 07 '17 06:06 josevalim

@LawJolla btw, how are you using installing Erlang? Did you install it again? If you are using homebrew, installing it again or installing it from source may fix it. Otherwise it is understandable that Erlang will no longer works if it is now dynamically linking to a different library.

josevalim avatar Jun 07 '17 08:06 josevalim

Hi @josevalim ! It's installed via homebrew. I did try a reinstall with no luck.

I read on the elixir forum of the same issue. One member seems convinced, as you suggested, that it's an Erlang issue. He's tried multiple kerl builds with different configs and can't shake the error.

LawJolla avatar Jun 07 '17 15:06 LawJolla

Definitely not an Elixir bug. You can reproduce the crash in the Erlang shell directly. But I even doubt that this is a bug from Erlang and suppose that it comes from the macOS beta.

Here is the link to the forum thread in question: https://elixirforum.com/t/macos-10-13-beta-compile-error-boringssl-phoenix-project/5821/5

redrabbit avatar Jun 07 '17 16:06 redrabbit

Let's hope Apple fixes in Beta 2!

mager avatar Jun 13 '17 15:06 mager

Not fixed in beta 2.

idyll avatar Jun 21 '17 22:06 idyll

Given the comments on the Apple Dev Forums and Elixir Forums, this appears to be a decision by Apple and not a bug. I doubt Apple will "fix" anything. It'll need to come from Erlang.

LawJolla avatar Jun 21 '17 22:06 LawJolla

I was hoping apple would namespace BoringSSL so that Erlang didn't find it. It seems like a better choice than what they are doing.

Either way I have opened: https://bugs.erlang.org/browse/ERL-439

idyll avatar Jun 22 '17 17:06 idyll

Also I have verified that OTP 20 and Elixir 1.4.5 still exhibit this issue. Even with

      --disable-dynamic-ssl-lib
      --with-ssl=#{Formula["openssl"].opt_prefix}
      --with-ssl-rpath=no

idyll avatar Jun 22 '17 17:06 idyll

This works for me:

https://github.com/Homebrew/homebrew-core/pull/15297

Once it is merged we can close this issue I think...

idyll avatar Jul 05 '17 18:07 idyll

:heart: :green_heart: :blue_heart: :yellow_heart: :purple_heart:

josevalim avatar Jul 05 '17 18:07 josevalim

Please close this @josevalim. The PR has been accepted by home-brew. I have back-ported to 18, 19 and 20 and the Erlang team has merged the fix into master to be released with 20.1.

idyll avatar Jul 08 '17 18:07 idyll

Beautiful!

josevalim avatar Jul 08 '17 19:07 josevalim

Just make sure, to re-install erlang >= 20.x and remove all earlier erlang versions, I had bad conflicting versions, which hadn't been removed properly. Those two commands helped me to get erlang / elixir / phoenix work properly again:

brew update
brew uninstall erlang --ignore-dependencies --force
brew reinstall erlang --force-bottle

bitflorist avatar Jul 14 '17 19:07 bitflorist

Updating homebrew solved this error for me when updating to macOS High Sierra. Thanks everyone for this thread! 👍 🔥

Assertion failed: (ctx), function digest_update, file /BuildRoot/Library/Caches/com.apple.xbs/Sources/boringssl/boringssl-88.0.0.1.1/apple/crypto/digests.c, line 47

Grantimus9 avatar Jan 08 '18 17:01 Grantimus9

radosch's solution worked for me, but additionally, I had to reinstall brew uninstall elixir, brew install elixir

nmpennypacker avatar May 28 '18 12:05 nmpennypacker