Bug 219279 - graphics/animorph: fails to build with lang/gcc6 or later
Summary: graphics/animorph: fails to build with lang/gcc6 or 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: Raphael Kubo da Costa
URL:
Keywords:
Depends on:
Blocks: 219275
  Show dependency treegraph
 
Reported: 2017-05-14 17:44 UTC by Jan Beich
Modified: 2017-08-01 16:59 UTC (History)
3 users (show)

See Also:
rakuco: maintainer-feedback-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer freebsd_triage 2017-05-14 17:44:26 UTC
In file included from /usr/include/string.h:37:0,
                 from /usr/include/memory.h:34,
                 from xmlParser.cpp:104:
xmlParser.cpp: In function 'char* stringDup(const char*, int)':
xmlParser.cpp:464:36: error: cast from 'std::nullptr_t' to 'char' loses precision [-fpermissive]
         lpszNew[cbData] = (XMLCHAR)NULL;
                                    ^
gmake[3]: *** [Makefile:362: xmlParser.lo] Error 1

build log: http://sprunge.us/EHDf
Comment 1 commit-hook freebsd_committer freebsd_triage 2017-08-01 16:59:30 UTC
A commit references this bug:

Author: rakuco
Date: Tue Aug  1 16:58:58 UTC 2017
New revision: 447032
URL: https://svnweb.freebsd.org/changeset/ports/447032

Log:
  Explicitly build with -std=gnu++03.

  The port fails to build with C++11 and later. GCC 6 uses -std=gnu++14 by
  default, and fails like this:

  xmlParser.cpp: In function 'char* stringDup(const char*, int)':
  xmlParser.cpp:464:36: error: cast from 'std::nullptr_t' to 'char' loses precision [-fpermissive]
           lpszNew[cbData] = (XMLCHAR)NULL;

  Since this version of animorph is from 2007 and the code has completely changed
  upstream (it does not even use C++ anymore), there is little point in fixing
  the code instead of just making it build like it did before.

  PR:		219279
  Approved by:	portmgr (blanket approval)

Changes:
  head/graphics/animorph/Makefile