# www/squid: Fails to build



## Angel Hess (Oct 18, 2015)

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...


```
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
```


----------



## talsamon (Oct 18, 2015)

Please, make an update request PR on https://bugs.freebsd.org/bugzilla/.
I tried it in the port with some changes in the Makefile and pkg-plist, and there it compiles fine  (Version 4.0.1).


----------



## Angel Hess (Oct 18, 2015)

talsamon said:


> Please, make an update request PR on https://bugs.freebsd.org/bugzilla/.
> I tried it in the port with some changes in the Makefile and pkg-plist, and there it compiles fine  (Version 4.0.1).


What wording should I use?


----------



## talsamon (Oct 18, 2015)

update request www/squid to  4.0.1 (or which version ever).
Here is the link to squid org: http://www.squid-cache.org/Versions/v4/.


----------



## cpm@ (Oct 18, 2015)

Please, take a look to this PR.

Add `-Wno-error=deprecated-declarations' to /usr/ports/www/squid/Makefile:357

```
.if ${COMPILER_VERSION} >= 35
CXXFLAGS+=      -Wno-undefined-bool-conversion -Wno-tautological-undefined-compare -Wno-dynamic-class-memaccess -Wno-error=deprecated-declarations
.endif
```


----------



## Angel Hess (Oct 18, 2015)

cpm said:


> Please, take a look to this PR.
> 
> Add `-Wno-error=deprecated-declarations' to /usr/ports/www/squid/Makefile:357
> 
> ...



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.


----------



## cpm@ (Oct 18, 2015)

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+


----------



## cpm@ (Oct 19, 2015)

Angel Hess,

I saw that you filed the PR 203860, please, change the title 'Squid 4.0.1 FreeBSD Install Error' to 'www/squid: Fails to build'.


----------



## cpm@ (Oct 19, 2015)

The following patch will fix this issue.

```
--- 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
{
```


----------

