C++ 2011 in gcc 4.8.2 from MacPorts ?

Christopher Jones jonesc at hep.phy.cam.ac.uk
Wed Jun 25 13:21:48 PDT 2014


Hi,

On 25 Jun 2014, at 5:16pm, Jim Graham <spooky130u at gmail.com> wrote:

> On Wed, Jun 25, 2014 at 12:03:16PM -0400, Brandon Allbery wrote:
>> On Wed, Jun 25, 2014 at 11:56 AM, Jim Graham <spooky130u at gmail.com> wrote:
>> 
>> It's still considered experimental, so not enabled by default. Looks like
>> -std=c++11 is needed.
> 
> How is the support for C++ 2011 in gcc49 (which MacPorts doesn't want to
> build as long as long as libgcc is installed ... but since MacPorts uses
> (as I understand it) its own gcc to build all of its ports, I can't
> exactly deactivate libgcc, can I?  And would it be worth it to begin
> with?

A couple corrections.

 - MacPorts gcc 4.8 and older requires either libgcc *or* libgcc-devel. By default, if required, the former is automatically installed when installing these gcc versions. libgcc and libgcc-devel conflict, you can only have one installed at once. Now, MacPorts gcc 4.9 requires libgcc-devel. So if you have gcc 4.8 or newer installed, with libgcc, and then wish to install gcc49, you need to first manually (i.e. by force) uninstall libgcc and install libgcc-devel. After this you will be able to install gcc49, and the older gcc’s will also still work. Or uninstall all your gcc compiler, then install gcc49 first (which will bring in libgcc-devel), then the others afterwards. 

- It is not correct that macports always uses its old gcc to build all its ports. Far from it, this is discouraged unless unavoidable due to the C++ runtime issues it would introduce. The preferred compilers are always the system ones, which vary from OS to OS. See

https://trac.macports.org/wiki/UsingTheRightCompiler

If the default system ones do not work for a given port, then a complex set of rules based on blacklist and whitelists are used, which each port can define, to decide which to use, which could be any of those list in the above link..

Chris


> 
> Thanks,
>   --jim
> 
> -- 
> THE SCORE:  ME:  2  CANCER:  0
> 73 DE N5IAL (/4)            MiSTie #49997      < Running Mac OS X Lion >
> spooky130u at gmail.com                    ICBM/Hurr.: 30.44406N 86.59909W
> 
>                   Saw something on TV about Psych-os.
>             Hmmmm, Psych OS.  Perhaps the next freeware OS....   --me
> 
> _______________________________________________
> macports-users mailing list
> macports-users at lists.macosforge.org
> https://lists.macosforge.org/mailman/listinfo/macports-users

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2030 bytes
Desc: not available
URL: <https://lists.macosforge.org/pipermail/macports-users/attachments/20140625/0c6b342a/attachment.p7s>


More information about the macports-users mailing list