| 1 |
The information below is intended to help those who are packaging |
| 2 |
gretl for Linux distributions. It describes certain options to the |
| 3 |
configure script which may affect the usability and/or functionality |
| 4 |
of a gretl build on various platforms, under the three headings |
| 5 |
"CPU and openmp functionality", "MPI support" and "XDG tools". |
| 6 |
|
| 7 |
1. CPU and openmp functionality |
| 8 |
|
| 9 |
Gretl's configure script aims to produce a binary whose functionality |
| 10 |
is as advanced as possible based on the characteristics of the build |
| 11 |
host. Please note that this may not be what you want if you intend to |
| 12 |
build gretl for a "lowest common denominator" target machine. |
| 13 |
|
| 14 |
The specific configure options that are most relevant here are |
| 15 |
|
| 16 |
--enable-sse2 |
| 17 |
--enable-avx |
| 18 |
--enable-openmp |
| 19 |
|
| 20 |
These are all marked as "auto", meaning that they will be probed |
| 21 |
at configure time. If your build host has one or more of these |
| 22 |
attributes but you do NOT want them built into the package you |
| 23 |
are creating, you should give one or more of the following options |
| 24 |
to configure |
| 25 |
|
| 26 |
--disable-sse2 |
| 27 |
--disable-avx |
| 28 |
--disable-openmp |
| 29 |
|
| 30 |
(It should probably go without saying that a build with SSE2 or AVX |
| 31 |
enabled will fail at start-up with "Illegal instruction" if a user |
| 32 |
attempts to run it on a machine whose CPU does not support the |
| 33 |
instruction set in question.) |
| 34 |
|
| 35 |
2. MPI support |
| 36 |
|
| 37 |
The first point above was in effect a warning: you may wish to avoid |
| 38 |
enabling inadvertently a feature which could cause your gretl build |
| 39 |
to be inoperative on some users' machines. This second point is in a |
| 40 |
sense "the other way round": you may wish to enable a feature that |
| 41 |
could benefit some users but will not hurt others. |
| 42 |
|
| 43 |
MPI support in gretl can be described as an "optional dependency". |
| 44 |
In the configure process we scan for the MPI-specific compiler, |
| 45 |
mpicc, which is supplied by MPI implementations such as Open MPI and |
| 46 |
MPICH. If this is found, the additional program gretlmpi gets built. |
| 47 |
If there's no MPI implementation on the end-user's machine then |
| 48 |
the gretlmpi binary won't work (unless and until the user installs |
| 49 |
such an implementation), but the rest of gretl's functionality is |
| 50 |
unaffected. You can find details on this at |
| 51 |
|
| 52 |
https://sourceforge.net/projects/gretl/files/manual/gretl-mpi.pdf |
| 53 |
|
| 54 |
but we would recommend that packagers enable MPI support in gretl |
| 55 |
by including an MPI implementation on the build host. That way, |
| 56 |
users of your package can either get MPI support "out of the box" |
| 57 |
(if they already have MPI installed) or can install an MPI package |
| 58 |
later and thereby get MPI support on demand. |
| 59 |
|
| 60 |
3. XDG tools |
| 61 |
|
| 62 |
By default, gretl checks for the presence of the XDG tools |
| 63 |
(xdg-desktop-menu, xdg-mime, xdg-icon-resource) and if they are |
| 64 |
found, uses them to install gretl's XDG-related files. This supports |
| 65 |
"make install" as executed by a regular user who may not have |
| 66 |
permission to install under /usr, and also the case where a user |
| 67 |
chooses to install gretl under (say) /opt: in that case files that |
| 68 |
would not be found under /opt will be installed into the correct |
| 69 |
location. |
| 70 |
|
| 71 |
However, a packager who wants to ensure that _everything_ goes |
| 72 |
into the location specified by DESTDIR will have to override |
| 73 |
gretl's attempt at "cleverness". This can be done by adding |
| 74 |
|
| 75 |
--disable-xdg-utils |
| 76 |
|
| 77 |
when invoking gretl's configure script. |
| 78 |
|
| 79 |
Allin Cottrell |
| 80 |
Department of Economics |
| 81 |
Wake Forest University |
| 82 |
2017-06-07 |