MacPorts wants to install apple-gcc42 on 10.6 all of a sudden?

Craig Treleaven ctreleaven at cogeco.ca
Mon Apr 22 09:51:56 PDT 2013


At 6:26 PM +0200 4/22/13, René J.V. Bertin wrote:
>On Apr 22, 2013, at 17:47, Brandon Allbery wrote:
>
>>  Ask yourself this: is your use case so *very* 
>>important that users who are not as advanced as 
>>you --- which is to say, most of the MacPorts 
>>userbase --- should be inconvenienced or even 
>>be left with a broken system, so that your use 
>>case is slightly easier?
>
>Thanks for the compliment, and my answer is no of course.
>But I don't consider those the only options or 
>possible outcomes. I'll have a look first at how 
>complicated it is to force the use of another 
>default compiler before I'll say more though.
>
>>  (If you think the correct answer to that is 
>>"yes", I don't want to know about it. Just to 
>>be clear that as soon as you want to set the 
>>compiler to suit yourself, either you are a 
>>macports dev or you are not the target market 
>>for macports.)
>
>Macports isn't exactly for the same target 
>market as Debian's or Ubuntu's package 
>repositories either.
>And let's be honest, what's the point in having 
>(C) compilers in Macports if they cannot be used 
>by Macports itself? Aren't the people who 
>install them likely to be in the same target 
>market as you seem to put me in?

Not all ports build/run with all compilers.  For 
example, my mythtv-core.25 is *really* picky: 
Apple's gcc 4.2 and Clang 3.0 are about it.  This 
was determined after a number of problem reports 
and a lot of testing.  If you force a single 
compiler for everything you might install, I 
would expect you to run into problems sooner or 
later.

OTOH, some ports allow you to choose your compiler.  Take atlas, for example.

atlas has the variants:
    clang: use XCode clang and gfortran
      * conflicts with gcc46 gcc47 gcc48 mpclang32 mpclang33
    gcc46: build using macports-gcc-4.6
      * conflicts with clang gcc47 gcc48 mpclang32 mpclang33
[+]gcc47: build using macports-gcc-4.7
      * conflicts with clang gcc46 gcc48 mpclang32 mpclang33
    gcc48: build using macports-gcc-4.8
      * conflicts with clang gcc46 gcc47 mpclang32 mpclang33
    mpclang32: use mp-clang-3.2 and gfortran
      * conflicts with clang gcc46 gcc47 gcc48 mpclang33
    mpclang33: use mp-clang-3.3 and gfortran
      * conflicts with clang gcc46 gcc47 gcc48 mpclang32
    nofortran: Forgo use of fortran compiler
    universal: Build for multiple architectures

You could set a default variant (say +mpclang33, 
for example) and then any port you install that 
offers that variant would do what you wanted. 
(Ironic twist:  only one port--atlas--offers a 
mpclang33 variant!  gcc46 is more common, there 
are 106 ports with that variant.  You can see 
them with 'port list variants:gcc46'.)

Craig


More information about the macports-users mailing list