Compilation of Nmag on Ubuntu 11.04 (and possibly recent systems)

Details about the issue

Starting from Ubuntu 11.04, there have been modifications in the path layout conventions (filesystem hierarchy) to enhance support for different architectures (details are given here In particular, some system libraries have been moved into a directories like /usr/lib/x86_64-linux-gnu or /lib/x86_64-linux-gnu. These directories contain libraries which have been compiled targeting specific architectures. This change confuses some of the packages we are currently installing in the tarball. In particular, the Python tables modules, the zlib Python module do not manage to find and are not compiled properly. This leads to failures when loading and saving data in Nmag scripts.

You may try to follow the instructions below, while we work on providing a patch to solve the problem.

How to solve it

First, you should locate where your library is. Type locate, you'll get something like:


Our candidate is /usr/lib/x86_64-linux-gnu/ we should then do as follows:

cd nmag-0.1.1
echo 'export LD_PRELOAD="/usr/lib/x86_64-linux-gnu/"' >> nsim/bin/ldflags.bash

In the line above you should substitute /usr/lib/x86_64-linux-gnu/ with what is appropriate for your system (given as an output of the locate command).

Also available in: HTML TXT