hedwig-im / hedwig_xmpp

XMPP Adapter for Hedwig
MIT License
12 stars 6 forks source link

Cannot compile because of :fast_xml #6

Open PhillippOhlandt opened 6 years ago

PhillippOhlandt commented 6 years ago

Hey, got some problems installing this adapter.

Here are my deps:

  defp deps do
    [
      {:hedwig, "~> 1.0"},
      {:hedwig_xmpp, "~> 1.0"}
    ]
  end

mix deps.get:

Resolving Hex dependencies...
Dependency resolution completed:
  connection 1.0.4
  fast_xml 1.1.27
  hedwig 1.0.0
  hedwig_xmpp 1.0.0
  p1_utils 1.0.10
  romeo 0.7.0
* Getting hedwig (Hex package)
  Checking package (https://repo.hex.pm/tarballs/hedwig-1.0.0.tar)
  Using locally cached package
* Getting hedwig_xmpp (Hex package)
  Checking package (https://repo.hex.pm/tarballs/hedwig_xmpp-1.0.0.tar)
  Using locally cached package
* Getting romeo (Hex package)
  Checking package (https://repo.hex.pm/tarballs/romeo-0.7.0.tar)
  Using locally cached package
* Getting connection (Hex package)
  Checking package (https://repo.hex.pm/tarballs/connection-1.0.4.tar)
  Using locally cached package
* Getting fast_xml (Hex package)
  Checking package (https://repo.hex.pm/tarballs/fast_xml-1.1.27.tar)
  Using locally cached package
* Getting p1_utils (Hex package)
  Checking package (https://repo.hex.pm/tarballs/p1_utils-1.0.10.tar)
  Using locally cached package

mix deps.compile:

===> Fetching rebar3_hex ({pkg,<<"rebar3_hex">>,<<"4.1.0">>})
===> Downloaded package, caching at /home/phillipp/.cache/rebar3/hex/default/packages/rebar3_hex-4.1.0.tar
===> Compiling rebar3_hex
===> Compiling p1_utils
==> connection
Compiling 1 file (.ex)
Generated connection app
==> hedwig
Compiling 19 files (.ex)
warning: the Behaviour module is deprecated. Instead of using this module, use the @callback and @macrocallback module attributes. See the documentation for Module for more information on these attributes
  lib/hedwig/adapter.ex:10: (module)
  (elixir) src/elixir_compiler.erl:85: :elixir_compiler.dispatch/6
  (elixir) src/elixir_module.erl:238: :elixir_module.eval_form/6
  (elixir) src/elixir_module.erl:80: :elixir_module.compile/5
  (stdlib) erl_eval.erl:670: :erl_eval.do_apply/6

warning: variable "self" does not exist and is being expanded to "self()", please use parentheses to remove the ambiguity or change the variable name
  lib/hedwig/adapter.ex:60

warning: String.strip/1 is deprecated, use String.trim/1
  lib/hedwig/adapters/console/connection.ex:46

warning: String.strip/1 is deprecated, use String.trim/1
  lib/hedwig/adapters/console/reader.ex:34

warning: variable "prompt_for_name" does not exist and is being expanded to "prompt_for_name()", please use parentheses to remove the ambiguity or change the variable name
  lib/mix/tasks/hedwig.gen.robot.ex:48

warning: variable "self" does not exist and is being expanded to "self()", please use parentheses to remove the ambiguity or change the variable name
  lib/hedwig/adapters/test.ex:7

warning: variable "hedwig_modules" does not exist and is being expanded to "hedwig_modules()", please use parentheses to remove the ambiguity or change the variable name
  lib/mix/tasks/hedwig.gen.robot.ex:90

warning: String.strip/1 is deprecated, use String.trim/1
  lib/mix/tasks/hedwig.gen.robot.ex:140

warning: String.strip/1 is deprecated, use String.trim/1
  lib/hedwig/responder.ex:183

warning: String.strip/1 is deprecated, use String.trim/1
  lib/hedwig/responder.ex:183

Generated hedwig app
==> fast_xml
make: Makefile: No such file or directory
make: *** No rule to make target 'Makefile'.  Stop.
could not compile dependency :fast_xml, "mix compile" failed. You can recompile this dependency with "mix deps.compile fast_xml", update it with "mix deps.update fast_xml" or clean it with "mix deps.clean fast_xml"
==> elixir_slack_bot
** (Mix) Could not compile with "make" (exit status: 2).
Depending on your OS, make sure to follow these instructions:

  * Mac OS X: You need to have gcc and make installed. Try running the
    commands "gcc --version" and / or "make --version". If these programs
    are not installed, you will be prompted to install them.

  * Linux: You need to have gcc and make installed. If you are using
    Ubuntu or any other Debian-based system, install the packages
    "build-essential". Also install "erlang-dev" package if not
    included in your Erlang/OTP version. If you're on Fedora, run
    "dnf group install 'Development Tools'".

make and gcc are properly installed and up to date.

I saw that the fast_xml lib has a Makefile.mix file but references a Makefile in its mix.exs. I fixed the name and rerun mix deps.compile:

===> Compiling p1_utils
==> fast_xml
mix compile
Unchecked dependencies for environment dev:
* p1_utils (Hex package)
  the dependency is not available, run "mix deps.get"
* ex_doc (Hex package)
  the dependency is not available, run "mix deps.get"
* elixir_make (Hex package)
  the dependency is not available, run "mix deps.get"
* earmark (Hex package)
  the dependency is not available, run "mix deps.get"
** (Mix) Can't continue due to errors on dependencies
Makefile.mix:33: recipe for target 'fast_xml' failed
make: *** [fast_xml] Error 1
could not compile dependency :fast_xml, "mix compile" failed. You can recompile this dependency with "mix deps.compile fast_xml", update it with "mix deps.update fast_xml" or clean it with "mix deps.clean fast_xml"
==> elixir_slack_bot
** (Mix) Could not compile with "make" (exit status: 2).
Depending on your OS, make sure to follow these instructions:

  * Mac OS X: You need to have gcc and make installed. Try running the
    commands "gcc --version" and / or "make --version". If these programs
    are not installed, you will be prompted to install them.

  * Linux: You need to have gcc and make installed. If you are using
    Ubuntu or any other Debian-based system, install the packages
    "build-essential". Also install "erlang-dev" package if not
    included in your Erlang/OTP version. If you're on Fedora, run
    "dnf group install 'Development Tools'".

I got at least one other person to verify this for me. Anyone else having this problem?

scrogson commented 6 years ago

Hey @PhillippOhlandt, thanks for the report. It's been a bit since I've fired up this code. Let me see if I can get it running again and get out a fix.

PhillippOhlandt commented 6 years ago

@scrogson Hey, the master branch of the :fast_xml repo is already fixed, there is just no release yet. Not sure if it's good to wait for a release or to temporarily require the master branch in this project.

scrogson commented 6 years ago

@PhillippOhlandt for now, you should be able to add fast_xml from git.

{:fast_xml, github: "processone/fast_xml", branch: "master", override: true}

fast_xml is actually a dependency of https://github.com/scrogson/romeo

PhillippOhlandt commented 6 years ago

Yeah, that's what I am doing right now. Others will run into the same problem until there is a proper release, tho.

scrogson commented 6 years ago

Yeah, I will leave this open for guidance.