HashNuke / heroku-buildpack-elixir

Heroku Buildpack for Elixir with nitro boost
MIT License
810 stars 304 forks source link

Doesn't work with Heroku-20 Stack #179

Closed KazW closed 3 years ago

KazW commented 3 years ago

Currently this buildpack is broken on the Heroku-20 stack, builds fail with the following error:

-----> Stack changed, will rebuild
-----> Fetching Erlang 23.1.1
-----> Installing Erlang 23.1.1 (changed)
-----> Fetching Elixir v1.11.1 for OTP 23
-----> Installing Elixir v1.11.1 (changed)
-----> Installing Hex
/app/.platform_tools/erlang/erts-11.1.1/bin/beam.smp: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
-----> Installing rebar
/app/.platform_tools/erlang/erts-11.1.1/bin/beam.smp: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
-----> Fetching app dependencies with mix
/app/.platform_tools/erlang/erts-11.1.1/bin/beam.smp: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
 !     Push rejected, failed to compile Elixir app.
 !     Push failed

I haven't dug into this yet, but I'll see what I can figure out over the weekend.

jesseshieh commented 3 years ago

Thanks for the report @KazW. Anything you can figure out would be very much appreciated!

KazW commented 3 years ago

@jesseshieh I managed to get it fixed, but I had to replace to OTP builds repo, it's still building for Cedar-14. I'll be maintaining a fork of this buildpack that uses the new OTP build repo I made, which builds Erlang using the Heroku Docker images. I also plan to put together a documentation website at https://elixir-buildpack.app/

You can find the fork of the buildpack and the new OTP build system here: https://github.com/elixir-buildpack

I created a new GitHub org to house them, I'd be happy to add you as an admin to the org if you'd like to contribute.

jesseshieh commented 3 years ago

Sure, I'd be happy to contribute. What do you think about putting a note near the top of the README of this repo directing people to your buildpack if they are on heroku-20?

KazW commented 3 years ago

@jesseshieh Sounds good! I'll make a PR. 👍

jhg commented 3 years ago

I have same problem, it doesn't work with Heroku-20 stack, but algo using your fork @KazW issues are not enabled and it has next error (and URL showed in the error does not exists, also the website quick start only has the VuePress example texts yet):


-----> Elixir app detected

-----> Will export the following config vars:

DATABASE_URL

TELEGRAM_BOT_TOKEN

       * MIX_ENV=prod

-----> Checking Erlang and Elixir versions

       Will use the following versions:

       * Stack heroku-20

       * Erlang 23.2

       * Elixir v1.11.2 

       Sorry, Erlang 23.2 isn't supported yet. For a list of supported versions, please see https://raw.githubusercontent.com/elixir-buildpack/buildpack/master/otp-versions

 !     Push rejected, failed to compile Elixir app.

 !     Push failed
KazW commented 3 years ago

@jhg This should all be fixed now. I made it so that the buildpack no longer checks for versions based on a file, it tries to download the binaries and looks for a 404 instead.

As for new versions being supported... The build repo now checks for new OTP releases a few times per hour and automatically kicks off builds for new versions and older versions with a new release. So you should be able to use new Erlang versions within an hour or two after they're released.

See: elixir-buildpack/heroku-otp#1 and elixir-buildpack/heroku-buildpack#2

EDIT: link to #190

jesseshieh commented 3 years ago

Linking to #191

edmorley commented 3 years ago

If anyone is still seeing the errors here after upgrading to Heroku-20 (and is using the latest version of the buildpack), it's likely due to #197 -- manually clearing the build cache should resolve the issue.