#136: Don't rebuild external libraries so often --------------------------+------------------------------------------------- Reporter: eschnett | Owner: Type: enhancement | Status: review Priority: minor | Milestone: Component: Cactus | Version: Resolution: | Keywords: --------------------------+-------------------------------------------------
Comment (by bmundim):
What my patch does is to provide a way out of the default behaviour, but it does *not* change the default behaviour. The way I usually do when building the libraries is as follows:
1) set in my .cactus/config the path where I want the library built and the BUILD statement to force it to be built. For example, I used the following configuration for GSL to be built in my laptop with gcc:
GSL_DIR = BUILD GSL_INSTALL_DIR = /home/bruno/local/gcc4.4.1/gsl-1.14
2) Once I have built them, I change my .cactus/config file to reflect their location and comment out the two lines above:
#GSL_DIR = BUILD #GSL_INSTALL_DIR = /home/bruno/local/gcc4.4.1/gsl-1.14 GSL_DIR = /home/bruno/local/gcc4.4.1/gsl-1.14
3) All other configurations that are built with gcc, I use the latest version of my .cactus/config file.
This has worked well for me so far. I didn't think hard of any corner case and I didn't think of having this process automated. I hope it is clearer how I did/do. Now your points:
If two Cactus configurations use the same install locations, then the
library there will be built twice -- the first will silently be overwritten
I didn't run into this problem, since once I build the libraries I set its location in the .cactus/config file as I described above. However, we could work on making this more robust.
If you clean a configuration or remove it, and then rebuild it, the GSL
library will be built again, even if it already exists there
It won't be built again, because at this time I have already set GSL_DIR to the library location. Again we may want to make it more robust, maybe be by assigning GSL_DIR = GSL_INSTALL_DIR *after* the library is installed.
If you install GSL into the Cactus source tree, the same thing happens.
This is true. Remember that I didn't change the default. I just provided a way out of it.