aboutsummaryrefslogtreecommitdiff
path: root/reproduce/software/make/basic.mk
AgeCommit message (Collapse)AuthorLines
2019-07-28Single wrapper instead of old ./configure, Makefile and ./for-groupMohammad Akhlaghi-3/+7
Until now, to work on a project, it was necessary to `./configure' it and build the software. Then we had to run `.local/bin/make' to run the project and do the analysis every time. If the project was a shared project between many users on a large server, it was necessary to call the `./for-group' script. This way of managing the project had a major problem: since the user directly called the lower-level `./configure' or `.local/bin/make' it was not possible to provide high-level control (for example limiting the environment variables). This was especially noticed recently with a bug that was related to environment variables (bug #56682). With this commit, this problem is solved using a single script called `project' in the top directory. To configure and build the project, users can now run these commands: $ ./project configure $ ./project make To work on the project with other users in a group these commands can be used: $ ./project configure --group=GROUPNAME $ ./project make --group=GROUPNAME The old options to both configure and make the project are still valid. Run `./project --help' to see a list. For example: $ ./project configure -e --host-cc $ ./project make -j8 The old `configure' script has been moved to `reproduce/software/bash/configure.sh' and is called by the new `./project' script. The `./project' script now just manages the options, then passes control to the `configure.sh' script. For the "make" step, it also reads the options, then calls Make. So in the lower-level nothing has changed. Only the `./project' script is now the single/direct user interface of the project. On a parallel note: as part of bug #56682, we also found out that on some macOS systems, the `DYLD_LIBRARY_PATH' environment variable has to be set to blank. This is no problem because RPATH is automatically set in macOS and the executables and libraries contain the absolute address of the libraries they should link with. But having `DYLD_LIBRARY_PATH' can conflict with some low-level system libraries and cause very hard to debug linking errors (like that reported in the bug report). This fixes bug #56682.
2019-07-27DYLD_LIBRARY_PATH also fixed for macOS systemsMohammad Akhlaghi-6/+7
Until now we were only setting the `LD_LIBRARY_PATH' environment variable for GNU/Linux systems. But macOS systems use the `DYLD_LIBRARY_PATH'. With this commit, for better control over the environment, we are also fixing `DYLD_LIBRARY_PATH' in all the places that we are setting the general environment variables.
2019-07-26PatchELF built statically and updatedMohammad Akhlaghi-1/+7
Until now, like all other software, PatchELF would install with dynamic linking. However, PatchELF links with `libstdc++' so on one system, I noticed that PatchELF gives a segmentation fault and corrupts `libstdc++' while correcting its RPATH (after installing GCC). The solution is to build PatchELF statically. With this commit, we force PatchELF to be built statically (it only installs on GNU/Linux systems anyway, so there is no problem with static linking on macOS). This solved the problem on that system. While looking at its documentation, I also noticed that a new version of PatchELF has been released after almost three years, so it has been updated in the template also. This fixes bug #56673.
2019-07-08Rpath in libstdc++ and passing host_cc to high-levelMohammad Akhlaghi-1/+1
Until this commit, the addion of `-liconv' to `CXXFLAGS' in `high-level.mk' dependend on `host_cc', but I had forgot that `host_cc' isn't defined for `high-level.mk'. It is now defined for this Makefile also in the configure script. Also, the Standard C++ library depends on `libgcc_s.so.1', so after building GCC, it was necessary to add Rpath to it.
2019-07-07Texinfo installed as a dependency of M4Mohammad Akhlaghi-7/+18
While testing on a system with no Texinfo, we noticed that M4 depends on Texinfo. To fix this problem, with this commit, it is now included in the pipeline. While doing a clean build, a few minor issues were also found and corrected in the other rules.
2019-07-04Configuring wget without libiconvMohammad Akhlaghi-0/+4
On some Fedora systems, Wget's build conflicts with libiconv. With this commit, we use Wget's `--without-libiconv-prefix' configure option so it will be built without an outside libiconv.
2019-06-30Removing libiconv before building pkg-configMohammad Akhlaghi-0/+8
An existing `libiconv' can cause a conflict with `pkg-config', this is why `libiconv' depends on `pkg-config'. On a clean build, `pkg-config' is built first. But when we don't have a clean build (and `libiconv' exists) there will be a problem. With this commit, before re-building `pkg-config', we'll remove any possibly existing installation of `libiconv'.
2019-06-29Imported recent correction from Pierre Gajda, no conflictsMohammad Akhlaghi-1/+1
There was only a conflict with `.file-metadata'.
2019-06-29Added citation for TIDES, sorted progs alphabeticallyMohammad Akhlaghi-1/+3
While reviewing Prasenjit's commits, I noticed that we had forgot to add the citation for TIDES, also to make things clear, the program/library build rules are now sorted alphabetically. Finally, I noticed that after building the TiKZ PDF figures, it is crashing (like on Prasenjit's computer). After looking around, I noticed its because we were setting the of the `TEXINPUTS' environment variable to be the installed TeX Live directory (which was ultimately redundant because by default TeX will look into where it was installed). The important thing is just that we remove any possible value the host system has, not to set new directories.
2019-06-28Fixed a conflict with libiconv and pkg-configPierre Gajda-1/+1
Libiconv has to be installed before pkg-config otherwise there would be a compilation error: gconvert.c:61:2: error: #error GNU libiconv not in use but included iconv.h is from libiconv 61 | #error GNU libiconv not in use but included iconv.h is from libiconv
2019-06-28Corrections to basic buildPrasenjit Saha-1/+2
Several corrections were necessary in the basic build: 1) the version of GCC on some systems includes an `_' which would cause a crash when building the PDF. 2) libcharset had to be manually added to the Git build.
2019-06-28Libiconv built as a dependency of GitMohammad Akhlaghi-15/+22
Prasenjit Saha reported that while building on a macOS, Git complained about not finding `libiconv' functions. Therefore with this commit, `libiconv' is also built as a dependency of Git. Also, since the build of Binutils (and the subsequent GCC) doesn't depend on the exact versions of the other basic software, they are set as existance-only prerequsites (ignoring their timestamps). This is done to avoid re-building when it is not needed.
2019-06-14Binutils is built alone, before GCCMohammad Akhlaghi-40/+55
Until now, on GNU/Linux systems, GNU Binutils was built in parallel with other programs. As a result, the moment that the Binutils executables (most importantly `ld') are being installed, if another program is using them, we can have a crash. For some reason, this crash doesn't happen on Fedora or Arch Linux, but on some Debian-based distors, it causes the following crash when we are building Git (which happened to be built while Binuntils is being installed): credential-cache--daemon.o: file not recognized: File format not recognized In a following run of `./configure' (when Binutils has been installed), Git will build and install successfully. To fix this problem, with this commit, all basic programs are now a prerequisite of Binutils and Binutils is the sole prerequisite of GCC (which is the final target of `basic.mk'). Also, the GCC configure options were re-ordered to be easier to read (the `--with-*' options under each other, the `--enable-*' options under each other and so on).
2019-06-13Metastore now has rpathMohammad Akhlaghi-10/+16
Until now we hadn't noticed that Metastore's build doesn't include an `rpath'. As a result I got a crash during a Git commit. With this commit, on GNU/Linux systems, we now add rpath to the installed Metastore executable. During the build, I also cleaned up the Metastore build recipe to be more clear and readable (in particular we only check the user name and group name when metastore is actually built).
2019-06-12Imported recent work on Imfit, minor conflicts fixedMohammad Akhlaghi-2/+6
The recent work by Raul to import Imfit is now merged into the master branch. Only a few minor conflicts came up due to the update with CFITSIO (that Raul also done in parallel on this branch).
2019-06-12Imfit and libcurl: manually adding rpath on GNU/Linux systemsRaul Infante-Sainz-1/+5
While trying to debug the installation of Imfit, we found out that libcurl doesn't have rpath and is thus linking with the host system's libraries. So rpath is now manually added to the build of libcurl. We also found out that Imfit executables don't have rpath, so it was added to them too.
2019-05-09Typo, space instead of TAB, corrected in recipe of MetastoreMohammad Akhlaghi-27/+27
In the previous commits where Metastore's recipe was updated, all the `TAB's in the recipe were saved as spaces just before the commit (due to a copying and pasting from the terminal, not the text editor). With this commit, I am correcting this.
2019-05-09Metastore Git hooks properly written after its installationMohammad Akhlaghi-35/+34
Until now, in the recipe to build Metastore, we would store the current directory in a `current_dir' Bash variable before running `gbuild' to build Metastore. However, in this Makefile, we aren't using `.ONESHELL'. As a result, each un-quoted new-line character creates a new shell and the `current_dir' variable that we used afterwards was empty! This happened because until recently, Metastore was being built in `high-level.mk' (where `.ONESHELL' is activated, because we are using GNU Make to call that Makefile). But in `basic.mk', we are using the host's Make, which may not be GNU Make, so we can't use any GNU-only features. Also, this error was hard to notice, because we weren't using `&&' before writing the final target of Metastore! With this commit, both this issues are addressed: all the lines in the recipe are now quoted in the end with a backslash, and the steps before making the target are separated by `&&', not `;' (which doesn't cause a crash if the command fails). This fixes bug #56295.
2019-05-09Removed extra Binutils from GCC's prerequisitesMohammad Akhlaghi-1/+0
Until this commit, Binutils was brough up as a GCC prerequisite two times: Once as a special (`host_cc') dependency (for when we want to build GCC), another time as a dependency in every build. The first one is now obsolete: on MacOS systems where we don't build Binutils, we define its symbolic links in the same recipe. With this commit, we remove the first one, so Binutils is always a dependency of GCC.
2019-05-05Upgraded to GCC 9.1Mohammad Akhlaghi-26/+27
GCC 9.1 was just released and includes many new optimization features that can benefit projects in this template also. Also, the build directory of GCC has been moved inside the unpacked directory (similar to all the other programs). As a result, while GCC is being built, the `.build/software/build-tmp' directory will only have one directory for GCC. Until now, there was one `gcc-build' directory and one unpacked tarball.
2019-04-30New rule to build Coreutils, it is now built alongMohammad Akhlaghi-84/+107
Recently, after the installation of Coreutils, we added a step to manually run PatchELF over all the contents of the `$(ibdir)'. However, after a fresh test, this method failed: because while PatchELF was updating `mv', another program that was using `mv' couldn't do so and crashed. To fix this problem, Coreutils is now installed in a dummy directory also and the exact files that need `rpath' are identified and PatchELF is run on them (to be clean). Also, higher-level `basic.mk' software (higher-level than Bash), were re-organized so they depend on Coreutils. With this, we are no sure that when Coreutils is being built, it is the only program that is being built and PatchELF won't interfere with any other program. Also, OpenSSL and CMake were set to be bulit in parallel to speed up their build.
2019-04-30Imported some recent/parallel work, conflicts fixedMohammad Akhlaghi-4/+6
Especially because of the new convention regarding backslashes, there were many conflicts that are now fixed. But none were substantial.
2019-04-30End-of-line Backslashs no longer right under each otherMohammad Akhlaghi-378/+380
When we need to quote the new-line character we end the line with a backslash (`\'). Until now, our convention has been to put all such backslashes under each other to help in visual inspection. But this causes a lot of confusion in version control: if only one line's length is larger, the whole block will be marked as changed and thus makes it hard to visually see the actual change. It also makes debuging the code (adding some temporary lines) hard. With this commit, I went through all the files and tried to fix all such cases so only a single white space character is between the last command character and the backslash. Where there was an empty line (ending with a backslash, to help in visually separating the code into blocks), I put the backslash right under the previous line's. This completes task #15259.
2019-04-30Better configure checks to see if GCC can be builtRaul Infante-Sainz-2/+2
Until now, to test if GCC can use `sys/cdefs.h', we were building a small test program using it. But after testing on an Ubuntu 14.04, we noticed that the GCC test during the configure script passes, but GCC still can't be built. After some investigation we noticed its available in other directories, but during the build of GCC, those directories aren't used, and it only assumes it to be under `/usr/include'. So with this commit, we are only checking this particular location for this header, not a test run of GCC. After fixing this, we noticed that GCC's build crashed again because it couldn't link with `libc.a' (or `libc.so'). So we also added a for this library and added a new warning to inform the user what they might be able to do. Finally, we noticed that in one of the last steps of building GCC, we weren't using `&&', but `;', so the GCC name file would be built, even when the GCC build failed.
2019-04-30Running PatchELF on all programs after CoreutilsMohammad Akhlaghi-8/+27
Even though the Coreutils configure script says that it adds `rpath' to its executables, its executables don't have it. As a result, it goes to use the host operating system libraries, causing failures when they don't match with the template. Unfortunately after some tests with the configure script, I couldn't find any way to include `rpath'! Even though `-rpath-link' is present in all linking commands during Coreutils' build, the installed files still don't have it! So I was forced to use PatchELF. However, one problem is that Coreutils installs many programs, not just one like Bash or AWK. As a brute-force solution, with this commit, we are running PatchELF on all the installed programs. It won't hurt those that already have it, but it will fix all those that don't. With this commit, I am also making the following non-related small changes: - In `build-rules.mk', the `&&' characters were placed at the start of the line for better readability. - Bash, Readline and NCURSES are now built in parallel on systems that support it (during `basic.mk').
2019-04-29Added M4 as prerequisite of GMPRaul Infante-Sainz-1/+2
Until this commit, `m4' was not a prerequisite of `gmp'. However, during a test in Ubuntu 14.04 using one single core in the configure step, it crashed complaining about not having `m4' installed. With this commit, we set `m4' as a prerequisite of `gmp'.
2019-04-29Modified copyright information of some filesRaul Infante-Sainz-0/+1
With this commit, the copyright information of some files have been modify in order to include the work of Raul Infante-Sainz.
2019-04-27Lack of semicolons in Binutils installation rule for Mac OS fixedRaul Infante-Sainz-7/+7
Until this commit, in Mac OS we were installing `binutils' as symbolic links of various programs (`as', `ar', `ld', `nm',` ps' and `ranlib'). However, there was a missing semicolon at the end of each line. As a consecuence, the installation of `binutils' on Mac OS systems failed. With this commit, we fix this problem by typing a semicolon at the end of each makelink line.
2019-04-23Bash updated with patched tarball (version 5.0.7)Mohammad Akhlaghi-3/+25
Until now we were using the official tarball of GNU Bash. However, Bash is distributed using patches, not a public version controlled history. So to implement newer features of Bash, its necessary to apply those patches and make the tarball ourselves. With this commit, we have done just that: we used the 7 patches that have been released since version 5.0.0 and made a tarball to use for this template. The instructions on how to make the patched tarball are also given above the Bash build rule.
2019-04-23Awk, coreutils and sed are now prerequisites of metastoreRaul Infante-Sainz-2/+9
Until now, `metastore' did not depend on the necessaries programs that we use to install it (`awk', `coreutils' and `sed'). They are not official dependencies of `metastore', but we need them to install it. With this commit, we put these programs as prerequisites of `metastore' in order to be able to install it without any problem.
2019-04-22High-level software now specified in TARGETS.mkMohammad Akhlaghi-62/+68
Until now, to specify which high-level software you want the project to contain, it was necessary to go into the `high-level.mk' Makefile that is complicated and can create bugs. With this commit, a new `reproduce/software/config/installation/TARGETS.mk' file has been created that is easily/cleanly in charge of documenting the final high-level software that must be built for the project. Also, until now, FFTW was set as a dependency of Numpy while we couldn't actually get Numpy to use it! It was just there for future reference and to justify its build rule. But now that many software won't be built and there is no problem with having rules even though a project might not use them, it has been removed.
2019-04-22Git, Metastore, cURL and Libbsd moved to basic softwareMohammad Akhlaghi-6/+125
Git and Metastore are very basic and fundamental tools for the template, so to keep things clean (let the `high-level.mk' software only represent optional software in the template), these two software (and their dependencies: `cURL' and `Libbsd') will now be built in `basic.mk'.
2019-04-16Binutils is built on GNU/Linux as GCC dependency, not in MAC OSRaul Infante-Sainz-0/+2
Until this commit, we didn't install Binutils. However, we need `strip' for installing Netpbm, and `strip' is part of the Binutil software. With this commit, we include Binutils as a dependency of GCC for GNU/Linux systems. For Mac OS systems we create a symbolic link to `strip' just after the generation of the symbolic link to `gcc'.
2019-04-16Typo corrections in Astrometry-net dependency rulesRaul Infante-Sainz-3/+3
Due to the copy/paste of rules from other files, in some rules there were some spaces insteand of tab. There were also a lack of semicolon in the building of CC, and bad extensions in various tarballs. With this commit, all of these typos have been fixed.
2019-04-16CC symbolic link to GCC built after GCC installationRaul Infante-Sainz-0/+2
Until now, we did not have CC. This is an obsolete way of calling C Compiler, nowadays it is GCC. However, there could be some software that is still using this convention (for example, `netpbm'). With this commit, we make the symbolic link `cc' pointing to the installed `gcc'.
2019-04-15New architecture to separate software-building and analysis stepsMohammad Akhlaghi-0/+903
Until now, the software building and analysis steps of the pipeline were intertwined. However, these steps (of how to build a software, and how to use it) are logically completely independent. Therefore with this commit, the pipeline now has a new architecture (particularly in the `reproduce' directory) to emphasize this distinction: The `reproduce' directory now has the two `software' and `analysis' subdirectories and the respective parts of the previous architecture have been broken up between these two based on their function. There is also no more `src' directory. The `config' directory for software and analysis is now mixed with the language-specific directories. Also, some of the software versions were also updated after some checks with their webpages. This new architecture will allow much more focused work on each part of the pipeline (to install the software and to run them for an analysis).