Bug 216468

Summary: textproc/pugixml causes inconsistencies with c++11 and later
Product: Ports & Packages Reporter: Thomas Zander <riggs>
Component: Individual Port(s)Assignee: Thomas Zander <riggs>
Status: Closed FIXED    
Severity: Affects Only Me CC: ybungalobill
Priority: --- Flags: ybungalobill: maintainer-feedback+
riggs: merge-quarterly?
Version: Latest   
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 216445    
Attachments:
Description Flags
Enable c++11 on pugixml none

Description Thomas Zander freebsd_committer freebsd_triage 2017-01-25 22:37:03 UTC
Created attachment 179316 [details]
Enable c++11 on pugixml

pugixml installs a bogus pugixml.hpp file that contains the following section:

...
                // Copy constructor/assignment operator
                xpath_node_set(const xpath_node_set& ns);
                xpath_node_set& operator=(const xpath_node_set& ns);

        #if __cplusplus >= 201103
                // Move semantics support
                xpath_node_set(xpath_node_set&& rhs);
                xpath_node_set& operator=(xpath_node_set&& rhs);
        #endif

...

Right now, pugixml is built without c++11 support. Subsequently, the resulting library does not contain this move constructor.

If a dependent port, however, is built with -std=c++11/14/1z, it will parse the pugixml.hpp header and erroneously assume that the pugixml.(a|so) contain the move constructor. Subsequently, the build will fail with a linker error.

Attached patch enables c++11 for the pugixml port and allow dependent ports with -std=c++11/14/1z to build again.
Comment 1 Yakov Galka 2017-01-26 08:39:16 UTC
I'm fine with that. Didn't even know it doesn't build with C++11 by default. If C++11 is supported on all currently supported FreeBSD releases, then why it's not the default?
Comment 2 commit-hook freebsd_committer freebsd_triage 2017-01-26 20:17:01 UTC
A commit references this bug:

Author: riggs
Date: Thu Jan 26 20:16:34 UTC 2017
New revision: 432538
URL: https://svnweb.freebsd.org/changeset/ports/432538

Log:
  Enable c++11 support: Fix dependent ports which require c++11 or later

  PR:		216468
  Submitted by:	riggs
  Approved by:	ybungalobill@gmail.com (maintainer)
  MFH:		2017Q1

Changes:
  head/textproc/pugixml/Makefile
Comment 3 commit-hook freebsd_committer freebsd_triage 2017-01-31 19:38:00 UTC
A commit references this bug:

Author: riggs
Date: Tue Jan 31 19:37:20 UTC 2017
New revision: 432944
URL: https://svnweb.freebsd.org/changeset/ports/432944

Log:
  MFH: r432538

  Enable c++11 support: Fix dependent ports which require c++11 or later

  PR:		216468
  Submitted by:	riggs
  Approved by:	ports-secteam (feld), ybungalobill@gmail.com (maintainer)

Changes:
_U  branches/2017Q1/
  branches/2017Q1/textproc/pugixml/Makefile