Coder Social home page Coder Social logo

compilation fail with rebar3 about setup HOT 17 CLOSED

uwiger avatar uwiger commented on August 16, 2024
compilation fail with rebar3

from setup.

Comments (17)

uwiger avatar uwiger commented on August 16, 2024 1

See PR #25 - could you try and see if it solves your problem?

from setup.

benoitc avatar benoitc commented on August 16, 2024 1

last commit fixed it. Thanks! Would be cool if you could make a release so exometer could use it :)

from setup.

abhidvnt avatar abhidvnt commented on August 16, 2024 1

If anyone is getting the following error when using setup in an Elixir/Mix project :

Unable to run post hooks for 'compile', command 'escriptize' not found.
** (Mix) Could not compile dependency :setup, "/home/ubuntu/.mix/rebar3 bare compile --paths "/var/app/_build/dev/lib/*/ebin"" command failed. You can recompile this dependency with "mix deps.compile setup", update it with "mix deps.update setup" or clean it with "mix deps.clean setup"

It can be solved by instructing mix to use rebar2 instead of rebar3 :

defp deps do
    [
    	{:setup, github: "uwiger/setup", manager: :rebar, override: true}
    ]
end

Took me a while to get this working with exometer.

from setup.

uwiger avatar uwiger commented on August 16, 2024

Still trying to work my way up to using rebar3, but things keep getting in the way. ;-)

AFAIK, there is only one hook in setup: the post_hook to call escriptize. Is there a more robust way to do that in rebar3?

from setup.

benoitc avatar benoitc commented on August 16, 2024

you can use the escriptize command:
http://www.rebar3.org/docs/commands#escriptize

Other way is to use erlang.mk ;)

from setup.

MSch avatar MSch commented on August 16, 2024

I'm still getting this error with 1.8.0 when compiling with rebar3 using the package from hex:

===> Load global config file /Users/msch/.config/rebar3/rebar.config
===> Expanded command sequence to be run: []
===> Expanded command sequence to be run: [{default,app_discovery},
                                           {bare,compile}]
===> Evaluating config script "/Users/msch/tmp/st/deps/setup/rebar.config.script"
===> Compiling setup
===> erlopts [debug_info,debug_info]
===> files to compile ["/Users/msch/tmp/st/deps/setup/src/setup_sup.erl",
                       "/Users/msch/tmp/st/deps/setup/src/setup_srv.erl",
                       "/Users/msch/tmp/st/deps/setup/src/setup_lib.erl",
                       "/Users/msch/tmp/st/deps/setup/src/setup_gen.erl",
                       "/Users/msch/tmp/st/deps/setup/src/setup_app.erl",
                       "/Users/msch/tmp/st/deps/setup/src/setup.erl"]
===> Unable to run post hooks for 'compile', command 'escriptize' not found.
===> Unable to run post hooks for 'compile', command 'escriptize' not found.
** (Mix) Could not compile dependency :setup, "/Users/msch/.bin/rebar3 bare compile --paths "/Users/msch/tmp/st/_build/dev/lib/*/ebin"" command failed. You can recompile this dependency with "mix deps.compile setup", update it with "mix deps.update setup" or clean it with "mix deps.clean setup"

from setup.

uwiger avatar uwiger commented on August 16, 2024

I can't reproduce this.

I created a simple application from scratch and added setup-1.8.0 as a dep:

uwpro:test uwiger$ cat rebar.config
{deps, [{setup, "1.8.0"}]}.

uwpro:test uwiger$ rebar3 compile
===> Package setup-1.8.0 not found. Fetching registry updates and trying again...
===> Updating package registry...
===> Writing registry to /Users/uwiger/.cache/rebar3/hex/default/registry
===> Generating package index...
===> [cloudi_service_oauth1:1.5.1] Only existing version of cloudi_service_db_riak is 1.3.3 which does not match constraint ~> 1.5.1. Using anyway, but it is not guaranteed to work.
===> Writing index to /Users/uwiger/.cache/rebar3/hex/default/packages.idx
===> Verifying dependencies...
===> Fetching setup ({pkg,<<"setup">>,<<"1.8.0">>})
===> Downloaded package, caching at /Users/uwiger/.cache/rebar3/hex/default/packages/setup-1.8.0.tar
===> Compiling setup
===> Building escript...
===> Compiling test
uwpro:test uwiger$ ls _build/default/lib/setup/ebin/
setup.app   setup_app.beam  setup_lib.beam  setup_sup.beam
setup.beam  setup_gen.beam  setup_srv.beam

from setup.

MSch avatar MSch commented on August 16, 2024

@uwiger I tried reproducing as well, and it only happens in an Elixir mix project, not when using a Erlang rebar3 project. Not sure how to narrow this down further. :/

from setup.

cmullaparthi avatar cmullaparthi commented on August 16, 2024

I had this problem. See #35 for a fix.

from setup.

uwiger avatar uwiger commented on August 16, 2024

I'll happily merge, but don't have time to try to verify.
I'm perfectly willing to trust you though. :)

from setup.

uwiger avatar uwiger commented on August 16, 2024

#35 merged.

from setup.

tolbrino avatar tolbrino commented on August 16, 2024

Then I guess this is resolved?

from setup.

MSch avatar MSch commented on August 16, 2024

Still failing for me

===> Compiling setup
===> Unable to run post hooks for 'compile', command 'escriptize' not found.

from setup.

uwiger avatar uwiger commented on August 16, 2024

I have not yet migrated to rebar3 in the current project where I'm using setup.
Can anybody else compare notes?

from setup.

tolbrino avatar tolbrino commented on August 16, 2024

@MSch Could you test whether #38 solves your issue?

from setup.

jvanek avatar jvanek commented on August 16, 2024

Thanks ! We're on Elixir 1.4/Erlang 19, it becomes tricky to get all dependencies compile. But the last tip from echofoxxx works perfectly.

from setup.

uwiger avatar uwiger commented on August 16, 2024

Closing this. Please start a new issue if there is still a problem.

from setup.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.