Re: gfortran, Mac OS X and -fno-second-underscore

From: cstrato <cstrato_at_aon.at>
Date: Fri, 29 Jan 2010 18:51:15 +0100


Dear Dario,

I had the same problem when trying to compile ROOT on Leopard for 64 bit.

Since I did not want to install fink and since I need gfortran for R, too, I downloaded the following gfortran version: http://r.research.att.com/tools/gfortran-4.2-5566-darwin9.tar.gz

In $ROOTSYS/config/Makefile.macosx64 I deleted the following lines:

F77LIBS      := $(shell $(F77) -m64 -print-file-name=libgfortran.dylib)
F77LIBS      += $(shell $(F77) -m64 -print-file-name=libgfortranbegin.a)

I did not need to change any other option such as FOPT in any other makefile.

Then I could compile ROOT for 64 bit w/o problems, see the discussion: http://root.cern.ch/phpBB2/viewtopic.php?t=9721&sid=a6458ea0f7dea91f4a4c1eddacb76016

I agree with you that there should be no need to install fink. As far as I understand Fons used fink since at that time he did not find any other gfortran version which could be used to compile ROOT for 64 bit.

Best regards
Christian

_._._._._._._._._._._._._._._._._._
C.h.r.i.s.t.i.a.n   S.t.r.a.t.o.w.a
V.i.e.n.n.a           A.u.s.t.r.i.a
e.m.a.i.l:        cstrato at aon.at
_._._._._._._._._._._._._._._._._._


Dario Berzano wrote:
> Dear ROOT experts,
>
> is there any reason why, in $ROOTSYS/etc/vmc/Makefile.macosx64 (which
> is used on my current architecture: 64 bit on Snow Leopard), the
> gfortran option "-fno-second-underscore" is appended to FOPT?
>
> As Mac users know well, gfortran is not provided along with Apple
> Developer Tools. Generally, the solution is to install the whole gcc,
> including gfortran, with Fink or MacPorts.
>
> However, on this web page - http://r.research.att.com/tools/ - only the
> missing gfortran matching your gcc version provided with Apple Developer
> Tools can be found.
>
> Installing only gfortran, rather than a second entire set of compilers,
> can save a lot of disk space.
>
> Unfortunately, the gfortran provided at the mentioned web page does not
> come with a new version of cc1. Apple's version is used instead, but it
> does not support some Fortran-specific options like
> "-fno-second-underscore", so the build process fails with the following
> error:
>
> cc1: error: unrecognized command line option "-fno-second-underscore"
>
> Personally, I have noticed that compilation succeeds if I remove
> "-fno-second-underscore" from FOPT in
> $ROOTSYS/etc/vmc/Makefile.macosx64, but I really don't know if it is
> safe to do that. Is it?
>
> Thank you in advance.
>
> Regards,
>
Received on Fri Jan 29 2010 - 18:51:21 CET

This archive was generated by hypermail 2.2.0 : Fri Jan 29 2010 - 23:50:01 CET