Bug 224988 - games/iortcw: fails to build with clang 6.0
Summary: games/iortcw: fails to build with clang 6.0
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: Tobias Kortkamp
URL:
Keywords: needs-patch
Depends on:
Blocks: 224669
  Show dependency treegraph
 
Reported: 2018-01-08 11:43 UTC by Jan Beich
Modified: 2018-01-08 17:24 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer 2018-01-08 11:43:19 UTC
FreeBSD -CURRENT plans to update base Clang to 6.0.0 soon. While testing this port failed to build.

code/splines/util_str.cpp:477:11: error: reinterpret_cast from 'nullptr_t' to 'const char *' is not allowed
        idStr e( reinterpret_cast<const char *>( NULL ) );
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
code/splines/util_str.cpp:491:10: error: reinterpret_cast from 'nullptr_t' to 'const char *' is not allowed
        a = c + reinterpret_cast<const char *>( NULL );
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
code/splines/util_str.cpp:494:6: error: reinterpret_cast from 'nullptr_t' to 'const char *' is not allowed
        a = reinterpret_cast<const char *>( NULL ) + d;
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
code/splines/util_str.cpp:498:7: error: reinterpret_cast from 'nullptr_t' to 'const char *' is not allowed
        a += reinterpret_cast<const char *>( NULL );
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

To reproduce:
$ poudriere jail -cj clang6-amd64 -a amd64 -v projects/clang600-import -m svn+https
$ poudriere bulk -Ctj clang6-amd64 games/iortcw

http://package18.nyi.freebsd.org/data/headamd64PR224669-default/2018-01-02_08h32m49s/logs/errors/iortcw-1.51,1.log
http://package18.nyi.freebsd.org/data/headi386PR224669-default/2018-01-07_22h53m03s/logs/errors/iortcw-1.51,1.log
Comment 1 Jan Beich freebsd_committer 2018-01-08 11:44:39 UTC
Maybe use static_cast instead. NULL is promoted to nullptr by base r228918.
Comment 2 Tobias Kortkamp freebsd_committer 2018-01-08 17:24:04 UTC
Should be fixed now.
Comment 3 commit-hook freebsd_committer 2018-01-08 17:24:09 UTC
A commit references this bug:

Author: tobik
Date: Mon Jan  8 17:23:42 UTC 2018
New revision: 458458
URL: https://svnweb.freebsd.org/changeset/ports/458458

Log:
  games/iortcw: Fix build with clang 6.0

  code/splines/util_str.cpp:477:11: error: reinterpret_cast from 'nullptr_t' to
  'const char *' is not allowed
          idStr e( reinterpret_cast<const char *>( NULL ) );
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  code/splines/util_str.cpp:491:10: error: reinterpret_cast from 'nullptr_t' to
  'const char *' is not allowed
          a = c + reinterpret_cast<const char *>( NULL );
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  code/splines/util_str.cpp:494:6: error: reinterpret_cast from 'nullptr_t' to
  'const char *' is not allowed
          a = reinterpret_cast<const char *>( NULL ) + d;
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  code/splines/util_str.cpp:498:7: error: reinterpret_cast from 'nullptr_t' to
  'const char *' is not allowed
          a += reinterpret_cast<const char *>( NULL );
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  PR:		224988
  Reported by:	jbeich

Changes:
  head/games/iortcw/files/patch-clang6