[squid-dev] bizarre build behaviour from PoolingAllocator on OpenBSD/clang

Alex Rousskov rousskov at measurement-factory.com
Mon Aug 16 19:37:23 UTC 2021

On 8/16/21 10:44 AM, Alex Rousskov wrote:
> On 8/16/21 7:29 AM, Stuart Henderson wrote:
>> -c .../src/log/access_log.cc -fPIC -DPIC -o .libs/access_log.o
>> In file included from .../src/log/access_log.cc:12:
>> In file included from .../src/AccessLogEntry.h:19:
>> In file included from .../src/HttpHeader.h:13:
>> In file included from .../src/base/LookupTable.h:15:
>> /usr/include/c++/v1/unordered_map:857:5: error: static_assert failed
>> due to requirement 'is_same<std::__1::pair<const SBuf, unsigned long
>> long>, std::__1::pair<uf, unsigned long long>>::value' "Invalid
>> allocator::value_type"
>>     static_assert((is_same<value_type, typename allocator_type::value_type>::value),
>>     ^              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Yes, that could be the smoking gun missing from the earlier error log,
> thank you, Stuart!
> Francesco, can you reproduce the same false is_same<> result using a toy
> example? You might not even need Squid-specific types.
> If you can reproduce it, is the result valid/expected or is that a clang
> bug?

BTW, since LookupTable.h was mentioned in the above error, I think it
might be important to mention that the unordered_map declaration in that
file (lookupTable_t) is probably buggy because it is missing the custom
equality operator. I have recently discovered that bug but did not have
the time to properly report or address it.

BTW, LookupTable.h is unrelated to PoolingAllocator -- lookupTable_t
does not pool (yet?).



More information about the squid-dev mailing list