[erlang-questions] Problems with boot files and Erlang upgrades

Noah Slater nslater@REDACTED
Sat Feb 16 16:15:15 CET 2008


Hello,

I am developing the CouchDB build system and am experiencing a problem with the
use of Erlang boot files after the Erlang VM is upgraded post-build.

I have CC'd the CouchDB group in case there are any lurking Erlang experts.

I inherited the current build procedure (compiling a boot file) and while
managing to shoehorn it into a Autotools environment I must admit to
understanding little about the mechanics.

The problem goes something like this:

  $ apt-get install -t testing erlang-nox   # Install an old Erlang VM
  $ apt-get install -t experimental couchdb # Install CouchDB built for old VM
  $ apt-get install -t unstable erlang-nox  # Install a new Erlang VM

  $ couchdb # Run CouchDB with the new Erlang VM

CouchDB then crashes trying to open:

  /usr/lib/erlang/lib/kernel-2.11.5/ebin/error_handler.beam

The actual BEAM is located here:

  /usr/lib/erlang/lib/kernel-2.12.1/ebin/error_handler.beam

If you then install the latest CouchDB for the new Erlang VM everything works:

  apt-get install -t unstable couchdb

As Sergei Golovan (Debian) points out:

 It's not a bytecompiling failure. Erlang libraries are hardcoded into a couchdb
 boot file (/usr/lib/couchdb/erlang/bin/couch.boot). I never used boot files, so I
 can't say how to fix this bug. But if it stays as it is then couchdb will need
 a rebuild after each erlang version update (which seems too restrictive to me).

CouchDB compiles a boot file and launches it's self like so:

  /usr/bin/erl -sasl errlog_type error \
    -pa /usr/lib/couchdb/erlang/lib/couch-0.7.3a684/ebin \
        /usr/lib/couchdb/erlang/lib/couch_inets-4.7.5/ebin \
    -boot /usr/lib/couchdb/erlang/bin/couch

You can inspect the current build process:

  http://couchdb.googlecode.com/svn/trunk/src/Makefile.am
  http://couchdb.googlecode.com/svn/trunk/src/Emakefile.in
  http://couchdb.googlecode.com/svn/trunk/src/build_couch.erl.in

Is there an option I could use so that the paths are not hard-coded.

Is there an alternative to using boot files?

Thanks,

--
Noah Slater <http://bytesexual.org/>



More information about the erlang-questions mailing list