Bug 216468 - textproc/pugixml causes inconsistencies with c++11 and later
Summary: textproc/pugixml causes inconsistencies with c++11 and later
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: Thomas Zander
URL:
Keywords:
Depends on:
Blocks: 216445
  Show dependency treegraph
 
Reported: 2017-01-25 22:37 UTC by Thomas Zander
Modified: 2017-01-31 19:38 UTC (History)
1 user (show)

See Also:
ybungalobill: maintainer-feedback+
riggs: merge-quarterly?


Attachments
Enable c++11 on pugixml (494 bytes, text/plain)
2017-01-25 22:37 UTC, Thomas Zander
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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