Overview
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.
There are two pieces: tcerldrv, the C driver; and tcerl, the Erlang code. Both pieces use automake to build.[1]
tcerldrv
- The default prefix is "/usr". If you don't like that, make sure to use the --prefix configure option.
- if you run into strange compilation issues, you can try passing the --disable-hardcore option to configure; this will disable the "treat warnings as errors" flag to the C compiler. At the time I wrote the software, there were no warnings, but as the standard library and compilers evolve that can change.
- You need pkg-config.
- Ubuntu/Debian: aptitude install pkg-config
- OS/X (fink): apt-get install pkgconfig
- freebsd: install the port
- others: please let me know so i can update here
- You need tokyocabinet with development headers; I use version 1.2.5, and haven't tested other versions.
- Ubuntu (hardy): aptitude install libtokyocabinet-dev
- others: Download and build the source
- You need erl_driver.h, erl_marshal.h, and erl_interface.h.
- Ubuntu/Debian: aptitude install erlang-dev erlang-src
- OS/X (fink): apt-get install erlang-otp
- freebsd: install the port
- others: please let me know so i can update here
tcerl
- The default prefix is wherever tcerldrv was installed, if that can be found in the path, otherwise "/usr". If you don't like that, make sure to use the --prefix configure option.
- When tcerl is started up, it attempts to auto-detect where the tcerldrv has been installed. Ideally this always works, but just in case, you can use application:set_env/3 with the tcerl application variable 'tcerldrvprefix' to let the code know where to look.
- You need a working Erlang installation.
- Ubuntu/Debian: aptitude install erlang
- OS/X (fink): apt-get install erlang-otp
- freebsd: install the port
- others: please let me know so i can update here
- You need eunit to run the tests. It's advised you run the tests if you are installing onto an untested environment.
- If the tests fail, output is in tests/*.test.out
Tested Environments
- Ubuntu i386 gusty (32 bit; 64 bit)
- OS/X 10.4 with fink
- you might have to tweak your include and linker flags to build tcerldrv if you put erlang somewhere i haven't anticipated (e.g., if you are not using fink). let me know what you had to do and i'll add it to configure.ac.local for the next release.
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.
You don't need fink/macports for OS X if you've already compiled Erlang/OTP from source. pkg-config from http://pkg-config.freedesktop.org/wiki/ compiles cleanly, at least on Leopard.
I had to help configure along to find my Erlang files though:
Probably worth mentioning (e.g. somewhere more prominent than an offhand reference in a footnote) that this requires yet-another-framework to be built and installed to get the actual package built and installed.
jim,
the tarballs should be cleanly without any other stuff required, or else, it's a bug.
to build from source, you'll need our build system; i would not recommend you do that actually, you'd have to get alot of stuff to make it work.
previous comment should read:
"the tarballs should build cleanly ..."
also, it should read "to build from the source code repository, you'll need our build system".
anyway thanks for the feedback, i updated the footnote to be clearer.
If you already have TokyoCabinet? and Erlang installed from source, just set the following before running configure.
It's great that it's described how to install the dependencies, but I think it might be worth mentioning how to actually install tcerldrv and tcerl, given not everybody is familiar with automake. Is it something like
./configure && make -j1 && make check?
RE:juliadotter Normally you install it (in e.g Ubuntu) something like this:
tcerldrv:
tcerl:
After that you should be able to start it from your Erlang-shell without setting any further parameters:
Hi, for anyone compiling on Solaris I had to add a few parameters to the configure script:
./configure LDFLAGS=-L/usr/local/lib/erl_interface-3.5.6/\ -lnsl\ -lsocket TOKYOCABINET_CFLAGS=-I/home/sean/tmp/tcerldrv-1.3.1g/src TOKYOCABINET_LIBS=-L/usr/local/lib/\ -ltokyocabinet CPPFLAGS=-I/usr/local/lib/erlang/usr/include/
And also the tests didn't run because of the error "find: bad option -or", I think for Solaris this should be "-o"?
But everything seems to be working fine :-)