[erlang-questions] Erlang BDB driver build issues
Ciprian Dorin Craciun
ciprian.craciun@REDACTED
Mon Oct 15 22:08:29 CEST 2007
Hello Chris!
(See my answers below...)
On 10/15/07, Chris Newcombe <chris.newcombe@REDACTED> wrote:
> Hi Ciprian,
>
> I am cc'ing the erlang-questions mailing list as it is possible that
> my responses may help other people.
>
>
> > 1) You are using a tool named "findup".
> > The problem is that this tool is not installed by default on my
> > system -- Debian Etch.
>
> This part of the makefile comes from the original EDTK makefiles,
> which I didn't write. I use RHEL3, and I found that the makefile just
> worked. I believe that the original author of the makefile used
> Solaris.
>
> I just checked, and 'findup' is actually a perl script in my company's
> environment
> Hopefully you can adapt this:
>
> #!/bin/perl5.8/perl
> use strict;
> use warnings;
>
> use Cwd;
> use File::Basename;
>
> my $target = shift || die "Usage: $0 <target-name>\n";
> my $dir = cwd;
>
> while ((! -e "$dir/$target") && ($dir ne dirname($dir))) {
> $dir = dirname($dir);
> }
>
> print $dir if -e "$dir/$target";
>
>
> > 2) It seems that there are some hard-coded paths to pcre and
> > coredumper libs. Also the make file assumes that the header files for
> > both libraries are in a standard location. (Which in my case is not.)
>
> Yes this is far from ideal and I apologise.
> I hope that you saw that there is an installer script available that
> includes patches that removes the absolute paths:
>
> http://www.snookles.com/erlang/edtk/edtk-1.5.1.README-compilation-help
Yes, I have seen from previous posts that there is an installer
script. But for now I hadn't had time to try it. Finally I have
managed to install it.
> > *) I have tried to compile it against BDB 4.6.21 -- the latest --
> > but there were some compilation errors. After I tried with 4.5.20 --
> > unpatched -- I seen that the error messages are the same. Maybe the
> > patches wasn't accepted in the final release...
>
> This won't work, and is actually dangerous.
>
> You MUST use the build of BDB that is recommended in the
> README-cnewcom file. That is v4.5.20 plus the 20 or so patches
> applied by the script in:
>
> examples/berkeley_db/patches-to-berkeley-db/db-4.5.20/apply-patches.sh
>
> All of those patches (apart from one minor patch) are official Oracle
> patches, to fix bugs in the released version of v4.5.20. The patches
> are essential for correct operation (particularly replication, and
> also distributed transactions). The same fixes have been included in
> BDB v4.6, but Oracle do not normally back-port fixes to older existing
> releases. So the existing (final) v4.5.20 tarballs do not have these
> patches. (i.e. Oracle did not do another release of v4.5 that includes
> these patches -- you have to use the patch script above.)
Indeed by applying the patches on v4.5.20 it compiled correctly.
But it seems that the patches are not included in v4.6.21, as the same
compilation error is encountered as with the unpatched v4.5.20... I
haven't tried to apply the patches on v4.6.21 -- maybe it would
work...
> There are constants in the examples/berkeley_db/berkeley_db.xml file
> that are taken from the db.h file that is generated by the bdb build.
> To upgrade the driver to a new version of BDB, those constants must
> be edited. There are instructions in the berkeley_db.h file. As BDB
> releases are only once a year, I never automated this.
It's Ok, and also I think the constants do not change from one
release to another...
> FYI There is an engineer at Oracle who has experimentally upgraded the
> driver to use the latest BDB v4.6 release (they are evaluating Erlang
> as an internal test platform for BDB-HA). I can ask her for patches
> if you like. However, it would be a grave mistake to upgrade the
> driver to BDB v4.6 until full testing has been done, as v4.6 is still
> relatively new -- there have been a couple of patch releases already.
> So the patch would be marked 'experimental' at the very least.
I would very much like to obtain the latest patches for v4.6...
Also I am not currently planing to use BerkeleyDB with Erlang in a
production application... I just want to play with them -- mostly
Erlang... (I am new to Erlang...)
But back to the topic, I am available to test the new version...
> I hope this helps,
>
> Chris
>
>
> On 10/12/07, Ciprian Dorin Craciun <ciprian.craciun@REDACTED> wrote:
> > Hello!
> >
> > My name is Ciprian Craciun and I have read your posts on the
> > Erlang discussion list.
> >
> > I have tried to compile the driver but I have encountered some
> > problems... Most of them I hacked out and managed to proceed... But
> > still all these problems could make the difference if some one would
> > like to asses your library.
> >
> > I am writing this because maybe you could solve these
> > inconveniences for further releases.
> >
> > (I am using the latest version of EDTK -- 1.5.1)
> >
> > 1) You are using a tool named "findup".
> > The problem is that this tool is not installed by default on my
> > system -- Debian Etch. Also the only binary named like this in the
> > entire distribution does something completely different.
> > You could either remove it and use something else, or provide
> > it... Even quick search on Google comes up with nothing useful...
> >
> > 2) It seems that there are some hard-coded paths to pcre and
> > coredumper libs. Also the make file assumes that the header files for
> > both libraries are in a standard location. (Which in my case is not.)
> > It would be nice to have these paths as variables, just like
> > BDB_INSTALLED_DIR.
> > Maybe you could create a file named config that would be read by
> > the make files and the shell scripts.
> >
> > *) I have tried to compile it against BDB 4.6.21 -- the latest --
> > but there were some compilation errors. After I tried with 4.5.20 --
> > unpatched -- I seen that the error messages are the same. Maybe the
> > patches wasn't accepted in the final release...
> >
> > Except of these problems the build was successful and the first
> > example worked (the one without replication). Now I have to play with
> > the library.
> >
> > I hope that this information is of some use to you.
> >
> > Ciprian.
Thank you for your time,
Ciprian.
More information about the erlang-questions
mailing list