Comments (36)
Forgot about it. Will do that on Monday.
from erlang.mk.
I have pushed the temporary commit.
from erlang.mk.
Well rc3 is out so now is the time really.
from erlang.mk.
I will have to remove a few things including RELX_OPTS
, at least initially. It would be helpful if I could know which relx.config file and RELX_* configuration everyone is using.
from erlang.mk.
I have opened erlware/relx#911 to get the fix in the main Relx repository.
from erlang.mk.
Works for me now, thanks
from erlang.mk.
I will have to rebuild a relx binary probably since it dropped support for 20 beam files.
from erlang.mk.
Having same issue with 25-rc2 . Any update on this issue ?
escript: exception error: undefined function relx:main/1
in function escript:run/2 (escript.erl, line 750)
in call from escript:start/1 (escript.erl, line 277)
in call from init:start_em/1
in call from init:do_boot/3
erlang.mk:7505: recipe for target 'relx-rel' failed
from erlang.mk.
I'm afraid it looks a bit more difficult than just recompiling against 22+. The release generated by Relx no longer contains a RELEASES file which is necessary for some features to work (such as release upgrades). I can create an empty RELEASES file and this will let most use of releases work but NOT release upgrades. For that upgrading Relx will certainly be necessary, and that implies switching from escript to using it as a library.
So for the time being I will push the update that makes it work in all cases except release upgrades, but then I will have to find time to do a proper move to Relx 4. This is going to be a breaking change (although we can support both modes for the time being).
from erlang.mk.
I added the updated erlang.mk, but when I gmake on freebsd is says:
touch: _rel/projname_release/releases/RELEASES: No such file or directory
gmake: *** [erlang.mk:7507: relx-rel] Error 1
but if I do:
mkdir _rel/projname_release/releases
touch _rel/projname_release/releases/RELEASES
then run gmake again, it works.
I'm not sure why there is a projname_release. I thank it should just be projname in the path.
from erlang.mk.
I probably used the wrong variable. I'll take a look when I can.
from erlang.mk.
Hm I will change it to use $(PROJECT)
but this is not the right fix. I have to upgrade Relx soon.
from erlang.mk.
Actually that's probably because you have a relx.config that changes the default release name. So it's a bit more complicated. I will just have to upgrade Relx.
from erlang.mk.
Still in rc2, no hurry.
But this must be fixed for 25 announcement.
from erlang.mk.
I am making it similar to proper, which means relx will need to be added to REL_DEPS (or other relevant DEPS) in order to run.
from erlang.mk.
Another heads up: these options will need to be set explicitly since it seems like the defaults have changed:
{dev_mode, false}.
{include_erts, true}.
from erlang.mk.
Please try the relx4
branch: https://github.com/ninenines/erlang.mk/tree/relx4
Note that it currently requires a custom relx if you are using simple integers for release versions. Also make note of the earlier comments.
from erlang.mk.
This is what I use for relx.config:
{release, {esysman, "1.20"}, [esysman]}.
{extended_start_script, true}.
{vm_args, "./config/vm.args"}.
from erlang.mk.
Tests are now green on the branch (no changes to release code since yesterday) so it's just a matter of feedback or OTP 25 getting released. I will try on my own projects as well, I got a bunch in Cowboy and Ranch that can exercise these changes.
from erlang.mk.
I will also need to reenable the Windows VM to test on Windows at some point.
from erlang.mk.
The Cowboy/Ranch tests that use releases all pass with minor updates. Other than start->daemon, I also encountered the fact that the eval command now expects the final dot.
from erlang.mk.
Windows now works but it required another relx patch. The relevant PR is erlware/relx#914
from erlang.mk.
Relevant problem if using OTP-25.0-rc2: erlang/otp#5826
from erlang.mk.
In aa0053c is there a reason you did this:
and not this:
When I take out the _releases, it works fine for me.
from erlang.mk.
Neither are correct, the release name is provided in relx.config and is not dependent on $(PROJECT)
. The one with _release
is simply the default.
from erlang.mk.
That line is on line 49 here:
https://github.com/ninenines/erlang.mk/blob/master/plugins/relx.mk
$(PROJECT)_release
should jsut be
$(PROJECT)
from erlang.mk.
It is correct for the default as I've said, see https://github.com/ninenines/erlang.mk/blob/master/plugins/bootstrap.mk#L95
The real fix is in the relx4
branch. Please try it and report feedback on that instead, as the touch
workaround will be removed when that branch is merged.
from erlang.mk.
I will merge the relx changes today. I will also investigate a potential issue with xref.
from erlang.mk.
Merged! Thanks. I will investigate xref now.
from erlang.mk.
Just an FYI: I just installed erlang 25, git cloned your erlang.mk project and ran make on it and put the erlang.mk in my project and all works with no error. Thanks!
from erlang.mk.
Hmm. Maybe I'll need to redo how my project is set up. I noticed now that "make distclean" does not remove _rel nor does "make" create a new _rel folder. Any tips what direction I need to go for this? Thanks
from erlang.mk.
I probably just need to implement what you have in your comments about the braking changes.
from erlang.mk.
Yes you need to add REL_DEPS = relx
to your Makefile or it won't do anything.
from erlang.mk.
This is what my make file looks like:
PROJECT = esysman
DEPS = cowboy epgsql
REL_DEPS = relx
dep_cowboy = git https://github.com/ninenines/cowboy 2.9.0
dep_epgsql = git https://github.com/wg/epgsql.git master
dep_relx = git https://github.com/erlware/relx master
include erlang.mk
include extra.mk
I get this now when running make:
...
DEPEND relx.d
ERLC relx.erl rlx_app_info.erl rlx_assemble.erl rlx_config.erl rlx_file_utils.erl rlx_log.erl rlx_overlay.erl rlx_release.erl rlx_relup.erl rlx_resolve.erl rlx_state.erl rlx_string.erl rlx_tar.erl rlx_util.erl
APP relx.app.src
make[1]: Leaving directory '/path/esysman/deps/relx'
erl +A1 -noinput -boot no_dot_erlang -pa ebin/ -pz /path/esysman/.erlang.mk/rebar/ebin -eval " {ok, Config} = file:consult("/path/esysman/relx.config"), {release, {Name, Vsn0}, } = lists:keyfind(release, 1, Config), Vsn = case Vsn0 of {cmd, Cmd} -> os:cmd(Cmd); semver -> ""; {semver, } -> ""; VsnStr -> Vsn0 end, {ok, } = relx:build_release(#{name => Name, vsn => Vsn}, Config), halt(0)." -- erlang.mk
Solving Release esysman-1.20{"init terminating in do_boot",{{error,{rlx_resolve,{app_not_found,esysman,undefined}}},[{rlx_resolve,subset,7,[{file,"src/rlx_resolve.erl"},{line,72}]},{rlx_resolve,'-fold_apps/7-fun-0-',7,[{file,"src/rlx_resolve.erl"},{line,99}]},{lists,foldl,3,[{file,"lists.erl"},{line,1350}]},{rlx_resolve,subset,5,[{file,"src/rlx_resolve.erl"},{line,54}]},{rlx_resolve,solve_release,2,[{file,"src/rlx_resolve.erl"},{line,48}]},{relx,build_release,3,[{file,"src/relx.erl"},{line,170}]},{relx,build_release,3,[{file,"src/relx.erl"},{line,87}]},{erl_eval,do_apply,7,[{file,"erl_eval.erl"},{line,744}]}]}}
init terminating in do_boot ({{error,{rlx_resolve,{app_not_found,esysman,undefined}}},[{rlx_resolve,subset,7,[{},{}]},{rlx_resolve,-fold_apps/7-fun-0-,7,[{},{}]},{lists,foldl,3,[{},{}]},{rlx_resolve,subset,5,[{},{}]},{rlx_resolve,solve_release,2,[{},{}]},{relx,build_release_,3,[{},{}]},{relx,build_release,3,[{},{}]},{erl_eval,do_apply,7,[{},{}]}]})
Crash dump is being written to: erl_crash.dump...done
make: *** [erlang.mk:7537: relx-rel] Error 1
from erlang.mk.
Should have said BUILD_DEPS by the way. You probably don't want it included in the release.
Also please remove the dep_relx line and use the one defined by erlang.mk for now as it contains a fix that upstream relx hasn't merged yet. You might need to make distclean
as well. If that fails please provide a test repository that I can use to reproduce.
from erlang.mk.
Note that relx will be added automatically when creating a new project as of a few days ago.
from erlang.mk.
Related Issues (20)
- Release fails to build if top folder name is different from app name HOT 4
- system deps are not included in release anymore HOT 4
- Release package saved into a wrong output dir? HOT 3
- make RELOAD=1 does not work HOT 2
- Feature: Additional template modifiers HOT 1
- is Getting started instruction correct? HOT 1
- OTP26 dialyzer support: `--no_native` flag is gone HOT 1
- Feature: Compilation of Elixir projects
- autopatching is overly verbose (missing $(verbose)) HOT 3
- Add advice on project directory naming rule on `creating_a_folder_for_your_project` tutorial HOT 2
- Failed to eval: application:load(rebar) HOT 7
- Problem building NIF on Mac M1 HOT 2
- erlang.mk tutorial release build failure HOT 4
- Windows 11(OTP-26) release build : system cannot find the file path to \hello_rel_release\erts-14.0\bin\werl.exe.
- relx can't find app HOT 3
- Failing on Mac Sonoma 14 M2 HOT 1
- Crash release when `Erlang.mk` project has dependency builded and use `SemVer` VSN HOT 2
- Make failed, argument list too long HOT 4
- Build failure on OTP-27
- Allows apps dir to contain symlinks
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from erlang.mk.