1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297
|
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- meta -->
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="A general astronomical image processing software">
<meta name="author" content="Filip Hroch">
<link href="news_feed.xml" type="application/atom+xml" rel="alternate" title="Sitewide ATOM Feed" />
<link rel="stylesheet" href="munipack.css">
<link rel="shortcut icon" href="favicon.ico">
<title>Munipack ‒ Building of Munipack from source code</title>
</head>
<body>
<header>
<a href="munipack.html"><img src="big_logo.png" alt="Munipack's logo" class="head"></a>
<div class="headtitles">
<p class="head">
<a class="headtitle" href="munipack.html">Munipack</a>
</p>
<p class="head">
<a class="headsubtitle" href="munipack.html">The astronomical image processing software</a>
</p>
</div>
<div class="buttons">
<a href="guide.html" class="button">
<div class="bicon">
📘
</div>
<div class="hide">
Guide
</div>
</a>
<a href="docs.html" class="button">
<div class="bicon">
📁
</div>
<div class="hide">
Documents
</div>
</a>
</div>
</header>
<section>
<h1>Building of Munipack from source code.</h1>
<p class="abstract">Building Munipack from a source code</p>
<h2>Introduction</h2>
<p>This page describes how to build Munipack from source codes. This is
most portable way, but certain computer skills are required.
A fine tune fitting is possible. A packaging system is unused.
More convenient way to get Munipack offers the <a href="install.html">install</a>
page.
</p>
<h3>The AppImage script</h3>
<p>
The script <samp>dist/appimage.sh</samp>
described by <a href="appimage.html">AppImage</a>
makes a complete local installation.
It can be considered as a guideline or be adjusted for a particular case.
</p>
<h2>Summary</h2>
<p>There is a short summary of installation steps which
will install the latest stable release (replace X.Y by an appropriate
number):</p>
<pre>
$ mkdir ~/src/
$ cd ~/src
$ wget https://integral.physics.muni.cz/ftp/munipack/munipack-0.X.Y.tar.gz
$ tar zxf munipack-0.X.Y.tar.gz
$ cd munipack-0.X.Y
$ ./configure
$ make
# [sudo] make install # as root
</pre>
<p>
More detailed description is below.
</p>
<h1>Source building</h1>
<p>The building takes phases:</p>
<ul>
<li>preparing helper tools </li>
<li>getting sources </li>
<li>initialisation </li>
<li>configure </li>
<li>compile </li>
</ul>
<p>At the moment, Munipack can be compiled under GNU/Linux, g++, gfortran
and wxWidgets ver. 3.0.0 (and above) only.
</p>
<p>Munipack is designed to be pretty much portable and multi-platform,
however, unusual combinations of compilers, operating systems, etc. should
require some additional tuning.
</p>
<h2>Download</h2>
<p>Munipack's source is distributed as a tarball which
contains the latest stable version. </p>
<p>Download: <a href="https://integral.physics.muni.cz/ftp/munipack/">https://integral.physics.muni.cz/ftp/munipack/</a> </p>
<p>To get source tree, download archive and unpack the tarball as: </p>
<pre>
# cd $HOME/src
# wget https://integral.physics.muni.cz/ftp/munipack/munipack-0.6.X.tar.gz
# gzip -dc munipack-0.6.XXX.tar.gz | tar -xf -
</pre>
<p>The preferred path for placing sources is <samp>$HOME/src</samp>
for the per-user installation
If you have root privileges, use <samp>/usr/src</samp>
and replace all references by <samp>$HOME/src</samp>
in this text.</p>
<h2>Prerequisites</h2>
<p>Following tools are required for compiling of Munipack: </p>
<ul>
<li>Any Unix-like system (GNU/Linux, *BSD, etc.)</li>
<li>Fortran 2008+ and C++ compilers </li>
<li>Autoconf and automake (optional)</li>
<li><a href="http://heasarc.gsfc.nasa.gov/docs/software/fitsio/fitsio.html">cfitsio</a> library </li>
<li><a href="https://integral.physics.muni.cz/oakleaf/">Oakleaf</a> library</li>
<li><a href="http://www.netlib.org/minpack/">minpack</a> library</li>
<li><a href="http://www.plplot.org/">PLplot</a> library including Cairo driver</li>
<li><a href="http://www.wxwidgets.org/">wxWidgets</a> library (ver. >= <strong>3.0.0</strong>) </li>
</ul>
<p><strong>All libraries must be available in the development version.</strong>
Common package systems contains development libraries as -dev (-devel)
packages.</p>
<p>The requirement for 3+ version of wxWidgets is the support of
the event handling system, which is necessary for command-line applications.
The instructions for wxWidgets installation can be found on wiki:
<a href="https://wiki.wxwidgets.org/Prerequisites">http://wiki.wxwidgets.org/Prerequisites</a>. </p>
<p>
The necessary tools can be, under GNU/Debian, Ubuntu and derivatives, installed by
</p>
<pre>
apt install libcfitsio-dev libwxgtk3.2-dev minpack-dev liboakleaf-dev \
pkg-config libplplot-dev
</pre>
<p>
PLPlot is necessary for plotting. Cairo is the default driver;
it provides high quality graphs, supports of the anti-aliasing and
the alpha transparency.
If the driver is unsuitable, user is prompted; an alternative driver
can be selected in <samp>xmunipack/plplot.cpp</samp>.
</p>
<p>
Autoconfig is required for bootstrap (the <samp>configure</samp> script generation), and left unused if the code is build unmodified.
</p>
<h2>Initialisation</h2>
<p><strong>Required only if the sources are taken directly from
the Mercurial repository.</strong>
The repository is not public available, robots losing respect to humans.</p>
<p>Initialisation requires:</p>
<ul>
<li>Working installation of Autotools (automake, autoconf). </li>
</ul>
<p>Munipack building is on base of Autotools which is most widely portable way working under common computer systems. The initialisation of building framework is required. </p>
<p>The building is controlled by configure.ac (top) and set of Makefile.am-s (all building directories). </p>
<p>This phase creates <samp>configure.ac</samp> and other auxiliary files: </p>
<pre>
$ ./bootstrap --dev
</pre>
<p>
Next step is to activate Autotools, and to make Makefiles by processing of the
control files:
</p>
<pre>
$ autoreconf -i
</pre>
<h2>Configure and install</h2>
<p>The initialised source is ready for compilation. This can be done quite easy on Linux based distributions, same as other Unix's systems. The configuration, compilation and installation is provided by the standard GNU way. Simply, run the following sequence of commands: </p>
<pre>
$ ./configure
$ make
$ make install
</pre>
<p>Munipack will check available tools and will be installed by default under tree <samp>/usr/local</samp>. </p>
<p>The phase will work under any supported system. C++ and Fortran compilers and appropriate development libraries needs to be installed, of course. </p>
<p>There is possibility to fit the installation according to your needs. Running of the command </p>
<pre>
./configure --help
</pre>
<p>will display possible switches to fine tuning of building. </p>
<p>
The recommended setup is:
</p>
<pre>
./configure FCFLAGS="-O2 -ffpe-summary=invalid,zero,overflow" \
CFLAGS="-O2 -DNDEBUG" CXXFLAGS="-O2 -DNDEBUG"
</pre>
<p>Certain setting of the environment variables affects of the compilation process. For example, more progressive optimisation of the output code for 32-bit machines (64-bit machines are optimised on the level by default) and GNU compilers (g++, gfortran) is provided by <samp>FCFLAGS</samp> and <samp>CFLAGS</samp> variables </p>
<pre>
$ ./configure CXXFLAGS="-march=i686 -O2" FCFLAGS="-march=i686 -O2"</pre>
<p>If the default installation <samp>/usr/local</samp> is not enough,
place it into another directory:
</p>
<pre>
./configure [..] --prefix=$HOME/opt
</pre>
<p>
and modify your search path like <samp>PATH=$PATH:$HOME/opt/bin</samp>.
</p>
<p>The installation under FreeBSD would work with parameters: </p>
<pre>csh:> ./configure LDFLAGS=-L/usr/local/lib CPPFLAGS=-I/usr/local/include
</pre>
<p>The installation under Fedora/RHEL will require </p>
<pre>./configure CXXFLAGS=-I/usr/include/cfitsio</pre>
<p>On finish, the configure command will print the summary: </p>
<pre>
Configured Munipack:
Virtual Observatory support enabled: yes
Command line interface enabled: yes
Graphical User Interface enabled: yes
</pre>
<p>If the configure script had found wxWidgets library,
both the first and the second options are set to <samp>yes</samp>.
The command line and the graphical interfaces requires wxWidgets;
without them, only processing engines are compiled.
They has no user interfaces and any communication is released only
via the standard input and output (which can be useful for daemons,
web interfaces, etc.).
</p>
<h2>Options for the configure</h2>
<p>
There are some alternative ways to fit uncommon requirements:
</p>
<ul>
<li>To suppress build of GUI (xmunipack command) suitable for non-iterative
analysis (scripts) without support of graphical devices, use:
<pre>./configure --disable-gui</pre></li>
<li>To suppress build of the command-line interface (muninpack command) for direct
use of modules:<pre>./configure --disable-cli</pre></li>
<li>Virtual Observatory support is disabled by:<pre>./configure --disable-vo</pre></li>
</ul>
<p>
Use of all the options (<samp>--disable-[gui|cli|vo]</samp>) together
eliminates completely dependency on both wxWidgets and PLPlot.
cFITSIO, Oakleaf and Minpack libraries are still necessary.
</p>
<p></p>
<h2>Un-Installation</h2>
<p>Use commands </p>
<pre>
# cd $HOME/src/munipack-0.6.X
# make uninstall
</pre>
<p>in the installation directory to uninstall Munipack. </p>
<p>This implying that it is not a good idea to remove the source directory
immediately after installation (the reason to use <samp>/usr/src</samp>
or an equivalent path). </p>
<!--
<h2>Known issues</h2>
-->
</section>
<footer>
© 1997 – 2025
<a href="https://integral.physics.muni.cz/" title="author's homepage"
class="foot">Filip Hroch</a>
</footer>
</body>
</html>
|