aboutsummaryrefslogtreecommitdiff
path: root/configure
AgeCommit message (Collapse)AuthorLines
2019-04-07Configure script using our build programs in final stepsMohammad Akhlaghi-35/+44
In order to get a consistent final result, in its later steps, the configure script uses our own build of the basic command-line tools (like `cat', `awk'). Also, a correction was made to the short option parsing errors when an unwanted argument is given, and the `-?*' was changed to `-'?'*' to avoid un-necessary shell interpretation (for example giving unreasonable results).
2019-04-07GNU M4 now built as a dependency of GNU LibtoolMohammad Akhlaghi-1/+1
On some systems, M4 isn't available, so the linking to the host system fails, as a result, we can't build GNU Libtool. The main reason we weren't building M4 was a bug with the most recent GNU C library (http://lists.gnu.org/archive/html/bug-gnulib/2019-04/msg00004.html). But I found a patch used by Arch Linux which fixes the issue and allows M4 to be built. As a result, the pipeline is now building M4 also and the patched M4 tarball is now uploaded to my own webpage as backup. While doing the steps above, I also noticed that we weren't using a tab at the start of the link definitions of `dependencies-basic.mk'. Although its not necessary, to be consistent, its good for the lines to always start with a tab.
2019-04-07Corrections in configure script and astroquery, astropy rulesMohammad Akhlaghi-13/+15
The step where we check the possibility of using `sys/cdefs.h' was still using `$$' for shell variables (in Make), not `$' (for the shell). This was corrected. Also, since Astropy needs two citations, the `,' in the citation command would conflict with Make's parsing. So we just used an `echo' command to re-write the version info. In Astroquery, the prerequisite list was just reordered by length to be more clear to the eye.
2019-04-07--host-cc configure option to avoid building GCC, M4 mandatoryMohammad Akhlaghi-0/+57
In some cases (specially when debugging the pipeline), its very time-consuming to install GCC. With this commit, a `--host-cc' option has been added to avoid building the C compiler when necessary. The test to see if `sys/cdefs.h' is available on the system (necessary to build GCC) has also been moved to the configure script to print a more visible warning and also use the new `host_cc' variable to let `dependencies-basic.mk' know that GCC shouldn't be built. Finally, we are having problems installing M4 from source, so it has been set as a mandatory dependency.
2019-04-05Software acknowledgement section is automatically generatedMohammad Akhlaghi-116/+64
Until now, management of the software names and versions in the paper was done manually (a macro had to be defined in `initialize.mk', then used in `paper.tex', so they had to be manually set in two places). Managing this was not easy. To fix this, with this commit, each software building rule's target is a text file that contains its human-readable name and its version. In the end, the configure script sorts them by their name and writes them into a LaTeX input file that we can easily import as a file into the main paper.
2019-04-04Dependency version LaTeX macros written at the end of configureMohammad Akhlaghi-1/+116
Until now, these versions were written in each run. This was mainly inherited from the old days of the pipeline, where we didn't know the software on the host. But now that we have almost everything under control, we can just write these LaTeX macros at the end of the configure script and make `initialize.mk' simpler and also (very slightly!) speed-up/simplify the processing.
2019-04-04Better option checks and values in the configure scriptMohammad Akhlaghi-27/+29
Double quotes were placed around the checked values so they can have space within them. Also, some checks were added for options that don't accept a value.
2019-04-04Configure script also accepts short options with no delimiterMohammad Akhlaghi-13/+28
Until now, the short options to the configure script needed a delimiter (either white-space or an `=') between the name and value. With this commit, for short options, it also accepts the value immediately touching the option name. Also, when trying to fine the absolute address of a given path, a check was added to abort if it doesn't exist.
2019-04-04--existing-conf doesn't take any values in configure scriptMohammad Akhlaghi-7/+7
Until now we were (wrongly) assuming that the configure script's `--existsing-conf' option takes a value, while this is not the case.
2019-04-04Numpy and Scipy build on Mac imported into the main branchMohammad Akhlaghi-17/+0
We were developing the build of Numpy and Scipy on Mac in a parallel thread and things seems to be working relatively nice now. There were only two problems: 1) GCC still has some random building issues on Mac. 2) ATLAS shared libraries can't be built on Mac (so we used OpenBLAS to build Numpy and Scipy on both Mac and GNU/Linux). But for now, none of these problems are critical. So, we can progress in one branch. There were only very minor conflicts in the merge.
2019-04-04Better option-reading in configure, using .build to access BDIRMohammad Akhlaghi-202/+86
Until now, the steps to manage the command-line options of the configure script were limited (couldn't accept an equal sign or space between the option name and value). With this commit, it can now also accept optional equal signs between the option name and value. Thus not causing many confusions. Also, it is more logically consistent for the link to the build-directory to be placed in the top directory (as a hidden file like `.local' until now), and not as a visible directory like `reproduce/build' (which we used until now). Therefore, with this commit, the link to easily access the build-directory is `.build' in the top source directory. Finally, because `minmapsize' is too specific to Gnuastro and has now been given its default value at the start of the configure script, the description for `minmapsize' has been removed (to not confuse users who don't use Gnuastro). If anyone is familiar enough with Gnuastro to change it, they already know it from its book.
2019-04-02Python packages are installed as high level program dependenciesRaul Infante-Sainz-17/+0
Until this commit, the installation of all Python packages were done in a separate Makefile. With this commit, the pipeline install Python packages as part of the hight level software. All Python packages rules them remain in a separate Makefile, but this Makefile is included in the high level dependency `reproduce/src/make/dependencies.mk'.
2019-03-28Configure script now has optionsMohammad Akhlaghi-40/+254
With the options, it is now possible to run the configure script more easily after the initial run. The `--help' option provides a nice and complete introduction along with a listing of the input options and the `-j' option can be use to manually set the number of threads.
2019-03-28flock is now built in configure, to allow serial downloadsMohammad Akhlaghi-2/+61
Until now, we were using `flock' (file-lock) for downloading the input datasets in series. But we couldn't do this when downloading the software tarballs because `flock' wasn't yet available. Generally, unlike processing, downloading is much better done in series than in parallel. To enable serial downloads of the software also, with this commit we are installing `flock' in the configure script (not in a Makefile). As a result, besides `flock', we can also benefit from the other good features of the `reproduce/src/bash/download-multi-try' script *(for example attempting download again after some time). Some GNU mirrors may have problems at the time of download, so with this commit, we are using the main GNU FTP server for GNU programs.
2019-02-20Installed astroquery in the pipelineRaul Infante-Sainz-0/+18
All dependencies for building astroquery package have been done. Until nowthe Python dependencies were built in the same Makefile as the high level libraries and programs. But, because astroquery has many dependencies we split the Python and Python packages installation in a new Makefile. The installation of differents packages are done using Python and not pip, because we found some problems when doing it with pip. Apparently there are some interferences between the packages installed by the pip of the system and the pip installed as part of Python in the pipeline.
2019-02-01Group name is now part of the local configurationMohammad Akhlaghi-31/+25
Until now, the group name to build the project actually went into the Git source of the project! This doesn't allow exact reproducibility on different machines (where the group name may be different). With this commit, the `for-group' script has been modified to accept the group name as its first argument and pass that onto `configure' and Make. This is much better now, because not only the existance of a group installation is checked, but also the name of the group. It also made things simpler (in particular in `LOCAL.mk.in').
2019-02-01Configure script ending message now accounts for group buildingMohammad Akhlaghi-1/+6
Until now, the `./configure' script would only print the `.local/bin/make -j8' command. But when configured for groups, a different command should be used. It now does a check just before running and suggests the proper command.
2019-02-01Configure script now runs under /bin/bashMohammad Akhlaghi-1/+1
Until now it was `/bin/sh', but on Debian systems, this can cause problems because by default they use a much weaker shell (dash) which doesn't recognize functions.
2019-01-18Sanity check to run the Make with proper group permissionsMohammad Akhlaghi-0/+40
If the `./for-group' script is not used properly, it can lead to the whole pipeline being re-run. Therefore it is important to do a sanity check immediately at the start of Make's processing and inform the user if there is a problem. With this commit, `./for-group' exports the `reproducible_paper_for_group' variable which is used by both the initial `./configure' script, and later in each call to Make. The `./configure' script will use it to write a value in `reproduce/config/pipeline/LOCAL.mk' and Make will use it to compare with the value in `reproduce/config/pipeline/LOCAL.mk'. If there is an inconsistency, Make will not even attempt to build anything and will just print a message and abort.
2019-01-02Copyright year updated to 2019Mohammad Akhlaghi-1/+1
Since the current implementation of this pipeline officially started in 2018, all the files only had 2018 in their copyright years. This has now been corrected to 2018-2019.
2018-12-13Added extra note to the input datasets directoryMohammad Akhlaghi-1/+4
To make things clear for a user of the pipeline its mentioned that the given input directory is only read and nothing is written to it.
2018-12-13Fixed numthreads in dependencies alsoMohammad Akhlaghi-0/+1
Some problems with using the number of threads in dependency building were fixed.
2018-12-11Passing -j build options to dependency building bottle-necksMohammad Akhlaghi-0/+1
Some host Make systems may not allow automatic passing of the number of threads to sub-Makes. So while building the basic dependencies, we'll need to explicity add the `-j' option to the Make files that can benefit most from it: those that are dependencies of many others (Tar & Make), or are the last to build (Coreutils).
2018-12-05Corrected comment on downloader in configure scriptMohammad Akhlaghi-12/+5
The comment above the downloader section of the configure script was not up to date with how the pipeline uses a downloader during configuration and building now. So it was updated.
2018-12-05Configuring on multiple threadsMohammad Akhlaghi-2/+2
Until now we had constrained the configuration step to one thread to easily see failures on other systems. But with most tests passing successfully now, we are using the total number of available threads.
2018-12-04Shared library absolute address fixed in Libgit2 and WCSLIB on Mac OSMohammad Akhlaghi-2/+3
The build systems of Libgit2 and WCSLIB on Mac OS does not account for installation in non-standard addresses: `Libgit2' keeps the absolute address of its build directory (not the installation directory) and WCSLIB doesn't write any absolute address at all (so the system uses the first one it finds). To address these issues, we are now using Mac OS's `install_name_tool' program to fix the absolute path within the installed shared library. Since the version of the library is actually present in its shared library name, in `dependency-versions.mk' we have also separated these two libraries so later when their version is changed, we are careful in correcting the shared library name also.
2018-12-03Checking Mac OS host for configuring OpenSSLMohammad Akhlaghi-1/+18
OpenSSL can't automatically detect the architecture of Mac OS systems, so as it suggests on its Wiki, it needs some help for doing that. With this commit, we are checking the build on Mac OS with the presence of `otool' (Mac OS's linker). If it's there, we'll add the OpenSSL configuration options suggested by OpenSSL's Wiki.
2018-12-03Added rpath in basic dependencies, remove input if download failsMohammad Akhlaghi-0/+1
Until now, we weren't including the `rpath' linking options to the basic dependencies. They are now added. Also, when the download of an input file fails for any reason, an empty file won't be replaced there any more.
2018-12-03Trusted CA certificates also downloaded for Wget usageMohammad Akhlaghi-2/+2
To enable easy downloading of HTTPS links with Wget (this pipeline's defaut downloader), we need a set of trusted CA certificates. Until the time that we can generate one ourselves, one generic set of trusted CA certificates is now downloaded like a tarball and placed in the OpenSSL configuration directory. With these CA certificates, within the pipeline we can now safely use the pipeline's own installed Wget.
2018-12-03Preference for shared library linkingMohammad Akhlaghi-41/+51
Some high-level programs like Wget and cURL need to be built in shared mode because they also include dynamic loading of libraries. Therefore, if we only build the lower-level libraries in static mode, our own build will be ignored and they will go and find the system's shared libraries to link with. Because of this, for now, we have manually set the `static_build' variable in the configure script to `no'. Also, if the downloader fails, we'll delete the output (an empty file in the case of Wget) because it interefers with a target definition.
2018-12-02Configure building on one thread for debuggingMohammad Akhlaghi-2/+2
To help in debugging, we are only running the Makefiles within the configure script on one thread.
2018-12-02Wget and OpenSSL now installed as a basic dependencyMohammad Akhlaghi-3/+33
The TeX Live installer needs Wget to operate smoothly, especially on recent Mac OS systems that don't have Wget pre-installed. Also, it would be good for the pipeline to have its own downloader. So with this commit, the pipeline also installs Wget and OpenSSL which is a dependency. Many other small changes/fixes were done in this process.
2018-12-01Improved TeXLive installation checksMohammad Akhlaghi-7/+6
Thanks to the check by Cristina Martínez, some corrections were made when we attempt to download and install TeXLive. Further checks and corrections will be in due time.
2018-11-30cURL now also available as downloader with -L flagMohammad Akhlaghi-4/+13
The main reason I wasn't using cURL as a downloading tool was that I wasn't familar with how to ask it to follow a re-direct. But I just found out that its with the `-L' configure time option. So it is now added as a downloader tool to the pipeline.
2018-11-30Setting libgit2 to build statically in any caseMohammad Akhlaghi-2/+2
On the Libgit2 webpage, it has recommended to build it statically on Mac systems. By default we are doing this on Linux systems, but the `-static' flag failed on Mac. But apparently CMake might be able to deal with the issue in a different way.
2018-11-29Optional rpath link option, CMake search path set, static WCSLIBMohammad Akhlaghi-1/+25
Thanks to a test build on Raul Infante Sainz's Mac OS computer, we were able to address some issues and will be trying them after this commit: a) The LLVM linker on that computer didn't recognize `-rpath-link'! So at configure time we now check for it and only include it when the linker recognizes it. b) CMake corrections: 1) `CMAKE_LIBRARY_PATH' is now defined so CMake can look in our custom directory to find the necessary libraries. 2) To build and install the CMake built programs, we now simply use `make' and `make install'. c) To avoid particular linking problems with WCSLIB (which has special problems compared to other libraries), we are now deleting the shared library version (both on GNU and Mac systems).
2018-11-29Ignoring building of GCC for pipelineMohammad Akhlaghi-1/+10
GNU Binutils (which provides the GNU Linker) is not ported to Mac OS systems. GCC also takes a very long time to build, and if we are to still have linking problems with LLVM's linker, it would be better to just ignore GCC also and use the system's C compiler and linker together. So for the time being, GCC isn't a main target of the basic dependencies and won't be installed. But we have kept the rules that were checked on a GNU/Linux operating system.
2018-11-29GCC is now installed by the pipelineMohammad Akhlaghi-2/+2
The pipeline now installs GCC and all its necessary prerequisites.
2018-11-26Making lock file directoryMohammad Akhlaghi-2/+2
We had forgot to add the rule to build the lock file directory for downloading data. This has been corrected.
2018-11-25Rule of tex/pipeline.tex now defined in paper.mk not top MakefileMohammad Akhlaghi-1/+1
To avoid redundant steps in the the top-level Makefile and make it simpler and easier to follow, we now define the base names of all the Makefiles in the `makesrc' variable of the top-level Makefile. `makesrc' is then used to define the Makefiles to include and the necessary TeX macros at the same time. This is much more clear and obvious than the previous case were we had to list the Makefiles and TeX macro files separately in the top level Makefile.
2018-11-25Removed mention of extra input dataset in configure scriptMohammad Akhlaghi-5/+0
While preparing the input dataset downloading scripts, we wanted to have two input datasets, but it was too much, so it was ultimately removed. But I had forgot to remove the information about this file in the `./configure' script. So it is removed now.
2018-11-25Pipeline now downloads and uses an input datasetMohammad Akhlaghi-10/+98
In most analysis situations (except for simulations), an input dataset is necessary, but that part of the pipeline was just left out and a general `SURVEY' variable was set and never used. So with this commit, we actually use a sample FITS file from the FITS standard webpage, show it (as well as its histogram) and do some basic calculations on it. This preparation of the input datasets is done in a generic way to enable easy addition of more datasets if necessary.
2018-11-22Using .local instead of ./.local in READMEsMohammad Akhlaghi-1/+1
Until now, in the instructions, we were suggesting to run `./.local/bin/make', but the `./' part is extra: this is already a directory and so the shell will be able to find it. So to make things more clear and easy to read/write, we removed the `./' part from the calls to our custom Make installation.
2018-11-22Wget not using server timestampsMohammad Akhlaghi-3/+2
By default, Wget uses the same time stamp for the downloaded file as the server. As a result, if a dependency was previously built before the tarball was uploaded to the server, the pipeline wouldn't recognize that its new and wouldn't re-build it. With this commit, we are adding the `--no-use-server-timestamps' to the call to Wget to fix this problem. I also noticed that (probably as a bug left over from the time we were testing the configure script), we were manually setting the `userread' variable to `n' independent of what the user provided. This has also been fixed.
2018-11-21Changing of README files in checklistMohammad Akhlaghi-0/+2
When you point to this project, the `README.md' file is the default file that opens on GitLab and other online git repositories. Since a reproduction pipeline project is different from the actual pipeline, its best for the default text that opens to describe the paper, not the pipeline. The old `README.md' is also kept, but its now called `REAME-pipeline.md'.
2018-11-20Configure script passes if TeX Live was not finalizedMohammad Akhlaghi-21/+65
When there is a problem in creating the final TeX Live installation, the previous version of the pipeline would not understand and just finish! We would later have problems in building the paper. So the following series of steps were taken: to keep the recipes in a shorter and easier to understand way, the steps to install TeX Live are now one rule (that produce `.local/bin/texlive-ready-tlmgr' when its successful), and the steps to install the necessary packages are in another rule (that produce `.local/bin/texlive-ready' when its successful). When control comes back inside configure, if `.local/bin/texlive-ready' isn't there (something failed during the TeX Live installation, or building packages), then the whole TeX Live installation directory (`.local/texlive') will be deleted along with the two output files. This will help ensure that future steps can check the availablility of a working TeX Live in the pipeline.
2018-11-20Corrected call to nproc in configure scriptMohammad Akhlaghi-1/+1
After installing the basic dependencies, we have access to the internally built `nproc' program (by Coreutils) to find the number of threads we can use for building the high-level batch of dependencies. Unfortunately, I had added an extra `./' before `$instdir' when calling `nproc' so the script failed. This problem is fixed now.
2018-11-20Not including system's libraries in high-level dependenciesMohammad Akhlaghi-1/+2
The system's libraries are no longer used in building the higher-level dependencies. Also, thanks to Raul Infante Sainz, we found out that Bash's build script was still removing the extra directory information (not good!).
2018-11-19Removed GNU Binutils, CMake's built with its own bootstrapMohammad Akhlaghi-5/+9
When the C compiler is not GNU GCC, linking with GNU Binutils is going to cause problems. So until the time that we can include GCC into this pipeline, its best to avoid Binutils also. Also, for building CMake, we were relying on an installed CMake, but now, we are using its own `./bootstrap' script, so it can be built even if the host system doesn't have CMake. Also, for TeX Live, we are now setting a custom file as main target to avoid complications with symbolic links as targets in Make. Finally, when the user says they don't want to re-write an existing configuration file, no extra notices will be printed and the configure script will immediately start building programs.
2018-11-18Building dependencies on single thread for debuggingMohammad Akhlaghi-2/+2
To help in debugging on other systems, the building of dependencies is only done on a single thread.