Bug 240830 - www/squid: Fix build with libc++ 9
Summary: www/squid: Fix build with libc++ 9
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Steve Wills
Depends on:
Blocks: 240629
  Show dependency treegraph
Reported: 2019-09-26 06:01 UTC by Dimitry Andric
Modified: 2019-10-16 22:03 UTC (History)
1 user (show)

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

Fix squid build with libc++ 9 (451 bytes, patch)
2019-09-26 06:01 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 2019-09-26 06:01:16 UTC
Created attachment 207835 [details]
Fix squid build with libc++ 9

Because squid builds with -Werror, with libc++ 9 it errors out on deprecated classes from <functional>:

libtool: compile:  c++ -DHAVE_CONFIG_H -DDEFAULT_CONFIG_FILE=\"/usr/local/etc/squid/squid.conf\" -DDEFAULT_SQUID_DATA_DIR=\"/usr/local/etc/squid\" -DDEFAULT_SQUID_CONFIG_DIR=\"/usr/local/etc/squid\" -I../.. -I../../include -I../../lib -I../../src -I../../include -I/usr/include -I/usr/include -I../../libltdl -I/usr/include -I/usr/local/include -Werror -Qunused-arguments -Wno-deprecated-register -D_REENTRANT -I/usr/include -I/usr/include -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -I/usr/local/include -MT InnerNode.lo -MD -MP -MF .deps/InnerNode.Tpo -c InnerNode.cc  -fPIC -DPIC -o .libs/InnerNode.o
InnerNode.cc:24:52: error: 'mem_fun<void, ACL>' is deprecated [-Werror,-Wdeprecated-declarations]
    std::for_each(nodes.begin(), nodes.end(), std::mem_fun(&ACL::prepareForUse));
/usr/include/c++/v1/functional:1148:1: note: 'mem_fun<void, ACL>' has been explicitly marked deprecated here
/usr/include/c++/v1/__config:944:39: note: expanded from macro '_LIBCPP_DEPRECATED_IN_CXX11'
/usr/include/c++/v1/__config:933:48: note: expanded from macro '_LIBCPP_DEPRECATED'
#    define _LIBCPP_DEPRECATED __attribute__ ((deprecated))
1 error generated.

To fix this, allow it to continue even though the warnings are shown.  Ideally upstream should replace usage of deprecated functionality with C++11 equivalents, but I am unsure whether that is an upstream goal...
Comment 1 commit-hook freebsd_committer 2019-10-16 22:02:06 UTC
A commit references this bug:

Author: swills
Date: Wed Oct 16 22:02:02 UTC 2019
New revision: 514623
URL: https://svnweb.freebsd.org/changeset/ports/514623

  www/squid: Fix build with libc++ 9

  PR:		240830
  Submitted by:	dim
  Approved by:	maintainer timeout (timp87@gmail.com, >2 weeks)

Comment 2 Steve Wills freebsd_committer 2019-10-16 22:03:06 UTC
Committed, thanks!