Giter VIP home page Giter VIP logo

Comments (18)

lukebakken avatar lukebakken commented on July 30, 2024

Which version of erlang are you using?

from gpb.

lukebakken avatar lukebakken commented on July 30, 2024

I'm using 19.1 and getting the following relx error, which appears to be the same as described in erlware/relx#52

gpb-94-make.txt

from gpb.

tomas-abrahamsson avatar tomas-abrahamsson commented on July 30, 2024

@orotemo, did you get the same error as @lukebakken? If so, it seems the vsn in ebin/gpb.app does not get correctly substituted (not at all) when created from src/gpb.app.src. Will take a look.

from gpb.

orotemo avatar orotemo commented on July 30, 2024

@tomas-abrahamsson yes! Thanks.

from gpb.

tomas-abrahamsson avatar tomas-abrahamsson commented on July 30, 2024

Hmm.. preliminary diagnosis, it looks like (a) erlang.mk builds gpb on its own instead of using deps/gpb/Makefile or rebar, and (b) does does not support the {vsn,{cmd,Cmd}} format that gpb uses and rebar supports (as does deps/gpb/Makefile)

I've yet to dig into (a).

This leads to the {cmd,Cmd} landing unmodified as vsn value into deps/gpb/gpb.app, which subsequently---and rightfully, I think---leads to problems when relx sees this.

Don't have any solution yet, though.. (Many Thanks for complete steps to recreate the issue!)

from gpb.

lukebakken avatar lukebakken commented on July 30, 2024

Adding NO_AUTOPATCH will cause erlang.mk to use the Makefile from gpb:

https://github.com/lukebakken/gpb_94/blob/master/Makefile#L5

However, I don't see any of the gpb build output in _rel.

Some info here about autopatching.

from gpb.

lukebakken avatar lukebakken commented on July 30, 2024

If I add gpb to DEPS in the top-level Makefile, the _rel dir does contain the correct output.

Top level Makefile change.

Output:

$ ll _rel/gpb_94_release/lib/gpb
gpb-3.26.3/   gpb_94-0.0.1/ 

$ ll _rel/gpb_94_release/lib/gpb-3.26.3/
total 24
drwxr-xr-x 6 lbakken lbakken 4096 Oct 20 14:38 .
drwxr-xr-x 6 lbakken lbakken 4096 Oct 20 14:38 ..
drwxr-xr-x 2 lbakken lbakken 4096 Oct 20 14:38 ebin
drwxr-xr-x 2 lbakken lbakken 4096 Oct 20 14:38 include
drwxr-xr-x 3 lbakken lbakken 4096 Oct 20 14:38 priv
drwxr-xr-x 2 lbakken lbakken 4096 Oct 20 14:38 src

from gpb.

tomas-abrahamsson avatar tomas-abrahamsson commented on July 30, 2024

Thanks @lukebakken for digging further!

So one need DEPS += gpb twice, both in apps/an_app/Makefile in the top level Makefile, and in the top level, one also needs NO_AUTOPATCH += gpb. Is this double need of DEPS += gpb common procedure with relx and erlang.mk to get deps into the release or does it need to be addressed somehow? (I don't know; I haven't done this a lot)

from gpb.

lukebakken avatar lukebakken commented on July 30, 2024

I really don't know, myself. I've only used erlang.mk for basic projects.

It appears you can remove DEPS from apps/an_app/Makefile and the build succeeds. I'm not sure if it would work if you have code in an_app that depends on gpb, however.

from gpb.

tomas-abrahamsson avatar tomas-abrahamsson commented on July 30, 2024

@orotemo do you think the solution by @lukebakken works well enough?

from gpb.

orotemo avatar orotemo commented on July 30, 2024

@tomas-abrahamsson @lukebakken: sorry for taking so long, and thank you. I managed with this solution. anyway, maybe for @essen this is just a short look to help us understand what needs to change to resolve this.

from gpb.

essen avatar essen commented on July 30, 2024

The vsn not being supported is a known issue. The double DEPS is more surprising and sounds like a bug in Erlang.mk.

from gpb.

tomas-abrahamsson avatar tomas-abrahamsson commented on July 30, 2024

How should we move forward on this?

Regarding double DEPS, should be continued as an issue on Erlang.mk?

Regarding vsn, I suppose NO_AUTOPATCH += gpb is ok for you, @orotemo? From a gpb point-of-view this would be preferrable, so that all of gpb builds.

from gpb.

essen avatar essen commented on July 30, 2024

Actually I think I see the problem. Autopatch should not run, yet it does because it sees rebar on the following line: https://github.com/tomas-abrahamsson/gpb/blob/master/Makefile#L125

But since rebar is not used, and you don't do anything special with dependencies, we have no reason to run autopatch. I have to fix Erlang.mk to ignore comments when looking for rebar usage.

from gpb.

tomas-abrahamsson avatar tomas-abrahamsson commented on July 30, 2024

Ok, I see. I'll be more or less offline for a few days from now, but rephrasing is quick, so should it still be needed by then, I'll do that.

from gpb.

essen avatar essen commented on July 30, 2024

Oddly enough Erlang doesn't care if the vsn key is a tuple when loading the application. That's why it wasn't detected in the nightly build.

The fix is in, you can close this: ninenines/erlang.mk@a8fffe1

Thanks!

from gpb.

tomas-abrahamsson avatar tomas-abrahamsson commented on July 30, 2024

Excellent! Closing. @orotemo, should anything surface, just reopen or open a new.

from gpb.

essen avatar essen commented on July 30, 2024

I've opened ninenines/erlang.mk#633 for the double DEPS thing, FYI.

from gpb.

Related Issues (20)

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.