My favorites | Sign in
Project Logo
                
Search
for
Updated Jul 26, 2009 by paul.min...@gmail.com
Labels: Featured, Phase-Deploy
InstallationHowto  
Installation Hints

Prerequisites

Do NOT attempt to build from a checkout from the source code repository: that is for wizards only. Instead, grab one of the released source tarballs from the downloads tab.

  1. gnu make
  2. working erlang installation.
    • debian: aptitude install erlang-dev
    • os/x (with fink): apt-get install erlang-otp
    • freebsd: pkg_add -r erlang
    • others: ???
  3. eunit from process one; optional but 'make check' will not do anything without it.

Installing

The project uses automake[1]. The default prefix is /usr; if you don't like that, use the --prefix option to configure.

% ./configure && make && make check 

Running make check is strongly suggested.

The project is distributed as a set of patches. At build time it tries to find your current version of mnesia and patch it. If this is successful, then it will end up creating a version of mnesia with a version equal to the version you have installed plus ".N" where N is the version of the extensions. For instance, right now, version 6 of the extensions has been released, so on a system running mnesia-4.3.5, a successful build and install will install as mnesia-4.3.5.6.

Tested Platforms

Footnotes

1

More precisely, downloadable source tarballs use automake to build. A source code checkout of the repository uses framewerk to build, and if you don't know what that is, you probably want to stick with the tarballs.


Comment by WayneESeguin, Jul 02, 2008

If you have your default compile flags set to compile in parallel (ex: -j9) then you'll have to explicitly do "make -j1" when compiling.

Comment by krzysztof.klis, Sep 20, 2008

It also works well with Mnesia 4.4.5 provided that you make a small change to mnesia_loader.erl.patch

Comment by ytakanoster, Sep 21, 2008

Hi, I tried to compile mnesia-4.3.5ext2.tar.gz on MacOS X 10.4.11, but it failed when patching mnesia_loader.erl. I think that the patch file is broken. Is that right?

Error log is: patching file mnesia_loader.erl Hunk #5 succeeded at 602 (offset 3 lines). Hunk #6 FAILED at 614. Hunk #7 succeeded at 643 (offset 5 lines). 1 out of 7 hunks FAILED -- saving rejects to file mnesia_loader.erl.rej make2?: mnesia_loader.erl? Error 1 make1?: all-recursive? Error 1 make: all-recursive? Error 1

mnesia_loader.erl.rej is: 586,592

disc_copies ->
catch ?ets_delete_table(Tab);
disc_only_copies ->
- mnesia_lib:cleanup_tmp_files(Tab?)
end, mnesia_checkpoint:tm_del_copy(Tab, node()), mnesia_controller:sync_del_table_copy_whereabouts(Tab, node()),
--- 614,622 ----
disc_copies ->
catch ?ets_delete_table(Tab);
disc_only_copies ->
+ mnesia_lib:cleanup_tmp_files(Tab?); + { external_copies, Mod } -> + catch Mod:delete_table(Tab)
end, mnesia_checkpoint:tm_del_copy(Tab, node()), mnesia_controller:sync_del_table_copy_whereabouts(Tab, node()),

Comment by rolly.fordham, Oct 09, 2008

I'm having the same issue as ytakanoster seems to be, which sounds like the same issue that krzysztof.klis mentions. Does anyone know what needs to be changed in mnesia_loader.erl to make the patch apply?

Comment by menhelvete, Dec 02, 2008

Hello! I have the same problem as you guys. I guess that mnesia_loader.erl in mnesia have been updated since the release of mnesiaex 4.3.5 so the patch file try to match a line that is not there.

Would be nice if anyone could upload or share the necessary changes to mnesia_loader.erl.patch (even though it is a 'simple' change)

cheers

Comment by kptzoom, Jan 13, 2009

I use mnesia 4.4.3 and I patched mnesia_loader.erl manually according to the content of mnesia_loader.erl.patch.

Then I deleted all lines in mnesia_loader.erl.patch except for the first 8 lines because an empty patch-file is treated as a corrupt one and will crash the install.

But a small change in mnesia_loader.erl.patch could perhaps be faster:

from

@@ -583,7 +611,9 @@
 	disc_copies ->
 	    catch ?ets_delete_table(Tab);
 	disc_only_copies ->
-	    mnesia_lib:cleanup_tmp_files([Tab])
+	    mnesia_lib:cleanup_tmp_files([Tab]);
+        { external_copies, Mod } ->
+            catch Mod:delete_table(Tab)

to (wrong line numbers but should work anyway)

@@ -583,7 +611,9 @@           
 	disc_copies ->
 	    catch ?ets_delete_table(Tab);
 	disc_only_copies ->
	    TmpFile = mnesia_lib:tab2tmp(Tab),
	    mnesia_lib:dets_sync_close(Tab),
-	    file:delete(TmpFile)
+	    file:delete(TmpFile);
+        { external_copies, Mod } ->
+            catch Mod:delete_table(Tab)

Hope this could save some minutes for my fellow erlangers


Sign in to add a comment
Hosted by Google Code