Bug 230960 - emulators/kcemu: Fix build with Clang 6
Summary: emulators/kcemu: Fix build with Clang 6
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: http://beefy11.nyi.freebsd.org/data/h...
Keywords:
Depends on:
Blocks:
 
Reported: 2018-08-27 20:33 UTC by Tobias Kortkamp
Modified: 2018-09-10 15:23 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (hardy.schumacher)


Attachments
emulators__kcemu.diff (3.41 KB, patch)
2018-08-27 20:33 UTC, Tobias Kortkamp
no flags Details | Diff
emulators__kcemu.diff v2 (322 bytes, patch)
2018-08-27 20:43 UTC, Tobias Kortkamp
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Kortkamp freebsd_committer freebsd_triage 2018-08-27 20:33:30 UTC
The build fails with Clang 6 and soon the port will be marked as
BROKEN on 12.0 and 11.2 if we do not act.

The problem is that Clang 6 has switched to C++14 by default over
C++98 (see [1]) causing all sorts of regressions.  Often this can
easily be fixed by applying a small amount of trivial patches.

We can apply them to the ports tree but if possible (and assuming
upstream development has not ceased), they should be upstreamed to
reduce future maintainance work.

[1] http://releases.llvm.org/6.0.0/tools/clang/docs/ReleaseNotes.html#c-language-changes-in-clang
Comment 1 Tobias Kortkamp freebsd_committer freebsd_triage 2018-08-27 20:33:47 UTC
Created attachment 196615 [details]
emulators__kcemu.diff
Comment 2 Tobias Kortkamp freebsd_committer freebsd_triage 2018-08-27 20:43:34 UTC
Created attachment 196616 [details]
emulators__kcemu.diff v2

Sorry, original patch was bad and causes build failures on 10.4 and 11.1.
Let's do it another way.
Comment 3 commit-hook freebsd_committer freebsd_triage 2018-09-10 15:23:32 UTC
A commit references this bug:

Author: tobik
Date: Mon Sep 10 15:23:21 UTC 2018
New revision: 479431
URL: https://svnweb.freebsd.org/changeset/ports/479431

Log:
  emulators/kcemu: Fix build with Clang 6

  n file included from plotter.cc:26:
  ../../../include/kc/plotter.h:31:23: error: in-class initializer for static data member of type 'const double' requires 'constexpr' specifier [-Wstatic-float-init]
    static const double WIDTH_MM = 210.0;
                        ^          ~~~~~

  http://beefy12.nyi.freebsd.org/data/head-amd64-default/p479076_s338486/logs/errors/kcemu-0.5.1_15.log

  PR:		230960
  Approved by:	hardy.schumacher@gmx.de (maintainer timeout, 2 weeks)

Changes:
  head/emulators/kcemu/Makefile