Why is relx not generating a release?
Asked Answered
T

2

6

My relx configuration

{release,{socket,"0.1.0"}}.
{extend_start_script,true}.

My .app file

{application,socket,
         [{description,[]},
          {vsn,"1"},
          {registered,[]},
          {applications,[kernel,stdlib,cowboy]},
          {mod,{socket,[]}},
          {env,[{http_port,8080}]},
          {modules,[socket_app,socket_socket_handler,socket_sup]}]}.

After compiling the application using rebar I run relx from my terminal and the following is the output that I get

===> Starting relx build process ...

===> Resolving OTP Applications from directories:

    /home/akshat/Desktop/socket/ebin

   /home/akshat/Desktop/socket/deps

  /usr/lib/erlang/lib

===> Missing beam file hipe <<"/usr/lib/erlang/lib/hipe-3.10.2/ebin/hipe.beam">>

===> Resolving available OTP Releases from directories:

     /home/akshat/Desktop/socket/ebin

     /home/akshat/Desktop/socket/deps

     /usr/lib/erlang/lib

No releases have been specified in the system!

I don't understand this message from relx. Does it not create the release for me?

How do I install hipe?

Update

After doing a fresh install of erlang I no longer get hipe error message. But rebar still says no releases have been specified by the system.

Thiourea answered 3/11, 2013 at 12:25 Comment(1)
Was getting No releases have been specified in the system! error when running rebar3 release anywhere else but the rebar3 project root.Adiel
T
2

Got this working. Re-installing erlang got rid of the first problem i.e the hipe error message. What relx meant by

No releases have been specified by the system

is that I had not specified an application to assemble for release. My understanding was that since I had only one application I would not need to specify it explicitly. So my relx.config file now looks like

{release,{socket,"0.1.0"},[socket]}.
{extend_start_script,true}.

This works and I now have a release in my _rel folder.

Thiourea answered 3/11, 2013 at 19:41 Comment(0)
L
3

I was having the exact same issue until I enter in the root directory of the rebar3 project, and run the rebar3 compile, rebar3 release commands. It worked perfect.

$ > ls
enter code here
chatx   rebar3
$ > cd chatx/
$ > rebar3 compile
    ===> Verifying dependencies...
    ===> Compiling chatx
$ > rebar3 release
    ===> Verifying dependencies...
    ===> Compiling chatx
    ===> Starting relx build process ...
    ===> Resolving OTP Applications from directories:

      /Users/studio/erlang/chatx/_build/default/lib
      /Users/studio/erlang/chatx/apps
      /Users/studio/kerl/20.2/lib

    ===> Resolved chatx-0.1.0
    ===> Dev mode enabled, release will be symlinked
    ===> release successfully created!
Lovmilla answered 2/8, 2018 at 20:19 Comment(0)
T
2

Got this working. Re-installing erlang got rid of the first problem i.e the hipe error message. What relx meant by

No releases have been specified by the system

is that I had not specified an application to assemble for release. My understanding was that since I had only one application I would not need to specify it explicitly. So my relx.config file now looks like

{release,{socket,"0.1.0"},[socket]}.
{extend_start_script,true}.

This works and I now have a release in my _rel folder.

Thiourea answered 3/11, 2013 at 19:41 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.