[squid-dev] More woes with ubuntu-precise

Amos Jeffries squid3 at treenet.co.nz
Fri Aug 14 04:52:25 UTC 2015


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<enum>.
> 
> 
>> 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<Enum>::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



More information about the squid-dev mailing list