Re: [squid-dev] More woes with ubuntu-precise

2015-08-13 Thread Alex Rousskov
On 08/13/2015 09:29 AM, Kinkie wrote:

>EnumIterator has brought out one more issue with ubuntu-precise:
> since it carries gcc-4.6, it doesn't support std::underlying_type.


> The options are:
> - drop support for precise in trunk. We claim to need gcc 4.8 anyway

I am confused: If GCC v4.8 is required, then why are you asking about a
Ubuntu release that comes with GCC v4.6? Does it imply that we were only
pretending to require GCC v4.8 and now may actually have to start
requiring it?


> - not to use std::underlying_type and blindly use int.
> - do template metaprogramming to detect std::underlying_type, fall back
> to int if not possible
> - use autoconf
> 
> 3. and 4. are quite crazy IMO but I mentioned them for completeness' sake.
> Any opinion on 1. and 2.?


If we do not truly require GCC v4.8 yet, then I like #2 because it is
simple and sufficient.

[ If you have to replace std::underlying_type::type with "int"
more than once, ] please add a named type so that it is easy to find
such replacements. Do not just use "int" directly.

typedef underlying_enum_type int;

HTH,

Alex.

___
squid-dev mailing list
squid-dev@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-dev


Re: [squid-dev] More woes with ubuntu-precise

2015-08-13 Thread Amos Jeffries
On 14/08/2015 10:18 a.m., Alex Rousskov wrote:
> On 08/13/2015 09:29 AM, Kinkie wrote:
> 
>>EnumIterator has brought out one more issue with ubuntu-precise:
>> since it carries gcc-4.6, it doesn't support std::underlying_type.
> 
> 
>> The options are:
>> - drop support for precise in trunk. We claim to need gcc 4.8 anyway
> 
> I am confused: If GCC v4.8 is required, then why are you asking about a
> Ubuntu release that comes with GCC v4.6? Does it imply that we were only
> pretending to require GCC v4.8 and now may actually have to start
> requiring it?

My thoughts almost the same.

The published "requirement" I put up was:
"
This series of Squid requires a C++11 capable compiler. The currently
known compilers which meet this criteria and build Squid reliably are
GCC 4.9+, Clang 3.5+, and Intel CC 12.0+
"

So its not even 4.8, more of a soft-ish 4.9+.

If we have an easy way/wrapper/hack to allow compile on older versions
do it still. If Squid happens to build (and work) on 4.8 or 4.6 great.
But they are acceptible casualties if there is no choice.


Note that Ubuntu will not ever support these newer Squid versions on
their LTS anyway. It is entirely our choice and burden whether to
support people who want the latest and greatest Squid software to work
seamlessly when mixed into an ancient environment. IMO its on their
shoulders to see that the dependencies are at least usable.



> 
>> - not to use std::underlying_type and blindly use int.
>> - do template metaprogramming to detect std::underlying_type, fall back
>> to int if not possible
>> - use autoconf
>>
>> 3. and 4. are quite crazy IMO but I mentioned them for completeness' sake.
>> Any opinion on 1. and 2.?
> 
> 
> If we do not truly require GCC v4.8 yet, then I like #2 because it is
> simple and sufficient.
> 
> [ If you have to replace std::underlying_type::type with "int"
> more than once, ] please add a named type so that it is easy to find
> such replacements. Do not just use "int" directly.
> 
> typedef underlying_enum_type int;
> 

Agreed.

Amos

___
squid-dev mailing list
squid-dev@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-dev


Re: [squid-dev] More woes with ubuntu-precise

2015-08-14 Thread Alex Rousskov
On 08/13/2015 10:52 PM, Amos Jeffries wrote:
> On 14/08/2015 10:18 a.m., Alex Rousskov wrote:
>> On 08/13/2015 09:29 AM, Kinkie wrote:
>>
>>>EnumIterator has brought out one more issue with ubuntu-precise:
>>> since it carries gcc-4.6, it doesn't support std::underlying_type.
>>
>>
>>> The options are:
>>> - drop support for precise in trunk. We claim to need gcc 4.8 anyway
>>
>> I am confused: If GCC v4.8 is required, then why are you asking about a
>> Ubuntu release that comes with GCC v4.6? Does it imply that we were only
>> pretending to require GCC v4.8 and now may actually have to start
>> requiring it?


> My thoughts almost the same.
> 
> The published "requirement" I put up was:
> "
> This series of Squid requires a C++11 capable compiler. The currently
> known compilers which meet this criteria and build Squid reliably are
> GCC 4.9+, Clang 3.5+, and Intel CC 12.0+
> "
> 
> So its not even 4.8, more of a soft-ish 4.9+.

I was under impression that we have promised GCC 4.8 support for Squid
v4.0. Perhaps I am missing some deliberations with thoughtful
justifications, but it feels like we are simply increasing the required
GCC version number just because it is convenient for developers, without
balancing admin and developer needs.

Alex.

___
squid-dev mailing list
squid-dev@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-dev


Re: [squid-dev] More woes with ubuntu-precise

2015-08-18 Thread Amos Jeffries
On 15/08/2015 3:05 a.m., Alex Rousskov wrote:
> On 08/13/2015 10:52 PM, Amos Jeffries wrote:
>> On 14/08/2015 10:18 a.m., Alex Rousskov wrote:
>>> On 08/13/2015 09:29 AM, Kinkie wrote:
>>>
EnumIterator has brought out one more issue with ubuntu-precise:
 since it carries gcc-4.6, it doesn't support std::underlying_type.
>>>
>>>
 The options are:
 - drop support for precise in trunk. We claim to need gcc 4.8 anyway
>>>
>>> I am confused: If GCC v4.8 is required, then why are you asking about a
>>> Ubuntu release that comes with GCC v4.6? Does it imply that we were only
>>> pretending to require GCC v4.8 and now may actually have to start
>>> requiring it?
> 
> 
>> My thoughts almost the same.
>>
>> The published "requirement" I put up was:
>> "
>> This series of Squid requires a C++11 capable compiler. The currently
>> known compilers which meet this criteria and build Squid reliably are
>> GCC 4.9+, Clang 3.5+, and Intel CC 12.0+
>> "
>>
>> So its not even 4.8, more of a soft-ish 4.9+.
> 
> I was under impression that we have promised GCC 4.8 support for Squid
> v4.0.

I dont recalla promise for v4. I did promise C++03 support would stay
for v3.5. I'm trying for maintenance support as long as possible of that
version, but no promise since I can't actually guarantee it will be
possible.


> Perhaps I am missing some deliberations with thoughtful
> justifications, but it feels like we are simply increasing the required
> GCC version number just because it is convenient for developers, without
> balancing admin and developer needs.

The admin "need" that keeps being put forward is stability. With the
meaning of "non-changing.". As in; nobody touches the Squid code from
now until 2020 or so.

We already provide versions of Squid that meet that criteria. They are
called version 3.0, 3.1, 3.2, 3.3, and 3.4. Depending on which year and
feature set the admin wants to use. They are supported by the distros
offering guarantees of non-change stability.



We are increasing it for several reasons;

One of which is that the world has already moved on to GCC and Clang
versions where C++11 is the default and actually C++14 the preferred
language now.
NP: That loosely includes Ubuntu and RHEL 7 whose current LTS supply
GCC-4.8 by default and better versions via "unofficial" packages.

Another important reason is the code safety features that are only
available in C++11.

Another is the code simplification which is only available in C++11.
That aids us a LOT with readability. But even more importantly
simplifies the code for attracting new developers.

Another is our decision to move custom algorithms to STL and std:: based
logic. It is all very well using that for performance, but the gains are
mostly through C++11 STL improvements. C++03 builds are somewhat *worse*
as a result.


Amos
___
squid-dev mailing list
squid-dev@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-dev


Re: [squid-dev] More woes with ubuntu-precise

2015-08-18 Thread Amos Jeffries
On 14/08/2015 3:29 a.m., Kinkie wrote:
> Hi,
>EnumIterator has brought out one more issue with ubuntu-precise: since
> it carries gcc-4.6, it doesn't support std::underlying_type.
> 
> The options are:
> - drop support for precise in trunk.

I've done this anyway to get trunk and snapshots building again after
Christos latest patch which uses the virtual "override" keyword Alex and
I both agreed we needed to start using.

I dont fancy the alternative of adding a blanket "#define override" for
old compilers. It could wipe out anything in the system headers.

Amos

___
squid-dev mailing list
squid-dev@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-dev


Re: [squid-dev] More woes with ubuntu-precise

2015-08-18 Thread Alex Rousskov
On 08/18/2015 02:11 AM, Amos Jeffries wrote:

> The admin "need" that keeps being put forward is stability. With the
> meaning of "non-changing.". As in; nobody touches the Squid code from
> now until 2020 or so.

Personally, I have not heard anything like that from any admin. The
requirements I have heard are more along the lines of "being able to
build the latest Squid release on a still-supported LTS" or "being able
to build trunk on the latest LTS". I am not saying we should necessarily
satisfy these requirements. I am only saying that they seem a lot more
"reasonable" to me than what you said is "being put forward".


> We are increasing it for several reasons;
> 
> One of which is that the world has already moved on to GCC and Clang
> versions where C++11 is the default and actually C++14 the preferred
> language now.

This is one of those convenient (for developers!) vague "reasons" that
does not define any real boundaries or commitments. As in "we require
whatever we feel is reasonable". I am not saying we must have a policy.
Just that we should not pretend that we have it, when our version
selection decision is based on the ever-present "the world has moved
on", "code safety", and "code simplification" reasons.

Instead, whenever somebody asks what GCC version will be required to
build 4.0, we can just tell them to look it up on the wiki page, but
warn them not to expect the answer to be the same tomorrow [until 4.0 is
actually released].


> NP: That loosely includes Ubuntu and RHEL 7 whose current LTS supply
> GCC-4.8 by default and better versions via "unofficial" packages.

Current Ubuntu LTS releases include 12.04 which ships GCC v4.6 by
default AFAIK: https://wiki.ubuntu.com/Releases


To summarize, for v4.0, do we require GCC v4.8 or do we require GCC
v4.9? Or is it more like "we require whatever it takes to compile at the
time of the first official release"? Our RoadMap wiki page says 4.9 but
4.8 crops up very often in this thread as being also supported,
confusing things.


Thank you,

Alex.

___
squid-dev mailing list
squid-dev@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-dev