[erlang-questions] "erlang-src" package upgrade breaks "syntax_tools" and rebar builds

Sergei Golovan sgolovan@REDACTED
Sat Feb 1 12:41:56 CET 2014


Hi Roger,

On Fri, Jan 31, 2014 at 6:23 PM, Roger Lipscombe <roger@REDACTED> wrote:
> This morning, I let apt-get upgrade install a new "erlang-src"
> package. This has broken rebar. Specifically, I get the error message:
>
> ERROR: compile failed while processing /home/roger/Source/rebar/rebar:
> {'EXIT',{undef,[{epp_dodger,parse_file,["src/rebar_core.erl"],[]},
>                 {rebar_erlc_compiler,compile_priority,1,
>                                      [{file,"src/rebar_erlc_compiler.erl"},
>                                       {line,470}]},
>
> That is: rebar fails to compile other things, but (here) is also seen
> failing to compile itself.
>
> Upon investigation, I discover that I have both
> "/usr/lib/erlang/lib/syntax_tools-1.6.12" and
> "/usr/lib/erlang/lib/syntax_tools-1.6.13". The "-1.6.12" directory
> contains "ebin", but no "src", and the "-1.6.13" directory contains
> "src", but no "ebin".
>
> It would appear that my installation is using the newer one, and
> failing to find the .beam files.

Yes, code search really looking only for a directory under
/usr/lib/erlang/lib and doesn't try to look inside, so if you install
erlang broken into small packages, they must be consistent (though
their dependencies should make it just work).

>
> So, some questions:
>
> 1. How do I (on Linux Mint 15, so basically Ubuntu) figure out which
> APT repository the .deb file came from? This so that I can lay blame
> appropriately.

You can run apt-cache policy erlang-src and see which version is
installed and from where it came. Could you show  the output of
apt-cache policy erlang-src
apt-cache policy erlang-syntax-tools
apt-cache policy erlang-base (or erlang-base-hipe, whichever is installed)

> 2. I'd like to roll back the "erlang-src" package that broke this, but
> it appears to have the same version number as the previous one both
> are "1:16.b.3". Any idea how I do this?

In fact, syntax-tools 1.6.13 appeared only in Erlang R16B03-1
(1:16.b.3.1-something in Debian-Ubuntu-Mint notation). The problem is
that this version exists only in Debian stable, and hasn't come into
Ubuntu and Mint yet, so I'm curious which repository you're using. And
erlang-src 1:16.b.3.1-* should not be able to install with the earlier
erlang-syntax-tools (1:16.b.3-*). So, I'm curious how could it happen.

> 3. Can I simply delete the offending, newer, directory?

You definitely can.

> 4. If not, how do I get the binaries for "-1.6.13"?

I guess, from the repository where you got erlang-src. Though, let's
see the output from apt-cache policy first.

> 5. Or: how do I compile the source to do that myself?
>
> My feeling is that Erlang Solutions have repackaged "erlang-src", and
> somehow bumped the version number so that it got upgraded (not that I
> can tell the difference), but that, for some reason, I'm not seeing
> the corresponding "erlang-syntax-tools" upgrade, which would contain
> the "ebin" directory.

Erlang Solutions build one monolithic package, so I don't think that
you've installed it.

Cheers!
-- 
Sergei Golovan



More information about the erlang-questions mailing list