Bug 236210 - www/squid: fails to build with clang 8
Summary: www/squid: fails to build with clang 8
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Renato Botelho
URL:
Keywords: needs-patch
Depends on:
Blocks: 236062
  Show dependency treegraph
 
Reported: 2019-03-04 13:04 UTC by Jan Beich
Modified: 2019-04-12 20:26 UTC (History)
3 users (show)

See Also:
garga: maintainer-feedback+


Attachments
Fix www/squid build with clang 8 (1.23 KB, patch)
2019-03-07 20:12 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 Jan Beich freebsd_committer 2019-03-04 13:04:29 UTC
$ poudriere jail -cj clang8 -v projects/clang800-import -m svn+https
$ poudriere testport -j clang8 www/squid
[...]
In file included from old_api.cc:26:
In file included from ../../src/Store.h:15:
In file included from ../../src/CommRead.h:15:
In file included from ../../src/comm.h:13:
In file included from ../../src/CommCalls.h:16:
In file included from ../../src/MasterXaction.h:13:
In file included from ../../src/anyp/PortCfg.h:17:
../../src/security/ServerOptions.h:38:5: error: explicitly defaulted copy constructor is implicitly deleted [-Werror,-Wdefaulted-function-deleted]
    ServerOptions(const ServerOptions &) = default;
    ^
../../src/security/ServerOptions.h:110:29: note: copy constructor of 'ServerOptions' is implicitly deleted because field 'clientCaStack' has a deleted copy constructor
    X509_NAME_STACK_Pointer clientCaStack;
                            ^
/usr/include/c++/v1/memory:2494:3: note: copy constructor is implicitly deleted because 'unique_ptr<stack_st_X509_NAME, Security::ServerOptions::sk_X509_NAME_free_wrapper>' has a user-declared move constructor
  unique_ptr(unique_ptr&& __u) noexcept
  ^
1 error generated.

http://package18.nyi.freebsd.org/data/headamd64PR236062-default/2019-03-01_06h42m53s/logs/errors/squid-4.5.log
http://package18.nyi.freebsd.org/data/headamd64PR236062-default/2019-03-01_06h42m53s/logs/errors/squid-devel-4.0.25_3.log
Comment 1 Jan Beich freebsd_committer 2019-03-04 13:05:05 UTC
attachment 202434 [details] doesn't help, see https://ptpb.pw/x9Q_
Comment 2 Jan Beich freebsd_committer 2019-03-04 23:31:11 UTC
Reminder: Clang 8 was merged to 13.0-CURRENT in base r344779. Maintainers, expect pkg-fallout@ mail soon.
Comment 3 Dimitry Andric freebsd_committer 2019-03-07 20:12:25 UTC
Created attachment 202703 [details]
Fix www/squid build with clang 8

The fix is to delete the copy constructor, as it isn't used (and probably should not be used in any case.)  Patch attached.
Comment 4 timp87 2019-03-26 16:04:13 UTC
Comment on attachment 202703 [details]
Fix www/squid build with clang 8

maintainer-approval+
Comment 5 Renato Botelho freebsd_committer 2019-04-08 11:52:21 UTC
Approved by maintainer in comment 4
Comment 6 commit-hook freebsd_committer 2019-04-08 14:41:19 UTC
A commit references this bug:

Author: dim
Date: Mon Apr  8 14:40:18 UTC 2019
New revision: 498377
URL: https://svnweb.freebsd.org/changeset/ports/498377

Log:
  Fix build of www/squid and www/squid-devel with clang 8

  This fixes an error with a defaulted copy constructor:

  ../../src/security/ServerOptions.h:38:5: error: explicitly defaulted copy constructor is implicitly deleted [-Werror,-Wdefaulted-function-deleted]
      ServerOptions(const ServerOptions &) = default;
      ^
  ../../src/security/ServerOptions.h:110:29: note: copy constructor of 'ServerOptions' is implicitly deleted because field 'clientCaStack' has a deleted copy constructor
      X509_NAME_STACK_Pointer clientCaStack;
                              ^
  /usr/include/c++/v1/memory:2494:3: note: copy constructor is implicitly deleted because 'unique_ptr<stack_st_X509_NAME, Security::ServerOptions::sk_X509_NAME_free_wrapper>' has a user-declared move constructor
    unique_ptr(unique_ptr&& __u) noexcept
    ^

  The copy constructor can instead be deleted.

  Approved by:	timp87@gmail.com (maintainer)
  PR:		236210
  MFH:		2019Q2

Changes:
  head/www/squid/files/patch-src_security_ServerOptions.h
  head/www/squid-devel/files/patch-src_security_ServerOptions.h
Comment 7 commit-hook freebsd_committer 2019-04-12 20:26:24 UTC
A commit references this bug:

Author: dim
Date: Fri Apr 12 20:26:19 UTC 2019
New revision: 498742
URL: https://svnweb.freebsd.org/changeset/ports/498742

Log:
  MFH: r498377

  Fix build of www/squid and www/squid-devel with clang 8

  This fixes an error with a defaulted copy constructor:

  ../../src/security/ServerOptions.h:38:5: error: explicitly defaulted copy constructor is implicitly deleted [-Werror,-Wdefaulted-function-deleted]
      ServerOptions(const ServerOptions &) = default;
      ^
  ../../src/security/ServerOptions.h:110:29: note: copy constructor of 'ServerOptions' is implicitly deleted because field 'clientCaStack' has a deleted copy constructor
      X509_NAME_STACK_Pointer clientCaStack;
                              ^
  /usr/include/c++/v1/memory:2494:3: note: copy constructor is implicitly deleted because 'unique_ptr<stack_st_X509_NAME, Security::ServerOptions::sk_X509_NAME_free_wrapper>' has a user-declared move constructor
    unique_ptr(unique_ptr&& __u) noexcept
    ^

  The copy constructor can instead be deleted.

  Approved by:	portmgr (joneum)
  PR:		236210

Changes:
_U  branches/2019Q2/
  branches/2019Q2/www/squid/files/patch-src_security_ServerOptions.h
  branches/2019Q2/www/squid-devel/files/patch-src_security_ServerOptions.h