Compiling software with c++11 support

Lawrence Velázquez larryv at macports.org
Wed Sep 11 22:45:06 PDT 2013


On Sep 12, 2013, at 12:11 AM, Jeremy Huddleston Sequoia <jeremyhu at macports.org> wrote:

> On Sep 11, 2013, at 18:47, Eric A. Borisch <eborisch at macports.org> wrote:
> 
>> As mentioned elsewhere in this email chain, it's not intended to be a supported switch for users, it's a tool to help developers with transitioning to a future where everything MP is libc++. Buyer beware. ;)
> 
> Yes, very much so.  It works well enough for me on my test VMs that I'm probably going to flip that switch on more of my "real" machines, but it is *VERY* new.  You can probably count the number of developers and users enabling that on a single hand ;)

For what it's worth, I've had it enabled on my primary machine since we added it and have not run into any runtime issues. (My issues have tended to crop up at build time.) Your mileage will vary, naturally.

> As mentioned before, please do report bugs with patches (and CC me on them).

Feel free to Cc me as well.

> Most autoconf and cmake based ports should "just work" ... other ports will likely need updates similar to what we did for boost or ld64.

If you do choose to switch to libc++ and rebuild all your ports, keep in mind that a successful build does not necessarily mean a successful build against libc++. A misbehaving port might quietly link against libstdc++ behind your back. Use otool -L to check your executables and libraries:

    % otool -L /opt/local/bin/pdflatex
    /opt/local/bin/pdflatex:
    	/opt/local/lib/libpng15.15.dylib (compatibility version 33.0.0, current version 33.0.0)
    	/opt/local/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.8)
    	/opt/local/lib/libpoppler.43.dylib (compatibility version 44.0.0, current version 44.0.0)
    	/opt/local/lib/libkpathsea.6.dylib (compatibility version 8.0.0, current version 8.1.0)
    	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 65.1.0)
    	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0)
    %

vq


More information about the macports-users mailing list