rebar3



Build better Erlang.

Ask A Question

Questions

2

rebar3_erlydtl_plugin windows fails

After reviewing alot comments regarding usage of the rebar3_erlydtl_plugin, I am having trouble compiling the template files to the destination ebin directory. I added the DEBUG=1 setting to see the details of rebar3 build and additional tags to try to extract what erlydtl library is complaining about. Below is the setting in the local rebar.config file for subfolder that contains the "priv folder with the web content. {erlydtl_opts, [ {doc_root, "priv/templates"}, {out_dir, "ebin"}, {compiler_options, [report_errors, return, verbose, debug_info]}, {source_ext, ".dtl"}, {module_ext, "_view"}, {return, true}, {report, true} ]}. {plugins, [ {rebar3_erlydtl_plugin, ".*", {git, "https://github.com/tsloughter/rebar3_erlydtl_plugin.git", {branch, "master"}}} ]}. {provider_hooks, [ {pre, [{compile, {erlydtl, compile}}]} ]}. Below is the partial output of the rebar3 showing that it doesn't recognize the out_dir folder; however, the path is correct and I suspect that the symlinks may be the issue, since windows seem to behave as it should with them. ===> run_hooks("c:/SPRTVL/source/dashboard", pre_hooks, compile) -> no hooks defined ===> sh info: cwd: "c:/SPRTVL/source/dashboard" cmd: cmd /c mklink /j "c:\\SPRTVL\\source\\dashboard\\_build\\default\\lib\\web\\priv" "c:\\SPRTVL\\source\\dashboard\\apps\\web\\priv" ===> opts: [{use_stdout,false},return_on_error] ===> Port Cmd: cmd /q /c cmd /c mklink /j "c:\\SPRTVL\\source\\dashboard\\_build\\default\\lib\\web\\priv" "c:\\SPRTVL\\source\\dashboard\\apps\\web\\priv" Port Opts: [exit_status,{line,16384},use_stdio,stderr_to_stdout,hide,eof] ===> sh info: cwd: "c:/SPRTVL/source/dashboard" cmd: cmd /c mklink /j "c:\\SPRTVL\\source\\dashboard\\_build\\default\\lib\\web\\include" "c:\\SPRTVL\\source\\dashboard\\apps\\web\\include" ===> opts: [{use_stdout,false},return_on_error] ===> Port Cmd: cmd /q /c cmd /c mklink /j "c:\\SPRTVL\\source\\dashboard\\_build\\default\\lib\\web\\include" "c:\\SPRTVL\\source\\dashboard\\apps\\web\\include" Port Opts: [exit_status,{line,16384},use_stdio,stderr_to_stdout,hide,eof] ===> sh info: cwd: "c:/SPRTVL/source/dashboard" cmd: cmd /c mklink /j "c:\\SPRTVL\\source\\dashboard\\_build\\default\\lib\\web\\src" "c:\\SPRTVL\\source\\dashboard\\apps\\web\\src" ===> opts: [{use_stdout,false},return_on_error] ===> Port Cmd: cmd /q /c cmd /c mklink /j "c:\\SPRTVL\\source\\dashboard\\_build\\default\\lib\\web\\src" "c:\\SPRTVL\\source\\dashboard\\apps\\web\\src" Port Opts: [exit_status,{line,16384},use_stdio,stderr_to_stdout,hide,eof] ===> Compiling web ===> Running erlydtl... ===> Compiling "c:/SPRTVL/source/dashboard/apps/web/priv/templates/tl.dtl" -> "c:/SPRTVL/source/dashboard/_build/default/lib/web/ebin/tl_view.beam" with options: [{compiler_options,[report_errors,return,verbose,debug_info]}, {custom_tags_dir,"c:/SPRTVL/source/dashboard/apps/web"}, {doc_root,"c:/SPRTVL/source/dashboard/apps/web/priv/templates"}, {out_dir,"ebin"}, {compiler_options,[report_errors,return,verbose,debug_info]}, {out_dir,"c:/SPRTVL/source/dashboard/_build/default/lib/web/ebin"}, {source_ext,".dtl"}, {module_ext,"_view"}, {return,true}, {report,true}] c:/SPRTVL/source/dashboard/apps/web/priv/templates/tl.dtl: Failed to write file: no such file or directory ===> Compiling apps/web/priv/templates/tl.dtl failed c:/SPRTVL/source/dashboard/apps/web/priv/templates/tl.dtl:none: Failed to write file: no such file or directory ===> Compilation failed: {error, [["c:/SPRTVL/source/dashboard/apps/web/priv/templates/tl.dtl:none: Failed to write file: no such file or directory\n"]], []}

Posted by Jeff Starnes 8 months ago

6

Systemd service unable to start erlang service and doesn't say anything

My systemd service is - [Unit] Description=ccs-core Wants=ccs-media [Service] Type=forking TimeoutStartSec=0 User=ccsapp Group=users Environment=CCS_HOME=/opt/ccs ExecStart=/opt/ccs/core/bin/core start ExecStop= /opt/ccs/core/bin/core stop [Install] WantedBy=multi-user.target Starting and stopping from command line works fine - ccsapp@parrot:~> core start ccsapp@parrot:~> core ping pong ccsapp@parrot:~> core stop ok ccsapp@parrot:~> core ping Node core@parrot not responding to pings. However, when I try to start and stop using systemd - ccsapp@parrot:~> sudo service ccs-core start root's password: ccsapp@parrot:~> sudo service ccs-core status ccs-core.service - ccs-core Loaded: loaded (/etc/systemd/system/ccs-core.service; enabled) Active: failed (Result: exit-code) since Sun 2017-02-19 18:22:12 IST; 3s ago Process: 6734 ExecStop=/opt/ccs/core/bin/core stop (code=exited, status=1/FAILURE) Process: 6707 ExecStart=/opt/ccs/core/bin/core start (code=exited, status=0/SUCCESS) Main PID: 6732 (code=exited, status=0/SUCCESS) Feb 19 18:22:12 parrot core[6780]: Starting up ccsapp@parrot:~> core ping Node core@parrot not responding to pings. And the log says nothing - run_erl [6736] Sun Feb 19 18:22:12 2017 Args before exec of shell: run_erl [6736] Sun Feb 19 18:22:12 2017 argv[0] = sh run_erl [6736] Sun Feb 19 18:22:12 2017 argv[1] = -c run_erl [6736] Sun Feb 19 18:22:12 2017 argv[2] = exec "/opt/ccs/core/bin/core" "console" and ===== ===== LOGGING STARTED Sun Feb 19 17:48:30 IST 2017 ===== Exec: /opt/ccs/core/erts-8.2/bin/erlexec -boot /opt/ccs/core/releases/6.0.0/start -mode embedded -boot_var ERTS_LIB_DIR /opt/ccs/core/erts-8.2/../lib -config /opt/ccs/core/releases/6.0.0/sys.config -args_file /opt/ccs/core/releases/6.0.0/vm.args -- console^M Root: /opt/ccs/core^M /opt/ccs/core

Posted by Chaitanya Chalasani about a year ago

7

Error compiling dependency that can be compiled by itself

I'm trying to compile a module that uses the new xmpp library for ejabberd. I've a very simple `rebar.config` file: {deps, [ {xmpp, ".*", {git, "https://github.com/processone/xmpp", {tag, "1.1.4"}}} ]}. When I try to run `rebar3 eunit` or `rebar3 compile` I get an error message: $ rebar3 compile ===> Verifying dependencies... ===> Fetching xmpp ({git,"https://github.com/processone/xmpp", {ref,"c010141487632db1666bcbf64f90f42c0fde50aa"}}) ===> Fetching rebar3_hex ({pkg,<<"rebar3_hex">>,<<"3.1.0">>}) ===> Downloaded package, caching at /Users/marcp/.cache/rebar3/hex/default/packages/rebar3_hex-3.1.0.tar ===> Compiling rebar3_hex ===> Fetching fast_xml ({pkg,<<"fast_xml">>,<<"1.1.18">>}) ===> Downloaded package, caching at /Users/marcp/.cache/rebar3/hex/default/packages/fast_xml-1.1.18.tar ===> Fetching pc ({pkg,<<"pc">>,<<"1.4.0">>}) ===> Downloaded package, caching at /Users/marcp/.cache/rebar3/hex/default/packages/pc-1.4.0.tar ===> Compiling pc ===> Fetching stringprep ({pkg,<<"stringprep">>,<<"1.0.7">>}) ===> Downloaded package, caching at /Users/marcp/.cache/rebar3/hex/default/packages/stringprep-1.0.7.tar ===> Fetching p1_utils ({pkg,<<"p1_utils">>,<<"1.0.6">>}) ===> Downloaded package, caching at /Users/marcp/.cache/rebar3/hex/default/packages/p1_utils-1.0.6.tar ===> Compiling p1_utils ===> Compiling fast_xml ===> Compiling /Users/marcp/Desktop/erlang-test/myapp/_build/default/lib/fast_xml/c_src/fxml.c ===> Compiling /Users/marcp/Desktop/erlang-test/myapp/_build/default/lib/fast_xml/c_src/fxml_stream.c ===> Linking /Users/marcp/Desktop/erlang-test/myapp/_build/default/lib/fast_xml/priv/lib/fxml.so ===> Linking /Users/marcp/Desktop/erlang-test/myapp/_build/default/lib/fast_xml/priv/lib/fxml_stream.so ===> Compiling stringprep ===> Compiling /Users/marcp/Desktop/erlang-test/myapp/_build/default/lib/stringprep/c_src/stringprep.cpp ===> Linking /Users/marcp/Desktop/erlang-test/myapp/_build/default/lib/stringprep/priv/lib/stringprep.so ===> Compiling xmpp ===> Compiling _build/default/lib/xmpp/src/xmpp_util.erl failed _build/default/lib/xmpp/include/xmpp.hrl:29: can't find include file "fxml.hrl" However, when I compile this module separately, it works: $ cd _build/default/lib/xmpp $ rebar3 compile ===> Fetching rebar3_hex ({pkg,<<"rebar3_hex">>,<<"3.1.0">>}) ===> Downloaded package, caching at /Users/marcp/.cache/rebar3/hex/default/packages/rebar3_hex-3.1.0.tar ===> Compiling rebar3_hex ===> Verifying dependencies... ===> Fetching fast_xml ({pkg,<<"fast_xml">>,<<"1.1.18">>}) ===> Downloaded package, caching at /Users/marcp/.cache/rebar3/hex/default/packages/fast_xml-1.1.18.tar ===> Fetching pc ({pkg,<<"pc">>,<<"1.4.0">>}) ===> Downloaded package, caching at /Users/marcp/.cache/rebar3/hex/default/packages/pc-1.4.0.tar ===> Compiling pc ===> Fetching stringprep ({pkg,<<"stringprep">>,<<"1.0.7">>}) ===> Downloaded package, caching at /Users/marcp/.cache/rebar3/hex/default/packages/stringprep-1.0.7.tar ===> Fetching p1_utils ({pkg,<<"p1_utils">>,<<"1.0.6">>}) ===> Downloaded package, caching at /Users/marcp/.cache/rebar3/hex/default/packages/p1_utils-1.0.6.tar ===> Skipping p1_utils (from {pkg,<<"p1_utils">>,<<"1.0.6">>, <<"EF0951DDF38E92B7E479AF4B8DC950DF76AF8C1030432EF68B7FD7AD17C436FE">>}) as an app of the same name has already been fetched ===> Compiling p1_utils ===> Compiling fast_xml ===> Compiling /Users/marcp/Desktop/erlang-test/myapp/_build/default/lib/xmpp/_build/default/lib/fast_xml/c_src/fxml.c ===> Compiling /Users/marcp/Desktop/erlang-test/myapp/_build/default/lib/xmpp/_build/default/lib/fast_xml/c_src/fxml_stream.c ===> Linking /Users/marcp/Desktop/erlang-test/myapp/_build/default/lib/xmpp/_build/default/lib/fast_xml/priv/lib/fxml.so ===> Linking /Users/marcp/Desktop/erlang-test/myapp/_build/default/lib/xmpp/_build/default/lib/fast_xml/priv/lib/fxml_stream.so ===> Compiling stringprep ===> Compiling /Users/marcp/Desktop/erlang-test/myapp/_build/default/lib/xmpp/_build/default/lib/stringprep/c_src/stringprep.cpp ===> Linking /Users/marcp/Desktop/erlang-test/myapp/_build/default/lib/xmpp/_build/default/lib/stringprep/priv/lib/stringprep.so ===> Compiling xmpp How can I find out what's going on? Is the `rebar.config.script` of the xmpp library to blame?

Posted by Marc Philipp about a year ago