Bug 212432 - www/squid: Fix build with clang 3.9.0
Summary: www/squid: Fix build with clang 3.9.0
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Florian Smeets
URL:
Keywords:
Depends on:
Blocks: 212343
  Show dependency treegraph
 
Reported: 2016-09-06 21:16 UTC by Dimitry Andric
Modified: 2016-09-27 10:02 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (timp87)


Attachments
Adapted upstream revision 14776 to fix clang 3.9.0 and higher build (5.59 KB, patch)
2016-09-06 21:16 UTC, Dimitry Andric
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitry Andric freebsd_committer freebsd_triage 2016-09-06 21:16:05 UTC
Created attachment 174441 [details]
Adapted upstream revision 14776 to fix clang 3.9.0 and higher build

While testing the clang390-import branch, I ran into the following -Werror warnings when building www/squid:

In file included from TcpAcceptor.cc:15:
In file included from ../../src/comm/AcceptLimiter.h:12:
In file included from ../../src/comm/TcpAcceptor.h:13:
In file included from ../../src/base/AsyncJob.h:12:
In file included from ../../src/base/AsyncCall.h:12:
../../src/base/InstanceId.h:28:27: error: instantiation of variable 'InstanceId<MasterXaction>::Last' required here, but no definition is available [-Werror,-Wundefined-var-template]
    InstanceId(): value(++Last ? Last : ++Last) {}
                          ^
../../src/MasterXaction.h:36:7: note: in instantiation of member function 'InstanceId<MasterXaction>::InstanceId' requested here
class MasterXaction : public RefCountable
      ^
../../src/base/InstanceId.h:47:18: note: forward declaration of template entity is here
    static Value Last; ///< the last used ID value
                 ^
1 error generated.
*** [TcpAcceptor.lo] Error code 1

This has been fixed in upstream revision 14776 [1], by changing the implementation of the InstanceId template class.  The upstream change does not directly apply to squid 3.5.20, so I adapted it a little.

[1] http://bazaar.launchpad.net/~squid/squid/trunk/revision/14776
Comment 1 Pavel Timofeev 2016-09-12 19:15:45 UTC
Give me some time. I'll check it and try to convince upstream to backport it into 3.5 branch
Comment 2 Florian Smeets freebsd_committer freebsd_triage 2016-09-14 20:21:02 UTC
Take.
Comment 3 Pavel Timofeev 2016-09-15 14:50:36 UTC
Comment on attachment 174441 [details]
Adapted upstream revision 14776 to fix clang 3.9.0 and higher build

Feel free to commit it in case there is no news about official backporting.
Comment 4 Pavel Timofeev 2016-09-27 09:47:48 UTC
Comment on attachment 174441 [details]
Adapted upstream revision 14776 to fix clang 3.9.0 and higher build

Please, follow https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=212909
It includes all official patches including officially backported fix for clang 3.9.
Close this one.
Comment 5 Dimitry Andric freebsd_committer freebsd_triage 2016-09-27 10:02:30 UTC
Closed in favor of bug 212909.