Building or installing
I provide packages for a number of distros. If possible, please use these instead of building from source. Contributions on this front are welcome.
Installing from packages
Debian-based
I currently distribute packages for
- Debian/sid
- Debian/buster
- Ubuntu/focal (20.04 LTS)
- Ubuntu/bionic (18.04 LTS)
To use these, add to your /etc/apt/sources.list:
deb [trusted=yes] http://mrcal.secretsauce.net/packages/DISTRO/public/ DISTRO main
where DISTRO is one of
sidbusterfocalbionic
Then, apt update && apt install mrcal libmrcal-dev. The mrcal package pulls
in the commandline tools and, indirectly, the python libraries. The
libmrcal-dev is the C dev stuff; not needed if you're not building C code that
uses mrcal. The chessboard corner finder, while not strictly required, is needed
if you're doing chessboard-based calibrations. apt install mrgingham
Building from source
If you cannot use the packages for whatever reason, you must build from source.
This isn't difficult, but requires you to obtain all the dependencies. They're
listed in the Build-Depends section of the package definition. Most of these
are available in most distros. Things that may not be:
libdogleg-dev: the optimization library. Sources live here. You need at least version 0.15.3.vnlog: the toolkit to manipulate textual tables. Sources live here. You only need this for the test suite. There's nothing to build. Simply downloading the sources and pointing thePATHthere is sufficient.python3-numpysane: The make-numpy-reasonable library from here. You absolutely need at least version 0.27. If possible, get 0.29 or later. Available in the usual places Python libraries live. This is a python-only library. Simply downloading the sources and pointing thePYTHONPATHthere is sufficient.python3-gnuplotlib: The plotting library from here. You need at least version 0.36. Available in the usual places Python libraries live. This is a python-only library. Simply downloading the sources and pointing thePYTHONPATHthere is sufficient.mrgingham: the chessboard corner finder. This isn't strictly a requirement - any corner finder can be used. If you want to use this one (and you can't use the packages), you need to build it. Sources live here.
Once these are all downloaded, libdogleg built and the PATH and PYTHONPATH
set, we can build mrcal. The child processes need access to the PATH and
PYTHONPATH, so
export PATH export PYTHONPATH
If you "installed" libdogleg somehow, then you're ready, so just make.
Otherwise, tell the build about where the built libdogleg is:
LIBDOGLEGDIR=.... CFLAGS=-I$LIBDOGLEGDIR LDFLAGS="-L$LIBDOGLEGDIR -Wl,-rpath=$LIBDOGLEGDIR" make
If that works, the test suite should all pass:
make test
If stuff doesn't work, feel free to bug me. But you really should be using the packages, if at all possible