Software Build Considerations

From Cheaha
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.


Attention: Research Computing Documentation has Moved
https://docs.rc.uab.edu/


Please use the new documentation url https://docs.rc.uab.edu/ for all Research Computing documentation needs.


As a result of this move, we have deprecated use of this wiki for documentation. We are providing read-only access to the content to facilitate migration of bookmarks and to serve as an historical record. All content updates should be made at the new documentation site. The original wiki will not receive further updates.

Thank you,

The Research Computing Team

Experiment reproducibility requires a known starting point.

In order to reliably build any software package it is important to start the build with a clean environment: a well defined shell environment that doesn't have excess variables set that are not needed for the build. That is, you shouldn't have a PATH or LD_LIBRARY_PATH filled with every last feature you are accustomed to keeping at your finger tips. One of the cleanest environments is "PATH=/bin:/usr/bin" and "unset LD_LIBRARY_PATH". Most builds should start with this minimal environment and then add additional values as needed to build the tool successfully.

This austere environment is only needed during a build. Once the software is build, you can return to a richer environment for interactive use.

The environment modules on Cheaha make it easy to keep your environment to the minimum necessary tools by simply loading only the modules needed. This also means that your default environment after you log in is pretty clean, though there is no harm in making it cleaner. Using a sub-shell for the build, will let you easily return to your default environment by simply exiting the sub-shell. Set up our build environment with the following commands:

bash  # creates the sub-shell
PATH=/bin:/usr/bin; unset LD_LIBRARY_PATH
#
# execute commands to perform the build  
#

After you complete the build you can return to the parent shell whose environment remains unaffected by build environment you created changes in the build sub-shell:

exit