Bug 236217 - graphics/dspdfviewer: fails to build with clang 8
Summary: graphics/dspdfviewer: fails to build with clang 8
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: freebsd-kde (group)
URL:
Keywords: needs-patch
Depends on:
Blocks: 236062
  Show dependency treegraph
 
Reported: 2019-03-04 13:59 UTC by Jan Beich
Modified: 2019-03-07 04:16 UTC (History)
4 users (show)

See Also:
santhosh.raju: maintainer-feedback+
tcberner: maintainer-feedback+


Attachments
v0 (moc) (5.37 KB, patch)
2019-03-04 19:23 UTC, Jan Beich
no flags Details | Diff
v0 (moc) (5.29 KB, patch)
2019-03-04 19:27 UTC, Jan Beich
jbeich: maintainer-approval? (kde)
Details | Diff
Build fix for dspdfviewer in clang 8.0.0 (692 bytes, patch)
2019-03-05 09:41 UTC, Santhosh Raju
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer freebsd_triage 2019-03-04 13:59:46 UTC
$ poudriere jail -cj clang8 -v projects/clang800-import -m svn+https
$ poudriere testport -j clang8 graphics/dspdfviewer
[...]
../dspdfviewer.cpp:311:48: error: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Werror,-Wextra-semi-stmt]
  QSize newSize = window.getPreviewImageSize();;
                                               ^
In file included from libdspdfviewer_autogen/mocs_compilation.cpp:7:
libdspdfviewer_autogen/EWIEGA46WW/moc_runtimeconfiguration.cpp:59:17: error: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Werror,-Wextra-semi-stmt]
    Q_UNUSED(_o);
                ^
libdspdfviewer_autogen/EWIEGA46WW/moc_runtimeconfiguration.cpp:60:18: error: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Werror,-Wextra-semi-stmt]
    Q_UNUSED(_id);
                 ^
libdspdfviewer_autogen/EWIEGA46WW/moc_runtimeconfiguration.cpp:61:17: error: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Werror,-Wextra-semi-stmt]
    Q_UNUSED(_c);
                ^
libdspdfviewer_autogen/EWIEGA46WW/moc_runtimeconfiguration.cpp:62:17: error: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Werror,-Wextra-semi-stmt]
    Q_UNUSED(_a);
                ^

http://package18.nyi.freebsd.org/data/headamd64PR236062-default/2019-03-01_06h42m53s/logs/errors/dspdfviewer-1.15.1_11.log
Comment 1 Jan Beich freebsd_committer freebsd_triage 2019-03-04 14:01:03 UTC
KDE Team, is it possible to avoid terminating semicolon with Q_UNUSED() ?
Comment 2 Jan Beich freebsd_committer freebsd_triage 2019-03-04 14:02:56 UTC
Or maybe Q_UNUSED lines can be elided. Alas, I'm not familar with MOC.
Comment 3 Tobias C. Berner freebsd_committer freebsd_triage 2019-03-04 18:07:04 UTC
(In reply to Jan Beich from comment #2)
Shouldn't the semicolon after Q_UNUSED just be patched away, that should work just fine.
Comment 4 Jan Beich freebsd_committer freebsd_triage 2019-03-04 19:07:11 UTC
Q_UNUSED lines are generated by MOC. Are you suggesting to patch this port using REINPLACE_CMD via post-configure or patch MOC (in qt5-buildtools) itself?
Comment 5 Jan Beich freebsd_committer freebsd_triage 2019-03-04 19:23:56 UTC
Created attachment 202557 [details]
v0 (moc)

Let's take a stab at qt5-buildtools then. Q_UNUSED is mainly generated by moc but it seems there're traces elsewhere.
Comment 6 commit-hook freebsd_committer freebsd_triage 2019-03-04 19:25:54 UTC
A commit references this bug:

Author: jbeich
Date: Mon Mar  4 19:24:52 UTC 2019
New revision: 494635
URL: https://svnweb.freebsd.org/changeset/ports/494635

Log:
  graphics/dspdfviewer: partially unbreak with Clang 8

  ../dspdfviewer.cpp:311:48: error: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Werror,-Wextra-semi-stmt]
    QSize newSize = window.getPreviewImageSize();;
                                                 ^

  PR:		236217
  Approved by:	portmgr blanket

Changes:
  head/graphics/dspdfviewer/files/patch-dspdfviewer.cpp
Comment 7 Jan Beich freebsd_committer freebsd_triage 2019-03-04 19:27:55 UTC
Created attachment 202558 [details]
v0 (moc)

Pacify portlint via "make makepatch".
Comment 8 Jan Beich freebsd_committer freebsd_triage 2019-03-04 23:31:09 UTC
Reminder: Clang 8 was merged to 13.0-CURRENT in base r344779. Maintainers, expect pkg-fallout@ mail soon.
Comment 9 Santhosh Raju 2019-03-05 09:41:37 UTC
Created attachment 202575 [details]
Build fix for dspdfviewer in clang 8.0.0

I have added a patch which fixes the build for 13-CURRENT with Clang v8.0.0.

This should fix the build and prevent pkg-fallout@ mails for graphics/dspdfviewer.

Let me know if this works.
Comment 10 commit-hook freebsd_committer freebsd_triage 2019-03-07 04:15:43 UTC
A commit references this bug:

Author: philip
Date: Thu Mar  7 04:15:18 UTC 2019
New revision: 494877
URL: https://svnweb.freebsd.org/changeset/ports/494877

Log:
  graphics/dspdfviewer: buildfix fox clang 8.0.0

  PR:		236217
  Submitted by:	Santhosh Raju <santhosh.raju@gmail.com> (maintainer)

Changes:
  head/graphics/dspdfviewer/Makefile