[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Support #KOX-719621]: How to détermine compiler version for existing libnetcdf



> Thanks Russ.
> This netcdf build happens to be a macports install on our lab iMac computers.
> I will check with the maintainers at macports.org.
> … unless you happen to know?

When I build netcdf-fortran with macports, it actually built a gcc and gfortran
specifically for that combination.  It installed the gcc in /opt/local/bin under
several names, which were all hard links to the same executable:

  -rwxr-xr-x     3 root  admin      369328 Jul  5 14:15 gcc-mp-4.5*
  -rwxr-xr-x     3 root  admin      369328 Jul  5 14:15 
x86_64-apple-darwin12-gcc-4.5.4*
  -rwxr-xr-x     3 root  admin      369328 Jul  5 14:15 
x86_64-apple-darwin12-gcc-mp-4.5*

But there was no link named just "gcc", so no clash with other gcc's that may 
have 
been installed.

--Russ

> -Neil
> 
> On Aug 23, 2013, at 9:05 AM, "Unidata netCDF Support" <address@hidden> wrote:
> 
> > Hi Neil,
> >
> >> How does one determine the version of gcc that an existing libnetcdf
> >> library was built with -- specifically on Mac OS X (freebsd)?
> >
> > You can't, in general, but under some circumstances running
> >
> >  $ nc-config --cc
> >
> > will tell you the version, by displaying the absolute path to the compiler
> > executable that was used, which sometimes has the version embedded in the
> > directory path.  Or, if you haven't upgraded gcc since building the library,
> > you could try
> >
> >  $ `nc-config --cc` --version
> >
> > which will show you the version of the compiler that's now in the same place
> > as the compiler with which the netCDF C library was originally built.
> >
> > If you built the netCDF library shortly after you built and installed the
> > hdf5 library, you could also look at the "libhdf5.settings" file in the
> > directory where the hdf5 library is installed.  That's a text file that
> > also has all the gory details of the compiler version as well as all the
> > flags it was built with.
> >
> > Finally, if you still happen to have the source directory (perhaps from
> > backup) in which the netCDF C library was built and the config.log file
> > happens to still be in that directory (because you didn't run "make clean"
> > after installing it), that also has the version information about the C
> > compiler, probably in several places.
> >
> > --Russ
> >
> >> -Neil
> >> ---
> >> Neil Smith  address@hidden   979.845.6272
> >> Senior IT Specialist, Atmospheric Sciences, TAMU
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >
> > Russ Rew                                         UCAR Unidata Program
> > address@hidden                      http://www.unidata.ucar.edu
> >
> >
> >
> > Ticket Details
> > ===================
> > Ticket ID: KOX-719621
> > Department: Support netCDF
> > Priority: Normal
> > Status: Closed
> >
> 
> 

Russ Rew                                         UCAR Unidata Program
address@hidden                      http://www.unidata.ucar.edu



Ticket Details
===================
Ticket ID: KOX-719621
Department: Support netCDF
Priority: Normal
Status: Closed