You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried using poolboy in my Elixir program on Windows. Mix fails to compile it. Something about rebar.
>mix deps.compile
==> poolboy (compile)
Compiling src/poolboy.erl failed:
src/poolboy.erl:17: type queue() undefined
ERROR: compile failed while processing c:/Users/my_user/Projects/my_app/deps/poolboy: rebar_abort
** (Mix) Could not compile dependency :poolboy, "escript.exe "c:/Users/my_user/.mix/rebar"" command failed. You can recompile this dependency with "mix deps.compile poolboy", update it with "mix deps.update poolboy" or clean it with "mix deps.clean poolboy"
On Mac it complied fine:
$ mix
Could not find "rebar", which is needed to build dependency :poolboy
I can install a local copy which is just used by Mix
Shall I install rebar? [Yn] Y
* creating /Users/my_user/.mix/rebar
==> poolboy (compile)
Compiled src/poolboy_sup.erl
Compiled src/poolboy_worker.erl
Compiled src/poolboy.erl
Compiled lib/my_app.ex
Generated my_app app
That's a good question. I'm not sure. I just manually downloaded rebar
when I needed it (there was some other dependency in Phoenix that needed
rebar at one point).
That wouldn't have been the way that I would have suggested to get rebar
but no matter. What do you get when you type "rebar" at a command prompt?
That's the simplest way to insure rebar is set up and running correctly and
in the path.
C:\Users\my_user\Projects\my_project>mix
==> poolboy (compile)
src/poolboy.erl:17: type queue() undefined
Compiling src/poolboy.erl failed:
ERROR: compile failed while processing c:/Users/my_user/Projects/my_project/deps/poolboy: rebar_abort
** (Mix) Could not compile dependency :poolboy, "c:/Users/my_user/Projects/rebar/rebar.cmd" command failed. You can recompile this dependency with "mix deps.compile poolboy", update it with "mix deps.update poolboy" or clean it with "mix deps.clean poolboy"
—
Reply to this email directly or view it on GitHub #81 (comment).
Ok--just to insure we're all playing from the same playbook: type rebar
version and post the message. There are a few different versions of rebar
available and we can help you better if we can insure we're all working
from the same version of rebar.
Also I'd try calling rebar directly (as opposed to calling it from within
mix) like so: rebar compile poolboy
From a command prompt within the poolboy directory of course.
All of this is not to say that mix shouldn't work with this but it's easier
to isolate the problem if we can find something that does work and then
compare that to the non-working path.
In any case, typing rebar was the first thing I did after modify my path,
and starting a new terminal window. It complains about no parameters and
displays the usage:
rebar
No command to run specified!
Usage: rebar [-h] [-c] [-v ] [-q ] [-V] [-f]
...
Also, on Windows I can do a where:
where rebar
C:\Users\my_user\Projects\rebar\rebar
C:\Users\my_user\Projects\rebar\rebar.cmd
—
Reply to this email directly or view it on GitHub #81 (comment).
I don't think your version of Erlang is pre17 (I'm assuming that's 16 or
earlier) in any case so that seems suspect to me. I'd wonder why you're
getting that.
I'd also suggest that you check your code path in Erlang. See if you've
got a queue.beam file under your Erlang folder. On my machine I have
queue.beam at c:\program files\erl7.1\lib\stdlib-2.6\ebin. Erlang/Rebar
would be trying to find that queue.beam file (as far as I know).
Maybe it's a codepath issue? I forget how to check the codepath. But it
seems as if it were a codepath issue he'd be seeing more issues than just
poolboy.
@ejstemblerhttps://github.com/ejstembler You don't have pre17 though,
you're on a release of 18. I'm not sure how your release of 18 doesn't have
the queue type honestly.
—
Reply to this email directly or view it on GitHub #81 (comment).
C:\Users\my_user\Projects\my_project\deps\poolboy>c:\Users\my_user.mix\rebar compile
'c:\Users\my_user.mix\rebar' is not recognized as an internal or external command,
operable program or batch file.
For Windows, should there be a corresponding rebar.bat file? Similar to
how there an iex and ies.bat?
—
Reply to this email directly or view it on GitHub #81 (comment).
Was this ever resolved? I'm getting the same error after installing Elixir and Erlang via the elixir-websetup.exe ... it appears that mix is correctly passing rebar to escript:
C:\Users\my_user\example>mix deps.compile poolboy
==> poolboy (compile)
src/poolboy.erl:17: type queue() undefined
Compiling src/poolboy.erl failed:
ERROR: compile failed while processing c:/Users/my_user/example/deps/poolboy: rebar_abort
** (Mix) Could not compile dependency :poolboy, "escript.exe "c:/Users/my_user/.mix/rebar" compile skip_deps=true deps_dir="c:/Users/my_user/example/_build/dev/lib"" command failed. You can recompile this dependency with "mix deps.compile poolboy", update it with "mix deps.update poolboy" or clean it with "mix deps.clean poolboy"
C:\Users\my_user\example>escript.exe "c:\Users\my_user\.mix\rebar" compile skip_deps=true deps_dir="c:\Users\my_user\example\_build\test\lib"
==> example (compile)
C:\Users\my_user\example>
It still fails to run (attempts to compile poolboy again) after running the command manually as above.
C:\Users\my_user\example>escript.exe "c:\Users\my_user\.mix\rebar" compile skip_deps=true deps_dir="c:\Users\my_user\example\_build\test\lib"
==> example (compile)
C:\Users\my_user\example>mix test
==> poolboy (compile)
src/poolboy.erl:17: type queue() undefined
Compiling src/poolboy.erl failed:
ERROR: compile failed while processing c:/Users/my_user/example/deps/poolboy: rebar_abort
** (Mix) Could not compile dependency :poolboy, "escript.exe "c:/Users/my_user/.mix/rebar" compile skip_deps=true deps_dir="c:/Users/my_user/example/_build/test/lib"" command failed. You can recompile this dependency with "mix deps.compile poolboy", update it with "mix deps.update poolboy" or clean it with "mix deps.clean poolboy"
C:\Users\my_user\example>
Was this ever resolved? I'm getting the same error after installing Elixir
and Erlang via the elixir-websetup.exe ... it appears that mix is correctly
passing rebar to escript:
`C:\Users\my_user\example>mix deps.compile poolboy
==> poolboy (compile)
src/poolboy.erl:17: type queue() undefined
Compiling src/poolboy.erl failed:
ERROR: compile failed while processing c:/Users/my_user/example/deps/poolboy:
rebar_abort
** (Mix) Could not compile dependency :poolboy, "escript.exe
"c:/Users/my_user/.mix/rebar" compile skip_deps=true
deps_dir="c:/Users/my_user/example/_build/dev/lib"" command failed. You
can recompile this dependency with "mix deps.compile poolboy", update it
with "mix deps.update poolboy" or clean it with "mix deps.clean poolboy"
C:\Users\my_user\example>escript.exe "c:\Users\my_user.mix\rebar" compile
skip_deps=true deps_dir="c:\Users\my_user\example_build\test\lib"
==> example (compile)
Yeah, that was it - when I got to the hex page ( [(https://hex.pm/] ) I just copied the ecto tuple it suggests:
Using with Elixir
Simply specify your Mix dependencies as two-item tuples like {:ecto, "~> 0.1.0"} and Elixir will ask if you want to install Hex if you haven't already. After installed, you can run $ mix local to see all available Hex tasks and $ mix help TASK for more information about a specific task.
into my sample program... that tuple is old, and has a dependency on an old version of poolboy.
Activity
Vagabond commentedon Oct 21, 2015
That's an erlang version difference problem. Your erlang on windows is probably older.
devinus commentedon Oct 21, 2015
@ejstembler What is your Erlang version on Windows?
Give me the output of
erlang:system_info(otp_release).OnorioCatenacci commentedon Oct 26, 2015
This isn't really a bug. You just need to install Rebar on your Windows machine. http://theburningmonk.com/2014/08/getting-started-with-rebar-on-windows/
OnorioCatenacci commentedon Oct 26, 2015
By the way, Eshell v7.0 is not the same as Eshell v7.1. They're both major version 18 but they're different minor versions.
devinus commentedon Oct 26, 2015
@OnorioCatenacci Wont
mixdownloadrebarautomatically if not found?OnorioCatenacci commentedon Oct 26, 2015
That's a good question. I'm not sure. I just manually downloaded rebar
when I needed it (there was some other dependency in Phoenix that needed
rebar at one point).
On Mon, Oct 26, 2015 at 4:00 PM, Devin Torres notifications@github.com
wrote:
Onorio Catenacci
http://onor.io
http://www.google.com/+OnorioCatenacci
OnorioCatenacci commentedon Oct 26, 2015
Here's something that may have relevance: elixir-lang/elixir#2152
While the bug mentioned may have been fixed last year it's still worth taking a look at the comments.
OnorioCatenacci commentedon Oct 27, 2015
That wouldn't have been the way that I would have suggested to get rebar
but no matter. What do you get when you type "rebar" at a command prompt?
That's the simplest way to insure rebar is set up and running correctly and
in the path.
Onorio
On Tue, Oct 27, 2015 at 9:26 AM, Edward J. Stembler <
notifications@github.com> wrote:
Onorio Catenacci
http://onor.io
http://www.google.com/+OnorioCatenacci
OnorioCatenacci commentedon Oct 27, 2015
Ok--just to insure we're all playing from the same playbook: type rebar
version and post the message. There are a few different versions of rebar
available and we can help you better if we can insure we're all working
from the same version of rebar.
Also I'd try calling rebar directly (as opposed to calling it from within
mix) like so: rebar compile poolboy
From a command prompt within the poolboy directory of course.
All of this is not to say that mix shouldn't work with this but it's easier
to isolate the problem if we can find something that does work and then
compare that to the non-working path.
Just my suggestions of course.
On Tue, Oct 27, 2015 at 9:46 AM, Edward J. Stembler <
notifications@github.com> wrote:
Onorio Catenacci
http://onor.io
http://www.google.com/+OnorioCatenacci
OnorioCatenacci commentedon Oct 27, 2015
Devin can comment more on this but I believe this would be the queue in
question:
http://www.erlang.org/doc/man/queue.html
One thing though--it looks like the code is thinking Erlang is "pre17"? I
mean this:
-ifdef(pre17).
-type pid_queue() :: queue().
-else.
-type pid_queue() :: queue:queue().
-endif.
I don't think your version of Erlang is pre17 (I'm assuming that's 16 or
earlier) in any case so that seems suspect to me. I'd wonder why you're
getting that.
I'd also suggest that you check your code path in Erlang. See if you've
got a queue.beam file under your Erlang folder. On my machine I have
queue.beam at c:\program files\erl7.1\lib\stdlib-2.6\ebin. Erlang/Rebar
would be trying to find that queue.beam file (as far as I know).
Onorio
On Tue, Oct 27, 2015 at 10:08 AM, Edward J. Stembler <
notifications@github.com> wrote:
Onorio Catenacci
http://onor.io
http://www.google.com/+OnorioCatenacci
devinus commentedon Oct 27, 2015
@ejstembler You don't have
pre1 BD0 7though, you're on a release of 18. I'm not sure how your release of 18 doesn't have thequeuetype honestly.OnorioCatenacci commentedon Oct 27, 2015
Maybe it's a codepath issue? I forget how to check the codepath. But it
seems as if it were a codepath issue he'd be seeing more issues than just
poolboy.
On Tue, Oct 27, 2015 at 12:03 PM, Devin Torres notifications@github.com
wrote:
Onorio Catenacci
http://onor.io
http://www.google.com/+OnorioCatenacci
devinus commentedon Oct 27, 2015
@ejstembler I'm not sure how you installed Erlang or Elixir, but it seems messed up.
devinus commentedon Oct 27, 2015
@ejstembler Try deleting
~/.mix/rebarand doingmix local.rebar.After that, try cloning
poolboyitself and then using~/.mix/rebar compileand report back.OnorioCatenacci commentedon Oct 27, 2015
rebar itself is an escript. So yes, you'd need a bat or cmd file or
something of that sort to start rebar via escript. Here's mine:
"%PROGRAMFILES%/erl7.1/bin/escript.exe"
/ProgramData/Chocolatey/Lib/Rebar3-beta1.3.0/rebar3 %*
On Tue, Oct 27, 2015 at 2:08 PM, Edward J. Stembler <
notifications@github.com> wrote:
Onorio Catenacci
http://onor.io
http://www.google.com/+OnorioCatenacci
devinus commentedon Oct 27, 2015
@josevalim Thoughts?
tymoor commentedon Sep 14, 2016
Was this ever resolved? I'm getting the same error after installing Elixir and Erlang via the elixir-websetup.exe ... it appears that mix is correctly passing rebar to escript:
It still fails to run (attempts to compile poolboy again) after running the command manually as above.
josevalim commentedon Sep 14, 2016
What is your Windows, Elixir and Erlang versions? I am confident Poolboy
works on Windows, so we need to identify what is missing in your setup.
On Wednesday, September 14, 2016, tymoor notifications@github.com wrote:
José Valimwww.plataformatec.com.br
http://www.plataformatec.com.br/Founder and Director of R&D
josevalim commentedon Sep 14, 2016
Due to the error, it seems your issue is either an old Poolboy version (try
updating it) or an old Erlang version. It seems tone the former.
José Valimwww.plataformatec.com.br
http://www.plataformatec.com.br/Founder and Director of R&D
tymoor commentedon Sep 14, 2016
Yeah, that was it - when I got to the hex page ( [(https://hex.pm/] ) I just copied the ecto tuple it suggests:
into my sample program... that tuple is old, and has a dependency on an old version of poolboy.