Re: Using cxx11 PortGroup on < 10.9

2016-01-26 Thread Michael Dickens
My bad for thinking Mojca wanted support for libstdc++. Somehow I really
misinterpreted the original postings. Happens sometimes. - MLD

On Mon, Jan 25, 2016, at 12:11 PM, Jeremy Huddleston Sequoia wrote:
> "libstdc++" means /usr/lib/libstdc++.6.dylib, and it doesn't support
> C++11, so it is not possible to use the system libstdc++ for C++11 code. 
> I don't think we want to start supporting people using
> ${prefix}/lib/libstdc++.6.dylib from libgcc as that is quite untested and
> aiming for a world of hurt.
> 
> > compiler.whitelist macports-gcc-5 macports-gcc-4.9
> 
> This is surely not what you want.  This will cause the build to use
> ${prefix}/lib/libstdc++.6.dylib.  I could see this being useful for 10.5
> and earlier or ppc builds (because libc++ doesn't work on those
> platforms), but we don't really support those platforms any more anyways.
>  You might as well use the more-tested path of using libc++ and a
> macports-clang compiler in these cases.
> 
> To be clear, setting configure.cxx_stdlib to "libstdc++" means
> /usr/lib/libstdc++.6.dylib, it does not mean use any libstdc++ available.
>  The macports-gcc compilers don't quite work well for this scenario.  If
> you really want to support this, we'll need some new option for this
> (maybe macports-libstdc++), and dependency tracking will become quite
> difficult.
___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev


Re: Using cxx11 PortGroup on < 10.9

2016-01-26 Thread Mojca Miklavec
On 25 January 2016 at 20:17, Ryan Schmidt wrote:
> On Jan 24, 2016, at 11:15 PM, Jeremy Huddleston Sequoia wrote:
>
>> What benefit does "cxx.require_global_libc++ no" have over the current 
>> approach of just doing:
>>
>>configure.cxx_stdlib libc++
>>depends_lib-append port:libcxx
>
> Or I was going to suggest:
>
> PortGroupcxx11 1.0
> configure.cxx_stdlib libc++
>
> which is what the mongodb port does. The cxx11 1.0 portgroup ensures that 
> compilers that don't do C++11 are blacklisted, which I think just depending 
> on the libcxx port wouldn't do.

My experience is that the second command is not needed because using
"PortGroup cxx11 1.0" fails on < 10.9 anyway (unless libc++ is
default).

Mojca
___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev


Re: Using cxx11 PortGroup on < 10.9

2016-01-26 Thread Mojca Miklavec
On 25 January 2016 at 18:55, Ryan Schmidt wrote:
>> On Jan 25, 2016, at 09:29, Mojca Miklavec wrote:
>>
>> (Even more than that I would really like to see the buildbots with
>> libc++ as their default stdlib being set up.)
>
> As far as I know nothing has changed on this front. I'm totally willing to 
> set up libc++ build slaves for 10.6, 10.7 and 10.8, but cannot do so until we 
> agree on a naming scheme to differentiate libc++ packages from libstdc++ 
> packages, implement that in base, and release it.
>
> Well, that would be a prerequisite for *distributing* such packages. I 
> suppose we could set up build slaves that just build and don't distribute 
> their packages. But that wouldn't be as helpful.

I opened a new ticket:
http://trac.macports.org/ticket/50448

Mojca
___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev


Re: Using cxx11 PortGroup on < 10.9

2016-01-26 Thread Rainer Müller
On 2016-01-25 18:55, Ryan Schmidt wrote:
>> On Jan 25, 2016, at 09:29, Mojca Miklavec wrote:
>> 
>> (Even more than that I would really like to see the buildbots with 
>> libc++ as their default stdlib being set up.)
> 
> As far as I know nothing has changed on this front. I'm totally
> willing to set up libc++ build slaves for 10.6, 10.7 and 10.8, but
> cannot do so until we agree on a naming scheme to differentiate
> libc++ packages from libstdc++ packages, implement that in base, and
> release it.

We also need changes to add cxx_stdlib to the parameters in
archive_sites.conf/archive_sites.tcl.

> Well, that would be a prerequisite for *distributing* such packages.
> I suppose we could set up build slaves that just build and don't
> distribute their packages. But that wouldn't be as helpful. 

With more and more ports requiring C++11, how many ports do we have that
have a hard requirement on libstdc++? This only happens when a port
wants to link against system libraries linked with libstdc++. Such a
buildbot with "cxx_stdlib libc++" could be helpful to find these ports.

Rainer
___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev


Re: Using cxx11 PortGroup on < 10.9

2016-01-25 Thread Ryan Schmidt

On Jan 24, 2016, at 11:15 PM, Jeremy Huddleston Sequoia wrote:

> What benefit does "cxx.require_global_libc++ no" have over the current 
> approach of just doing:
> 
>configure.cxx_stdlib libc++
>depends_lib-append port:libcxx

Or I was going to suggest:

PortGroupcxx11 1.0
configure.cxx_stdlib libc++

which is what the mongodb port does. The cxx11 1.0 portgroup ensures that 
compilers that don't do C++11 are blacklisted, which I think just depending on 
the libcxx port wouldn't do.


___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev


Re: Using cxx11 PortGroup on < 10.9

2016-01-25 Thread Michael Dickens
We've had this discuss before, how to do C++11 for libstdc++ and libc++.

The cxx11 PortGroup implements C++11 compliance for libc++ only. It
errors out when using libstdc++.

What Mojca is asking is whether we can add an implementation for when
using libstdc++, and I am on board with agreeing on how to do this
change. It won't be perfect, since using libstdc++ has issues & will
require selecting a default compiler for building that is C++11
compliant; and, MacPorts provides no good way to add whitelist options
beyond variants in this case. Variants are what we used to do for
selecting a compiler suite, e.g., for various math ports.

I see no need to have port-by-port intervention; either one is using
libc++ or libstdc++, depending on host OS and user-select options. If
using the former, then just do what the cxx11 PortGroup does right now.

If using the latter, then do something like the following -- which I
admit is not perfect, but it should work for most ports:
{{{
# *clang* when using libstdc++ do not seem to support C++11;
# C++11 support seems to need GCC 4.7+ when using libstdc++;
# could use C++0x support on GCC4.[56], but just ignore it since
# there are newer compilers already in place as defaults.

# Blacklist GCC compilers not supporting C++11 and all CLANG.
# This is probably not necessary, but it's good practice.

compiler.blacklist-append *clang* {*gcc-3*} {*gcc-4.[0-6]}

# and whitelist those we do want to use. wish there were a better way.
# these will be used in the order provided.

compiler.whitelist macports-gcc-5 macports-gcc-4.9
}}}

My US$0.02. - MLD
___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev


Re: Using cxx11 PortGroup on < 10.9

2016-01-25 Thread Jeremy Huddleston Sequoia

> On Jan 25, 2016, at 08:04, Michael Dickens  wrote:
> 
> We've had this discuss before, how to do C++11 for libstdc++ and libc++.
> 
> The cxx11 PortGroup implements C++11 compliance for libc++ only. It
> errors out when using libstdc++.
> 
> What Mojca is asking is whether we can add an implementation for when
> using libstdc++

"libstdc++" means /usr/lib/libstdc++.6.dylib, and it doesn't support C++11, so 
it is not possible to use the system libstdc++ for C++11 code.  I don't think 
we want to start supporting people using ${prefix}/lib/libstdc++.6.dylib from 
libgcc as that is quite untested and aiming for a world of hurt.

> , and I am on board with agreeing on how to do this
> change. It won't be perfect, since using libstdc++ has issues & will
> require selecting a default compiler for building that is C++11
> compliant; and, MacPorts provides no good way to add whitelist options
> beyond variants in this case. Variants are what we used to do for
> selecting a compiler suite, e.g., for various math ports.
> 
> I see no need to have port-by-port intervention; either one is using
> libc++ or libstdc++, depending on host OS and user-select options. If
> using the former, then just do what the cxx11 PortGroup does right now.
> 
> If using the latter, then do something like the following -- which I
> admit is not perfect, but it should work for most ports:
> {{{
> # *clang* when using libstdc++ do not seem to support C++11;
> # C++11 support seems to need GCC 4.7+ when using libstdc++;
> # could use C++0x support on GCC4.[56], but just ignore it since
> # there are newer compilers already in place as defaults.
> 
> # Blacklist GCC compilers not supporting C++11 and all CLANG.
> # This is probably not necessary, but it's good practice.
> 
> compiler.blacklist-append *clang* {*gcc-3*} {*gcc-4.[0-6]}
> 
> # and whitelist those we do want to use. wish there were a better way.
> # these will be used in the order provided.
> 
> compiler.whitelist macports-gcc-5 macports-gcc-4.9

This is surely not what you want.  This will cause the build to use 
${prefix}/lib/libstdc++.6.dylib.  I could see this being useful for 10.5 and 
earlier or ppc builds (because libc++ doesn't work on those platforms), but we 
don't really support those platforms any more anyways.  You might as well use 
the more-tested path of using libc++ and a macports-clang compiler in these 
cases.

To be clear, setting configure.cxx_stdlib to "libstdc++" means 
/usr/lib/libstdc++.6.dylib, it does not mean use any libstdc++ available.  The 
macports-gcc compilers don't quite work well for this scenario.  If you really 
want to support this, we'll need some new option for this (maybe 
macports-libstdc++), and dependency tracking will become quite difficult.

> }}}



> 
> My US$0.02. - MLD
> ___
> macports-dev mailing list
> macports-dev@lists.macosforge.org
> https://lists.macosforge.org/mailman/listinfo/macports-dev



smime.p7s
Description: S/MIME cryptographic signature
___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev


Re: Using cxx11 PortGroup on < 10.9

2016-01-25 Thread Ryan Schmidt
> On Jan 25, 2016, at 09:29, Mojca Miklavec wrote:
> 
> (Even more than that I would really like to see the buildbots with
> libc++ as their default stdlib being set up.)

As far as I know nothing has changed on this front. I'm totally willing to set 
up libc++ build slaves for 10.6, 10.7 and 10.8, but cannot do so until we agree 
on a naming scheme to differentiate libc++ packages from libstdc++ packages, 
implement that in base, and release it. 

Well, that would be a prerequisite for *distributing* such packages. I suppose 
we could set up build slaves that just build and don't distribute their 
packages. But that wouldn't be as helpful. 
___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev


Re: Using cxx11 PortGroup on < 10.9

2016-01-25 Thread Jeremy Huddleston Sequoia

> On Jan 25, 2016, at 09:29, Mojca Miklavec  wrote:
> 
> On 25 January 2016 at 18:11, Jeremy Huddleston Sequoia wrote:
>>> On Jan 25, 2016, at 08:04, Michael Dickens wrote:
>>> 
>>> We've had this discuss before, how to do C++11 for libstdc++ and libc++.
>>> 
>>> The cxx11 PortGroup implements C++11 compliance for libc++ only. It
>>> errors out when using libstdc++.
>>> 
>>> What Mojca is asking is whether we can add an implementation for when
>>> using libstdc++
>> 
>> "libstdc++" means /usr/lib/libstdc++.6.dylib, and it doesn't support C++11, 
>> so it is not possible to use the system libstdc++ for C++11 code.  I don't 
>> think we want to start supporting people using 
>> ${prefix}/lib/libstdc++.6.dylib from libgcc as that is quite untested and 
>> aiming for a world of hurt.
> 
> Just to clarify. I don't want to "support" anyone building C++11 code
> against /usr/lib/libstdc++.6.dylib.
> 
> I would like to support building C++11 code against libc++ for users
> who have not modified their stdlib setting yet (that includes the
> buildbots) and for a small subset of ports where doing that doesn't
> actually lead to crashes and problems. Examples include clang-3.7,
> root6 etc.

What about something like cxx11.no_abi_boundary which would do what we do in 
clang:

configure.cxx_stdlib libc++
depends_lib-append port:libcxx

instead of the error message?

Both cases would benefit from the group's blacklist while allowing for both use 
cases.

> But I agree that one can in principle do that without the portgroup.
> 
> (Even more than that I would really like to see the buildbots with
> libc++ as their default stdlib being set up.)
> 
> Then again ... the longer we postpone this action, the less people
> will feel that it would have to be done at all and the smaller the
> chances will be that we would be able to fix remaining problems.
> 
> Mojca
> ___
> macports-dev mailing list
> macports-dev@lists.macosforge.org
> https://lists.macosforge.org/mailman/listinfo/macports-dev



smime.p7s
Description: S/MIME cryptographic signature
___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev


Re: Using cxx11 PortGroup on < 10.9

2016-01-25 Thread Mojca Miklavec
On 25 January 2016 at 18:11, Jeremy Huddleston Sequoia wrote:
>> On Jan 25, 2016, at 08:04, Michael Dickens wrote:
>>
>> We've had this discuss before, how to do C++11 for libstdc++ and libc++.
>>
>> The cxx11 PortGroup implements C++11 compliance for libc++ only. It
>> errors out when using libstdc++.
>>
>> What Mojca is asking is whether we can add an implementation for when
>> using libstdc++
>
> "libstdc++" means /usr/lib/libstdc++.6.dylib, and it doesn't support C++11, 
> so it is not possible to use the system libstdc++ for C++11 code.  I don't 
> think we want to start supporting people using 
> ${prefix}/lib/libstdc++.6.dylib from libgcc as that is quite untested and 
> aiming for a world of hurt.

Just to clarify. I don't want to "support" anyone building C++11 code
against /usr/lib/libstdc++.6.dylib.

I would like to support building C++11 code against libc++ for users
who have not modified their stdlib setting yet (that includes the
buildbots) and for a small subset of ports where doing that doesn't
actually lead to crashes and problems. Examples include clang-3.7,
root6 etc.

But I agree that one can in principle do that without the portgroup.

(Even more than that I would really like to see the buildbots with
libc++ as their default stdlib being set up.)

Then again ... the longer we postpone this action, the less people
will feel that it would have to be done at all and the smaller the
chances will be that we would be able to fix remaining problems.

Mojca
___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev


Re: Using cxx11 PortGroup on < 10.9

2016-01-24 Thread Jeremy Huddleston Sequoia

> On Jan 23, 2016, at 14:08, Mojca Miklavec  wrote:
> 
> Hi,
> 
> Would it be possible to implement a way to use the cxx11 PortGroup
> without having to use libc++ as default stdlib? Maybe with an
> additional configuration like:
>PortGroup cxx11 1.0
>cxx.require_global_libc++ no
> (but with a better keyword of course).
> 
> What I have in mind are ports that require C++11, but don't have any
> C++ dependencies and thus don't suffer from stdlib incompatibility.
> 
> Examples of such ports would be root6, newer versions of clang etc.

Yes, there are clients which use just the C++ STL and don't export any C++ 
APIs.  However, clang is not one of them.  It has C++ dependecies (llvm) and 
exports C++ APIs (libclang).  Since it can't be built on older systems anyways, 
we just force libc++.

> It
> would be handy to have a shortcut, but cxx11 PortGroup alone is a tiny
> bit too restrictive.

What benefit does "cxx.require_global_libc++ no" have over the current approach 
of just doing:

configure.cxx_stdlib libc++
depends_lib-append port:libcxx

> 
> Mojca
> ___
> macports-dev mailing list
> macports-dev@lists.macosforge.org
> https://lists.macosforge.org/mailman/listinfo/macports-dev



smime.p7s
Description: S/MIME cryptographic signature
___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev


Re: Using cxx11 PortGroup on < 10.9

2016-01-23 Thread Davide Liessi
2016-01-23 23:08 GMT+01:00 Mojca Miklavec :
> Examples of such ports would be root6, newer versions of clang etc.

Another example is gringo: in my local copy of the Portfile on 10.6 I
removed the cxx11 PortGroup and added a suitable configure.compiler
line.

This feature would be most welcome.
I'm willing to help testing possible solutions, if needed.

Best wishes.
Davide
___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev