[Spice_discussion] Compiling SPICE software with gfortran

William Thompson William.T.Thompson at nasa.gov
Fri Nov 16 08:39:04 PST 2012


I've solved this problem.  Evidently in Mac OSX you have to tell where to find 
the libraries.  I was able to get it to compile with the following command:

gfortran -C -o cksmooth cksmooth.f -m32 -mmacosx-version-min=10.5 \
         -L /Developer/SDKS/MacOSX10.5.sdk/usr/lib \
         support.a spicelib.a

Bill Thompson

On 11/16/12 10:46, William Thompson wrote:
> Folks:
>
> I'm not sure this is a SPICE issue itself, but I thought somebody on this list
> might know the answer. We're in the process of converting over our Mac servers
> to a newer version of OSX, and realized that we needed to replace or recompile
> some of our software because they were originally compiled for the PPC platform,
> which is no longer supported.
>
> The first issue we ran into was the SPICE utility cksmrg. I downloaded the
> precompiled Mac/Intel version from the NAIF website, but quickly realized that
> we needed to also install gfortran for it to find the necessary libraries.
>
> We also have a small FORTRAN program that I wrote long ago which works along
> with cksmrg to produce some of our pointing data files. Most of our SPICE
> software is written in IDL, but this small part had to be written in FORTRAN
> because it calls some of the few SPICE routines that weren't ported over to IDL
> (and I'm an old guy who's more comfortable with FORTRAN than C).
>
> We quickly realized that it wasn't enough to install gfortran, but we also had
> to install Xcode. The command used to compile the program was
>
> gfortran -C -o cksmooth cksmooth.f \
> /service/stereo3/stereo/software/spice_fortran/i386/lib/support.a \
> /service/stereo3/stereo/software/spice_fortran/i386/lib/spicelib.a
>
> However, this produces the following error message.
>
> ld: library not found for -lcrt1.10.6.o
> collect2: error: ld returned 1 exit status
>
> Does anybody know what the problem might be? I don't think it has anything to do
> with the SPICE libraries, because I get the same error with another old program
> that's independent of SPICE.
>
> Thanks,
>
> Bill Thompson
>

-- 
William Thompson
NASA Goddard Space Flight Center
Code 671
Greenbelt, MD  20771
USA

301-286-2040
William.T.Thompson at nasa.gov


More information about the Spice_discussion mailing list