#12 Dependency version mismatch when packaging releases


BUG: Packaging release projects on systems with more than one Erlang/OTP distribution (in /usr/local/lib/erlang) may be unable to resolve the correct OTP application dependency version (such as for mnesia, tv or gs).

Installing and updating at least 2 distributions of Erlang/OTP, using the simple default install action (configure, make make install), will build an aggregated list of OTP applications in the Erlang library path (typically /usr/local/lib/erlang/lib). This is a list of application directories with the naming scheme [application_name]-[version], and is typically sorted ascending in the filesystem.

When packaging release projects, that have OTP-dependencies (either ${AUTODEPS} or custom, for example ${MNESIA}), there might be mismatches between the actual selected OTP dependency path and the version of the loaded and checked dependency in the target system.

This causes packaging to fail with with the following type of output:

[INFO] ------------------------------------------------------------------------
[INFO] T E S T - R U N N E R
[INFO] ------------------------------------------------------------------------
[ERROR] Version mismatch for xxx_lib: [xxx_lib:erlang-otp:1.0.0-SNAPSHOT:compile, xxx_core:erlang-otp:1.0.0-SNAPSHOT:compile, xxx_driver:erlang-otp:1.0.0-SNAPSHOT:compile] != {xxx_core=1.0.0-SNAPSHOT, tv=, stdlib=1.17.1, mnesia=4.4.15, xxx_lib=1.0.0-SNAPSHOT, gs=1.5.13, sasl=, kernel=2.14.1, xxx_driver=1.0.0-SNAPSHOT}
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Checking dependencies failed, see previous output for detailed description.
[INFO] ------------------------------------------------------------------------

It is expected that the OTP application version resolution shall use the same version as the target system (latest updated version) so this selection method must be fixed.

WORKAROUND: As a temporary workaround one can clean out the Erlang/OTP installation and, for every update, ensure that each version is installed at custom locations (using --prefix=/custom/path/). This installation may then be selected at packaging time with the plug-in parameter -DerlCommand=/custom/path.


  • Olle Törnström

    • status: open --> open-fixed
  • Olle Törnström

    Resolved in the development trunk 2.1.0-SNAPSHOT.

  • Olle Törnström

    • status: open-fixed --> closed-fixed

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks