rebar

Compiling project with NIFs with rebar: cl.exe not found

孤街浪徒 提交于 2019-12-09 23:39:11
问题 I'm new to erlang and rebar. In my rebar project I used a dependency containing native c code and during rebar compile I'm getting error: Name cl.exe is not recognized as an internal or external command, operable program or batch file I guess that rebar is trying to compile c files from my dependency using Microsoft's cl.exe compiler from VisualStudio, right? The problem is that I don't have VS installed and don't want to install it. Why rebar is trying to use cl.exe? Can I configure rebar to

erlang rebar escriptize & nifs

China☆狼群 提交于 2019-12-06 21:38:26
问题 I can use nif's if I write the escript myself, however when I use rebar escriptize the nif functions cannot be found. I think it is because *.so objects are not getting packed like beam files. Here is an simple example; rebar.config : {deps, [ {'jiffy', "", {git, "https://github.com/davisp/jiffy.git", {branch, master}}} ]}. {escript_incl_apps, [jiffy]}. %% I tried this to see what happens if the so got in there but didn't help {escript_incl_extra, [{"deps/jiffy/priv/jiffy.so", "/path/to/my

passing runtime arguments to erlang when running rebar eunit

Deadly 提交于 2019-12-06 07:35:00
In my startup script, I am starting erlang with: erl -args_file vm.args Currently, while trying to run unit tests with rebar eunit is there a way for me to pass custom runtime arguments such as the -args_file option to the erlang process that rebar kicks off? I have searched docs high and low to no avail... I appreciate the help. I answered my own question. I use the ERL_FLAGS variable to pass command line args. Here is a snippet from my Makefile: ERL_FLAGS="-args_file test/conf/vm.eunit.args" ./rebar skip_deps=true eunit The first method is satisfied with your restriction: 1. in your eunit

How to handle deps while using rebar to release?

情到浓时终转凉″ 提交于 2019-12-06 05:43:23
问题 I'm using rebar generate to handle release, but when I start the application, the deps I use will not be found.` I can start the application manually using erl -pa ./ebin ./deps/*/ebin -s myapp . I'm wonder how to config rebar.config and reltool.config to handle dependencies? Thanks. 回答1: In order for reltool to generate a release which includes the dependencies, you will need to add them to reltool.config . I have an application called drill_instructor , which has the following reltool

When to use erlang application:start or included_applications and a supervisor?

。_饼干妹妹 提交于 2019-12-06 04:50:42
问题 I have an Erlang application which has a dependency in its deps directory on another application. From what I understand I can either; a) start my dependent application from my including application by calling application:start(some_other_app) which starts the application and shows it running standalone within Observer. b) include my dependent application in my .app file with {included_applications, [some_other_app]} so that the application is loaded and not started and then start the

Rebar: “Release mynode uses non existing application mynode”

空扰寡人 提交于 2019-12-06 04:47:19
问题 I've been trying to set up a simple Erlang app using Rebar but can't get it to work. I followed the instructions on http://skeptomai.com/?p=56 to the letter, and when I run ./rebar -v generate , I get this error: ==> Entering directory `/home/adam/erlang-test3/testing-rebar/apps/myapp' WARN: 'generate' command does not apply to directory /home/adam/erlang-test3/testing-rebar/apps/myapp ==> Leaving directory `/home/adam/erlang-test3/testing-rebar/apps/myapp' ==> Entering directory `/home/adam

Erlang: Mnesia can not create schema while release with rebar

杀马特。学长 韩版系。学妹 提交于 2019-12-05 22:53:39
When I call mnesia:create_schema on startup, the program crashes. If I run my program in ebin without releasing it, it works find. The error log as follows: =INFO REPORT==== 3-Jul-2013::09:44:06 === application: eddy exited: {bad_return, {{eddy_app,start,[normal,[]]}, {'EXIT', {{badmatch, {error, {'EXIT', {undef, [{mnesia_backup,open_write, ["/home/cometeor/eddy/rel/eddy/Mnesia.eddy@127.0.0.1/eddy@127.0.0.1137284464686415846847780"], []}, {mnesia_bup,do_apply,4, [{file,"mnesia_bup.erl"},{line,387}]}, {mnesia_bup,make_initial_backup,3, [{file,"mnesia_bup.erl"},{line,378}]}, {mnesia_bup,create

Idiomatic way to ship command line tools written in Erlang

感情迁移 提交于 2019-12-05 19:10:46
问题 The problem Most of the articles and books about Erlang I could find focus on creating long running server-like applications leaving the process of command line tools creation not covered. I have a multi-app rebar3 project consisting of 3 applications: myweb - a cowboy based web service; mycli - a command line tool to prepare assets for myweb ; mylib - a library used by both myweb and mycli , depends on a NIF. As a result of the build I want to get such artifacts: an executable for the web

Easy way of loading project's Rebar dependencies in Erlang shell

爷,独闯天下 提交于 2019-12-05 11:07:25
问题 I've got a project that uses Rebar as build tool. When developing, I would like all my app dependencies that are specified in Rebar.config be compiled & loaded in the shell as easy as possible. I'm using the Erlang shell in Emacs. What's a quick way to do this? 回答1: I'm not using Emacs so I may miss the Emacs-specific side of your question, but when I want an Erlang shell with all my rebar dependencies loaded, I use: erl -pa ebin deps/*/ebin 回答2: ./rebar shell should load all your

rebar unable to get dependency from github

大憨熊 提交于 2019-12-05 02:32:22
I am unable to get any dependency from github using rebar. rebar.config file: {sub_dirs, ["rel"]}. {deps_dir, ["deps"]}. {erl_opts, [debug_info]}. {deps, [ {thrift_erl, "0.5.0", {git, "git://github.com/xslogic/thrift_erl", "HEAD"}}, {eleveldb, "1.0.1", {git, "git://github.com/xslogic/eleveldb", "HEAD"}} ]}. When I do ./rebar compile I get: Dependency not available: thrift_erl-0.5.0 ({git, "git://github.com/xslogic/thrift_erl", "HEAD"}) Dependency not available: eleveldb-1.0.1 ({git, "git://github.com/xslogic/eleveldb", "HEAD"}) It keeps looking for DEP_NAME with a dash at the end and can't