sysdia-solutions / thumbifier

The thumbify.me thumbifier engine
MIT License
3 stars 0 forks source link

Build Fails #3

Open EVILoptimist opened 7 years ago

EVILoptimist commented 7 years ago

After I install elixir and erlang and run MIX_ENV=prod mix do deps.get, compile, release, I get the following output:

* Getting eiconv (https://github.com/zotonic/eiconv.git)
remote: Counting objects: 81, done.        
remote: Total 81 (delta 0), reused 0 (delta 0), pack-reused 81        
Running dependency resolution

[ [ [ OMITTED FOR BREVITY ] ] ]

===> Compiling idna
===> Fetching rebar3_hex ({pkg,<<"rebar3_hex">>,<<"3.0.0">>})
===> Downloaded package, caching at /Users/adam/.cache/rebar3/hex/default/packages/rebar3_hex-3.0.0.tar
===> Compiling rebar3_hex
===> Compiling mimerl
==> erlware_commons (compile)
Compiled src/ec_vsn.erl
Compiled src/ec_dictionary.erl
Compiled src/ec_talk.erl
Compiled src/ec_semver_parser.erl
Compiled src/ec_semver.erl
Compiled src/ec_orddict.erl
src/ec_plists.erl:220: syntax error before: '/'
src/ec_plists.erl:226: syntax error before: '/'
src/ec_plists.erl:250: syntax error before: '/'
src/ec_plists.erl:256: syntax error before: '/'
src/ec_plists.erl:279: syntax error before: '/'
src/ec_plists.erl:285: syntax error before: '/'
src/ec_plists.erl:300: syntax error before: '/'
src/ec_plists.erl:305: syntax error before: '/'
src/ec_plists.erl:326: syntax error before: '/'
src/ec_plists.erl:336: syntax error before: '/'
src/ec_plists.erl:343: syntax error before: '/'
src/ec_plists.erl:355: syntax error before: '/'
src/ec_plists.erl:361: syntax error before: '/'
src/ec_plists.erl:372: syntax error before: '/'
src/ec_plists.erl:384: syntax error before: '/'
src/ec_plists.erl:397: syntax error before: '/'
src/ec_plists.erl:403: syntax error before: '/'
src/ec_plists.erl:418: syntax error before: '/'
src/ec_plists.erl:427: syntax error before: '/'
src/ec_plists.erl:438: syntax error before: '/'
src/ec_plists.erl:450: syntax error before: '/'
src/ec_plists.erl:459: syntax error before: '/'
src/ec_plists.erl:472: syntax error before: '/'
src/ec_plists.erl:484: syntax error before: '/'
src/ec_plists.erl:522: syntax error before: '/'
src/ec_plists.erl:590: syntax error before: '/'
src/ec_plists.erl:625: syntax error before: '/'
src/ec_plists.erl:209: type el_fun() is unused
Compiling src/ec_plists.erl failed:
ERROR: compile failed while processing /Users/adam/Sites/Thumbifier/deps/erlware_commons: rebar_abort
** (Mix) Could not compile dependency :erlware_commons, "/Users/adam/.mix/rebar compile skip_deps=true deps_dir="/Users/adam/Sites/Thumbifier/_build/prod/lib"" command failed. You can recompile this dependency with "mix deps.compile erlware_commons", update it with "mix deps.update erlware_commons" or clean it with "mix deps.clean erlware_commons"

I can fix this by doing a mix deps.update --all and everything seems like it's going OK for a bit. And then build fails on phoenix_ecto:

Generated ecto app
==> phoenix_ecto
Compiling 4 files (.ex)

== Compilation error on file lib/phoenix_ecto/html.ex ==
** (KeyError) key :model not found in: %Phoenix.HTML.Form{data: nil, errors: {:form_for_errors, [line: 12], [{{:., [line: 12], [{:changeset, [line: 12], nil}, :errors]}, [line: 12], []}]}, hidden: [], id: {:name, [line: 10], nil}, impl: Phoenix.HTML.FormData.Ecto.Changeset, index: nil, name: {:name, [line: 11], nil}, options: [], params: %{}, source: {:changeset, [line: 8], nil}}
    (stdlib) :maps.update(:model, {:model, [line: 13], nil}, %Phoenix.HTML.Form{data: nil, errors: {:form_for_errors, [line: 12], [{{:., [line: 12], [{:changeset, [line: 12], nil}, :errors]}, [line: 12], []}]}, hidden: [], id: {:name, [line: 10], nil}, impl: Phoenix.HTML.FormData.Ecto.Changeset, index: nil, name: {:name, [line: 11], nil}, options: [], params: %{}, source: {:changeset, [line: 8], nil}})
    lib/phoenix_html/form.ex:170: anonymous fn/2 in Phoenix.HTML.Form.__struct__/1
    (elixir) lib/enum.ex:1623: Enum."-reduce/3-lists^foldl/2-0-"/3
    expanding struct: Phoenix.HTML.Form.__struct__/1
    lib/phoenix_ecto/html.ex:7: Phoenix.HTML.FormData.Ecto.Changeset.to_form/2

could not compile dependency :phoenix_ecto, "mix compile" failed. You can recompile this dependency with "mix deps.compile phoenix_ecto", update it with "mix deps.update phoenix_ecto" or clean it with "mix deps.clean phoenix_ecto"

If I update phoenix to 2.0 and phoenix_ecto to 1.2 in the mix.exs file, I can get the project to build, but it doesn't run, and I get errors in my /var/log/supervisor:

/var/log/supervisor# cat supervisord.log 
2016-10-18 21:16:50,553 CRIT Supervisor running as root (no user in config file)
2016-10-18 21:16:50,554 WARN Included extra file "/etc/supervisor/conf.d/supervisord.conf" during parsing
2016-10-18 21:16:50,564 INFO RPC interface 'supervisor' initialized
2016-10-18 21:16:50,564 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2016-10-18 21:16:50,564 INFO supervisord started with pid 1
2016-10-18 21:16:51,569 INFO spawned: 'thumbifier' with pid 9
2016-10-18 21:16:51,614 INFO exited: thumbifier (exit status 0; not expected)
2016-10-18 21:16:51,615 CRIT reaped unknown pid 46)
2016-10-18 21:16:51,765 CRIT reaped unknown pid 83)
2016-10-18 21:16:52,328 CRIT reaped unknown pid 104)
2016-10-18 21:16:53,332 INFO spawned: 'thumbifier' with pid 105
2016-10-18 21:16:53,360 INFO exited: thumbifier (exit status 0; not expected)
2016-10-18 21:16:53,361 CRIT reaped unknown pid 140)
2016-10-18 21:16:53,483 CRIT reaped unknown pid 177)
2016-10-18 21:16:53,483 CRIT reaped unknown pid 178)
2016-10-18 21:16:54,054 CRIT reaped unknown pid 198)
2016-10-18 21:16:55,495 INFO spawned: 'thumbifier' with pid 199
2016-10-18 21:16:55,496 CRIT reaped unknown pid 97)
2016-10-18 21:16:55,514 INFO exited: thumbifier (exit status 0; not expected)
2016-10-18 21:16:55,514 CRIT reaped unknown pid 234)
2016-10-18 21:16:55,520 CRIT reaped unknown pid 47)
2016-10-18 21:16:55,652 CRIT reaped unknown pid 271)
2016-10-18 21:16:55,652 CRIT reaped unknown pid 272)
2016-10-18 21:16:56,297 CRIT reaped unknown pid 292)
2016-10-18 21:16:57,266 CRIT reaped unknown pid 191)
2016-10-18 21:16:57,312 CRIT reaped unknown pid 141)
2016-10-18 21:16:59,316 INFO spawned: 'thumbifier' with pid 293
2016-10-18 21:16:59,337 INFO exited: thumbifier (exit status 0; not expected)
2016-10-18 21:16:59,337 INFO gave up: thumbifier entered FATAL state, too many start retries too quickly
2016-10-18 21:16:59,337 CRIT reaped unknown pid 328)
2016-10-18 21:16:59,453 CRIT reaped unknown pid 365)
2016-10-18 21:16:59,453 CRIT reaped unknown pid 366)
2016-10-18 21:16:59,563 CRIT reaped unknown pid 285)
2016-10-18 21:16:59,608 CRIT reaped unknown pid 235)
2016-10-18 21:16:59,966 CRIT reaped unknown pid 386)
2016-10-18 21:17:03,084 CRIT reaped unknown pid 379)
2016-10-18 21:17:03,128 CRIT reaped unknown pid 329)
/var/log/supervisor# cat thumbifier-stdout---supervisor-8N0SvW.log 
mkdir: created directory '/root/running-config'

I wish I had something in the form of a PR to help with, but these languages/frameworks are not my area of expertise.

Please let me know if there's anything else I can do to help.

roger-russel commented 7 years ago

Same problem with me.

bundsol commented 6 years ago

A little, late but in my case I couldn't have eiconv being compiled by rebar3, so in my dependencies I listed it as {:eiconv, git: "https://github.com/zotonic/eiconv.git", manager: :rebar }