Can I compile Galacticus with static linking?

Created by Andrew Benson
Keywords:
compiling

Yes, you can. You'll need static versions of the various libraries installed - HDF5, FGSL and FoX build static versions by default, for other libraries (e.g. glibc) you'll need to ensure you have the static versions on your system. Static linking is more picky about the ordering of libraries in the link command and doesn't automatically include dependencies. The following ordering of libraries in the link command seems to work:

-static -lFoX_dom -lFoX_sax -lFoX_wxml -lFoX_common -lFoX_utils -lFoX_fsys -lfgsl_gfortran -lgsl -lgslcblas -lm -lhdf5hl_fortran -lhdf5_hl -lhdf5_fortran -lhdf5 -lz