Bootstrapping is only necessary if you have decided to obtain the full version controlled history of Gnuastro, see Version controlled source and Bootstrapping. Using the version controlled source enables you to always be up to date with the most recent development work of Gnuastro (bug fixes, new functionalities, improved algorithms, etc.). If you have downloaded a tarball (see Downloading the source), then you can ignore this subsection.
To successfully run the bootstrapping process, there are some additional dependencies to those discussed in the previous subsections.
These are low level tools that are used by a large collection of Unix-like operating systems programs, therefore they are most probably already available in your system.
If they are not already installed, you should be able to easily find them in any GNU/Linux distribution package management system (apt-get
, yum
, pacman
, etc.).
The short names in parenthesis in typewriter
font after the package name can be used to search for them in your package manager.
For the GNU Portability Library, GNU Autoconf Archive and TeX Live, it is recommended to use the instructions here, not your operating system’s package manager.
To ensure portability for a wider range of operating systems (those that do not include GNU C library, namely glibc), Gnuastro depends on the GNU portability library, or Gnulib. Gnulib keeps a copy of all the functions in glibc, implemented (as much as possible) to be portable to other operating systems. The bootstrap script can automatically clone Gnulib (as a gnulib/ directory inside Gnuastro), however, as described in Bootstrapping this is not recommended.
The recommended way to bootstrap Gnuastro is to first clone Gnulib and the Autoconf archives (see below) into a local directory outside of Gnuastro. Let’s call it DEVDIR86 (which you can set to any directory; preferentially where you keep your other development projects). Currently in Gnuastro, both Gnulib and Autoconf archives have to be cloned in the same top directory87 like the case here88:
$ DEVDIR=/home/yourname/Development ## Select any location. $ mkdir $DEVDIR ## If it doesn't exist! $ cd $DEVDIR $ git clone https://git.sv.gnu.org/git/gnulib.git $ git clone https://git.sv.gnu.org/git/autoconf-archive.git
Gnulib is a source-based dependency of Gnuastro’s bootstrapping process, so simply having it is enough on your computer, there is no need to install, and thus check anything.
You now have the full version controlled source of these two repositories in separate directories.
Both these packages are regularly updated, so every once in a while, you can run $ git pull
within them to get any possible updates.
automake
) ¶GNU Automake will build the Makefile.in files in each sub-directory using the (hand-written) Makefile.am files.
The Makefile.ins are subsequently used to generate the Makefiles when the user runs ./configure
before building.
To check that you have a working GNU Automake in your system, you can try this command:
$ automake --version
autoconf
) ¶GNU Autoconf will build the configure script using the configurations we have defined (hand-written) in configure.ac.
To check that you have a working GNU Autoconf in your system, you can try this command:
$ autoconf --version
These are a large collection of tests that can be called to run at ./configure
time.
See the explanation under GNU Portability Library (Gnulib) above for instructions on obtaining it and keeping it up to date.
GNU Autoconf Archive is a source-based dependency of Gnuastro’s bootstrapping process, so simply having it is enough on your computer, there is no need to install, and thus check anything. Just do not forget that it has to be in the same directory as Gnulib (described above).
texinfo
) ¶GNU Texinfo is the tool that formats this manual into the various output formats.
To bootstrap Gnuastro you need all of Texinfo’s command-line programs.
However, some operating systems package them separately, for example, in Fedora, makeinfo
is packaged in the texinfo-tex
package.
To check that you have a working GNU Texinfo in your system, you can try this command:
$ makeinfo --version
libtool
) ¶GNU Libtool is in charge of building all the libraries in Gnuastro. The libraries contain functions that are used by more than one program and are installed for use in other programs. They are thus put in a separate directory (lib/).
To check that you have a working GNU Libtool in your system, you can try this command (and from the output, make sure it is GNU’s libtool)
$ libtool --version
help2man
) ¶GNU help2man is used to convert the output of the --help option (--help) to the traditional Man page (Man pages).
To check that you have a working GNU Help2man in your system, you can try this command:
$ help2man --version
Some of the figures in this book are built by LaTeX (using the PGF/TikZ package). The LaTeX source for those figures is version controlled for easy maintenance not the actual figures. So the ./boostrap script will run LaTeX to build the figures. The best way to install LaTeX and all the necessary packages is through TeX live which is a package manager for TeX related tools that is independent of any operating system. It is thus preferred to the TeX Live versions distributed by your operating system.
To install TeX Live, go to the web page and download the appropriate installer by following the “download” link. Note that by default the full package repository will be downloaded and installed (around 4 Gigabytes) which can take very long to download and to update later. However, most packages are not needed by everyone, it is easier, faster and better to install only the “Basic scheme” (consisting of only the most basic TeX and LaTeX packages, which is less than 200 Mega bytes)89.
After the installation, be sure to set the environment variables as suggested in the end of the outputs. Any time you confront (need) a package you do not have, simply install it with a command like below (similar to how you install software from your operating system’s package manager)90. To install all the necessary TeX packages for a successful Gnuastro bootstrap, run this command:
$ sudo su # tlmgr install epsf jknapltx caption biblatex biber iftex \ etoolbox logreq xstring xkeyval pgf ms \ xcolor pgfplots times rsfs ps2eps epspdf
To check that you have a working LaTeX executable in your system, you can try this command (this just checks if LaTeX exists, as described above, if you have a missing package, you can easily identify it from the output and install it with tlmgr
):
$ latex --version
imagemagick
) ¶ImageMagick is a wonderful and robust program for image manipulation on the command-line. bootstrap uses it to convert the book images into the formats necessary for the various book formats.
Since ImageMagick version 7, it is necessary to edit the policy file (/etc/ImageMagick-7/policy.xml) to have the following line (it maybe present, but commented, in this case un-comment it):
<policy domain="coder" rights="read|write" pattern="{PS,PDF,XPS}"/>
If the following line is present, it is also necessary to comment/remove it.
<policy domain="delegate" rights="none" pattern="gs" />
To learn more about the ImageMagick security policy please see: https://imagemagick.org/script/security-policy.php.
To check that you have a working ImageMagick in your system, you can try this command:
$ convert --version
If you are not a developer in Gnulib or Autoconf archives, DEVDIR can be a directory that you do not backup. In this way the large number of files in these projects will not slow down your backup process or take bandwidth (if you backup to a remote server).
If you already have the Autoconf archives in a separate directory, or cannot clone it in the same directory as Gnulib, or you have it with another directory name (not autoconf-archive/), you can follow this short step.
Set AUTOCONFARCHIVES to your desired address.
Then define a symbolic link in DEVDIR with the following command so Gnuastro’s bootstrap script can find it:$ ln -s $AUTOCONFARCHIVES $DEVDIR/autoconf-archive
.
If your internet connection is active, but Git complains about the network, it might be due to your network setup not recognizing the git protocol.
In that case use the following URL for the HTTP protocol instead (for Autoconf archives, replace the name): http://git.sv.gnu.org/r/gnulib.git
You can also download the DVD iso file at a later time to keep as a backup for when you do not have internet connection if you need a package.
After running TeX, or LaTeX, you might get a warning complaining about a missingfile.
Run ‘tlmgr info missingfile
’ to see the package(s) containing that file which you can install.
GNU Astronomy Utilities 0.23 manual, July 2024.