[Spice_discussion] Fortran SPICE N0065 and static libraries

Greg Earle earle at mipl.JPL.NASA.GOV
Thu Jul 16 17:09:35 PDT 2015


I was asked to build C SPICE and Fortran SPICE version N0065 on RHEL 6.x.

For some weird reason, the Fortran SPICE 64-bit build scripts use
"-static -m64" as their link options (TKLINKOPTIONS), whereas on the
32-bit side, the build scripts they just use "-m32".  No idea why that is.

In RHEL 6.x and beyond, there is no more "/usr/lib64/libm.a" static math
library, so the build fails unless you tell it this obscure directory
where an old compat "libm.a" static library lives:

( setenv TKLINKOPTIONS "-static -m64 -B /usr/lib/x86_64-redhat-linux5E/lib64/ " ;./makeall.csh )

Strangely, this is only an issue on the Fortran side - the C side does
not try and use "-static" for either 32-bit or 64-bit architectures.
They just use "-lm -m64" or "-lm -m32" for the link-time options.

Can anyone tell me why 64-bit Fortran SPICE cares about linking against
static math libraries when none of the other 3 combos care?

Thanks,

--
	- Greg Earle
	  Member of Technical Staff, Jet Propulsion Lab
	  earle at mipl.JPL.NASA.GOV
	  x4-6007





More information about the Spice_discussion mailing list