Table of Contents
- Installing prerequisite packages
- Installing ECLIB
- Parallel support
- Closing remarks
ECLIB is a mathematical package for arithmetic on elliptic curves by John Cremona. It has various numerical package prerequisites which must be installed beforehand. These are
The links above reference their respective package download pages. The latest versions will be fine.
In addition, you must ensure that the following programs are available and up-to-date.
Since we are concentrating on OS X, we may install these via Homebrew.
Grab a cup of tea while all the above installs; it will take a while!
Afterwards, do ensure that
brew doctor is reporting minimal warning messages3
Installing prerequisite packages
Now we can move onto install the prerequisite packages for ECLIB. Let’s just be lazy and provide the commands verbatim. They should be pretty self-explanatory.
We will install packages into
/usr/local, but you may decide to choose a different installation location, e.g.
The keen-eyed among us will correctly notice that we do not install MPFR, NTL and PARI/GP (or even MPIR and FLINT via homebrew/-arcane) with Homebrew. This is because Homebrew does not always have the latest version, and we activate some custom command line options which are not exposed via the
brew options command. Of course, editing the Homebrew formulae will also work.
Installing MPFR and MPIR
DoConfig file with a text editor. Change the
LIBTOOL variable (around line 22) to use the version install by Homebrew, which adds a ‘g’ prefix, i.e.
We then proceed to build and install NTL
If you run into errors regarding libtool, open the
makefile file in a text editor and make the following changes
- In the
ntl.arule (around line 372), add
- For the definition of the
LCOMPvariable (around line 375), add
- In the
.crule (around line 394), add
make install again.
If you get a missing symbol error referencing the NTL library, add the
-lstdc++ flag to the
EXTRA_LIBS variable within
the Makefile file. Furthermore, update the
CXX variable to
g++-4.7 if you are using the GNU compilers.
Finally, we can install ECLIB.
With everything working acording to plan, ECLIB should now be installed and any of its programs can be run via the command line4.
As an optional extra, you may install the C++ Boost libraries to gain multi-threaded support in programs which contain parallel sections.
Note that we must now also specify the location of the Boost libraries during the configure stage of ECLIB
Installing ECLIB in OS X has its quirks, especially when using Apple’s clang version of the GCC compilers; installation on a Linux system is certainly more straight-forward. Hopefully, the remarks identified in this post will help you in your journey of installing ECLIB.
If there are any problems, do comment below with any error messages you come across.
You may use cURL if you prefer it as it is already installed on any Mac. ↩
As of writing, we are using version 4.7 of the GNU gcc compilers. ↩
If you have permission warnings after running
brew doctor, such as
Warning: /usr/local/include isn’t writable. This can happen if you “sudo make install” software that isn’t managed by Homebrew.
sudo chown -R $USER /usr/local/includeto take ownership, replacing the directory location for each warning.
Be sure to link the newly installed packages correctly if Homebrew hasn’t already done so, e.g.
brew link autotools. ↩
Do ensure your PATH environment variable contains