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

Compilation error when deploying to Heroku #96

Closed
Forerunner117 opened this issue Nov 5, 2016 · 2 comments
Closed

Compilation error when deploying to Heroku #96

Forerunner117 opened this issue Nov 5, 2016 · 2 comments

Comments

@Forerunner117
Copy link

Hello,

I am trying to deploy my Phoenix app to Heroku using Elixir 1.2.6 and comeonin 0.11.3 but am getting a compilation error that I can't seem to resolve. Compiling locally appears to work fine. I've tried setting always_rebuild=true, but that results in the same error. Apologies for the long copy/paste, not sure what may be relevant:

Counting objects: 342, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (210/210), done.
Writing objects: 100% (342/342), 11.75 MiB | 1.40 MiB/s, done.
Total 342 (delta 223), reused 182 (delta 112)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Elixir app detected
remote: -----> Checking Erlang and Elixir versions
remote: Will use the following versions:
remote: * Stack cedar-14
remote: * Erlang 18.3
remote: * Elixir 1.2.6
remote: Will export the following config vars:
remote: * Config vars DATABASE_URL
remote: * MIX_ENV=prod
remote: -----> Cleaning all cache to force rebuilds
remote: -----> Fetching Erlang 18.3
remote: -----> Installing Erlang 18.3 (changed)
remote:
remote: -----> Fetching Elixir v1.2.6
remote: -----> Installing Elixir v1.2.6 (changed)
remote: -----> Installing Hex
remote: * creating /app/.mix/archives/hex-0.14.0.ez
remote: -----> Installing rebar
remote: * creating /app/.mix/rebar
remote: * creating /app/.mix/rebar3
remote: -----> Fetching app dependencies with mix
remote: Running dependency resolution
remote: * Getting phoenix (Hex package)
remote: Checking package (https://repo.hex.pm/tarballs/phoenix-1.2.1.tar)
remote: Fetched package
remote: * Getting phoenix_pubsub (Hex package)
remote: Checking package (https://repo.hex.pm/tarballs/phoenix_pubsub-1.0.1.tar)
remote: Fetched package
remote: * Getting phoenix_ecto (Hex package)
remote: Checking package (https://repo.hex.pm/tarballs/phoenix_ecto-3.0.1.tar)
remote: Fetched package
remote: * Getting postgrex (Hex package)
remote: Checking package (https://repo.hex.pm/tarballs/postgrex-0.12.1.tar)
remote: Fetched package
remote: * Getting phoenix_html (Hex package)
remote: Checking package (https://repo.hex.pm/tarballs/phoenix_html-2.7.0.tar)
remote: Fetched package
remote: * Getting gettext (Hex package)
remote: Checking package (https://repo.hex.pm/tarballs/gettext-0.11.0.tar)
remote: Fetched package
remote: * Getting cowboy (Hex package)
remote: Checking package (https://repo.hex.pm/tarballs/cowboy-1.0.4.tar)
remote: Fetched package
remote: * Getting comeonin (Hex package)
remote: Checking package (https://repo.hex.pm/tarballs/comeonin-0.11.3.tar)
remote: Fetched package
remote: * Getting cowlib (Hex package)
remote: Checking package (https://repo.hex.pm/tarballs/cowlib-1.0.2.tar)
remote: Fetched package
remote: * Getting ranch (Hex package)
remote: Checking package (https://repo.hex.pm/tarballs/ranch-1.2.1.tar)
remote: Fetched package
remote: * Getting plug (Hex package)
remote: Checking package (https://repo.hex.pm/tarballs/plug-1.2.2.tar)
remote: Fetched package
remote: * Getting mime (Hex package)
remote: Checking package (https://repo.hex.pm/tarballs/mime-1.0.1.tar)
remote: Fetched package
remote: * Getting connection (Hex package)
remote: Checking package (https://repo.hex.pm/tarballs/connection-1.0.4.tar)
remote: Fetched package
remote: * Getting db_connection (Hex package)
remote: Checking package (https://repo.hex.pm/tarballs/db_connection-1.0.0-rc.5.tar)
remote: Fetched package
remote: * Getting decimal (Hex package)
remote: Checking package (https://repo.hex.pm/tarballs/decimal-1.2.0.tar)
remote: Fetched package
remote: * Getting ecto (Hex package)
remote: Checking package (https://repo.hex.pm/tarballs/ecto-2.0.5.tar)
remote: Fetched package
remote: * Getting poolboy (Hex package)
remote: Checking package (https://repo.hex.pm/tarballs/poolboy-1.5.1.tar)
remote: Fetched package
remote: * Getting poison (Hex package)
remote: Checking package (https://repo.hex.pm/tarballs/poison-2.2.0.tar)
remote: Fetched package
remote: -----> Copying hex from /app/.mix/archives/hex-0.14.0.ez
remote: -----> Compiling
remote: ==> connection
remote: Compiled lib/connection.ex
remote: Generated connection app
remote: ==> gettext
remote: Compiled src/gettext_po_parser.yrl
remote: Compiled src/gettext_po_parser.erl
remote: Compiled lib/gettext/backend.ex
remote: Compiled lib/gettext.ex
remote: Compiled lib/gettext/extractor_agent.ex
remote: Compiled lib/gettext/interpolation.ex
remote: Compiled lib/gettext/po/exceptions.ex
remote: Compiled lib/gettext/plural.ex
remote: Compiled lib/gettext/po/plural_translation.ex
remote: Compiled lib/gettext/po/translation.ex
remote: Compiled lib/gettext/po/tokenizer.ex
remote: Compiled lib/gettext/extractor.ex
remote: Compiled lib/gettext/po/parser.ex
remote: Compiled lib/gettext/compiler.ex
remote: Compiled lib/gettext/merger.ex
remote: Compiled lib/gettext/fuzzy.ex
remote: Compiled lib/gettext/po.ex
remote: Compiled lib/mix/tasks/compile.gettext.ex
remote: Compiled lib/gettext/po/translations.ex
remote: Compiled lib/mix/tasks/gettext.extract.ex
remote: Compiled lib/mix/tasks/gettext.merge.ex
remote: Generated gettext app
remote: ==> ranch (compile)
remote: Compiled src/ranch_transport.erl
remote: Compiled src/ranch_protocol.erl
remote: Compiled src/ranch_acceptor.erl
remote: Compiled src/ranch_app.erl
remote: Compiled src/ranch_listener_sup.erl
remote: Compiled src/ranch_acceptors_sup.erl
remote: Compiled src/ranch_sup.erl
remote: Compiled src/ranch_conns_sup.erl
remote: Compiled src/ranch_tcp.erl
remote: Compiled src/ranch_ssl.erl
remote: Compiled src/ranch_server.erl
remote: Compiled src/ranch.erl
remote: ==> poolboy (compile)
remote: Compiled src/poolboy_worker.erl
remote: Compiled src/poolboy_sup.erl
remote: Compiled src/poolboy.erl
remote: ==> decimal
remote: Compiled lib/decimal.ex
remote: Generated decimal app
remote: ==> poison
remote: Compiled lib/poison.ex
remote: Compiled lib/poison/decoder.ex
remote: Compiled lib/poison/parser.ex
remote: Compiled lib/poison/encoder.ex
remote: Generated poison app
remote: ==> comeonin
remote: cc -g -O3 -Wall -I/app/.platform_tools/erlang/erts-7.3/include -Ic_src -fPIC -shared -o priv/bcrypt_nif.so c_src/bcrypt_nif.c c_src/blowfish.c
remote:
remote: Compiled lib/comeonin.ex
remote:
remote: == Compilation error on file lib/comeonin/bcrypt.ex ==
remote: ** (MatchError) no match of right hand side value: {:error, :on_load_failure}
remote: (stdlib) erl_eval.erl:670: :erl_eval.do_apply/6
remote:
remote: could not compile dependency :comeonin, "mix compile" failed. You can recompile this dependency with "mix deps.compile comeonin", update it with "mix deps.update comeonin" or clean it with "mix deps.clean comeonin"
remote:
remote: 06:30:36.750 [error] Process #PID<0.458.0> raised an exception
remote: ** (MatchError) no match of right hand side value: {:error, {:load_failed, 'Failed to load NIF library: '/tmp/build_148f7da2d0f731db24122f396676b482/_build/prod/lib/comeonin/priv/bcrypt_nif.so: cannot open shared object file: No such file or directory''}}
remote: lib/comeonin/bcrypt.ex:24: Comeonin.Bcrypt.init/0
remote: (kernel) code_server.erl:1669: anonymous fn/1 in :code_server.handle_on_load/4
remote:
remote: 06:30:36.752 [warn] The on_load function for module Elixir.Comeonin.Bcrypt returned {{:badmatch,
remote: {:error,
remote: {:load_failed,
remote: 'Failed to load NIF library: '/tmp/build_148f7da2d0f731db24122f396676b482/_build/prod/lib/comeonin/priv/bcrypt_nif.so: cannot open shared object file: No such file or directory''}}},
remote: [{Comeonin.Bcrypt, :init, 0, [file: 'lib/comeonin/bcrypt.ex', line: 24]},
remote: {:code_server, :"-handle_on_load/4-fun-0-", 1,
remote: [file: 'code_server.erl', line: 1669]}]}
remote:
remote: ! Push rejected, failed to compile Elixir app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to fast-fjord-69227.
remote:
To git@heroku.com:fast-fjord-69227.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:fast-fjord-69227.git'

@riverrun
Copy link
Owner

riverrun commented Nov 5, 2016

Can you update comeonin to the latest version, which is 2.6, and try it again?
Let me know if it works then.

@Forerunner117
Copy link
Author

That did it. Not sure why I didn't think to try updating 😕

Thank you!

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