www/squid: Fails to build

I assume Squid 4.0.1 has make errors because it was released just a few days ago? 4.0.1 also does not seem to be in the package install, only 3+ is in pkg(8) install. How long until it is usually in the pkg(8) install database? I tried the usual manual download, config, make, etc. And it seems to have errors on the " make", perhaps about 3/4 into the make, on a new FreeBSD 10.2-RELEASE. Please advise. Below is the error starting...

Code:
In file included from Elements.cc:14:
In file included from ../../src/HttpReply.h:14:
In file included from ../../src/HttpMsg.h:18:
In file included from ../../src/HttpHeader.h:13:
../../src/http/RegisteredHeaders.h:197:10: error: no type named 'vector' in namespace 'std'
    std::vector<const HeaderTableRecord *> idCache;
    ~~~~~^
../../src/http/RegisteredHeaders.h:197:16: error: expected member name or ';' after declaration specifiers
    std::vector<const HeaderTableRecord *> idCache;
    ~~~~~~~~~~~^
../../src/http/RegisteredHeaders.h:192:18: error: use of undeclared identifier 'idCache'
        return *(idCache[static_cast<int>(id)]);
                 ^
3 errors generated.
*** Error code 1

Stop.
make[3]: stopped in /usr/home/freebsd/squid-4.0.1/src/ftp
*** Error code 1

Stop.
make[2]: stopped in /usr/home/freebsd/squid-4.0.1/src
*** Error code 1

Stop.
make[1]: stopped in /usr/home/freebsd/squid-4.0.1/src
*** Error code 1

Stop.
make: stopped in /usr/home/freebsd/squid-4.0.1
 
Please, take a look to this PR.

Add `-Wno-error=deprecated-declarations' to /usr/ports/www/squid/Makefile:357
Code:
.if ${COMPILER_VERSION} >= 35
CXXFLAGS+=      -Wno-undefined-bool-conversion -Wno-tautological-undefined-compare -Wno-dynamic-class-memaccess -Wno-error=deprecated-declarations
.endif
 
Please, take a look to this PR.

Add `-Wno-error=deprecated-declarations' to /usr/ports/www/squid/Makefile:357
Code:
.if ${COMPILER_VERSION} >= 35
CXXFLAGS+=      -Wno-undefined-bool-conversion -Wno-tautological-undefined-compare -Wno-dynamic-class-memaccess -Wno-error=deprecated-declarations
.endif

Thanks. I understand things like this. But updating a uncompiled port to have current source in port dir I do not know how to do that manually at the moment. - I tried what you said with the downloaded copy and the port copy and did not get past the errors. Sorry.
 
Well, update a port is not so difficult. I will prepare a quick patch to fix that issue. Please, be patient :)

Note that those CXXFLAGS affect only to clang35+
 
The following patch will fix this issue.
Code:
--- src/http/RegisteredHeaders.h 2015-09-05 18:52:17 +0000
+++ src/http/RegisteredHeaders.h 2015-10-16 10:53:48 +0000
@@ -10,7 +10,9 @@
#define SQUID_HTTP_REGISTEREDHEADERS_H

#include "base/LookupTable.h"
+
#include <iosfwd>
+#include <vector>

namespace Http
{
 
Back
Top