lang/gcc42 without gfortran

Rainer Hurling rhurlin at gwdg.de
Mon Mar 16 03:41:31 PDT 2009


Thank you for this information.

As far as I know I am one of only a few persons who are testing 
development versions of R on FreeBSD CURRENT. So most times I can not 
use the port math/R and instead I have to build R manually. This was 
very easy with FreeBSD as long as the fortran compiler was integrated in 
the base system. For some time now we have to install the gfortran 
compiler by lang/gcc4x. And here my problems with some third party 
software outside the ports system begun.

Compiling software like R normally uses the system compiler version, 
i.e.  gcc 4.2.1. So gfortran version 4.2.x is needed.

When I want to use version 4.3.x instead I explicitly have to set some 
vars in etc/make.conf:

   # Only for ports
   .if ${.CURDIR:M*/ports/*} && !${.CURDIR:M*/work/*}
   # Set gcc version for ports.
   CC=                     gcc43
   CXX=                    g++43
   CPP=                    cpp43
   .endif

I tried it and it works. But there are some problems remaining with 
version 4.3.x that are not resolved for me at this time.

First of all, building and installing the system (world and kernel) 
furthermore needs the system compiler (version 4.2.1). In the ports 
system there are some ports that do not build with gcc 4.3.x, for 
example multimedia/miro or x11/nvidia-driver.

Because of problems like that I often have to juggle with env settings 
for the compiler version depending on that part of software I just want 
to build.

Is there any elegant possibility to use gcc version 4.3.x for third 
party software outside the ports system, but for all other cases using 
the system compiler (version 4.2.1) without juggling env vars in 
etc/make.conf or any other place?

For me it seams the best and easiest solution would be to use gfortran 
in version 4.2.x until the system compiler itself will be changed 
towards version 4.3.x. (It is fiddly always to patch lang/gcc42 for 
gfortran...)

Rainer


On 16.03.2009 06:51 (UTC+1), bf wrote:
>> After upgrading to latest lang/gcc42 I found that there is no gfortran 
>> any more.
>>
>> Comparing the Makefiles of the ports lang/gcc42 and lang/gcc43 shows 
>> that it had been removed. Was this intentional?
>>
>> I need version 4.2.xx of gfortran for programs like math/R etc. Is it 
>> possible to integrate it again in the port?
> 
> There was some discussion of this at the time of the changes
> to bsd.gcc.mk, when WITH_FORTRAN was switched to use gfortran43
> by default.  gerald@'s point of view, as I understand it, was
> that it was better to only use the latest stable version of
> gfortran in ports, because that means he would have to spend
> less time maintaining all of the other versions, and for the
> majority of users the latest stable version would be an
> improvement upon the other versions.  If you think that there
> is a compelling need to reintroduce one or more of the earlier
> versions, then maybe you can persuade him to do so, at least as
> an OPTION. Otherwise, I guess you're stuck using a locally
> modified ports tree, which isn't all that inconvenient for a few
> ports if you go about it in the right way.
> 
> Regards,
>           b.



More information about the freebsd-ports mailing list