Bug 216228

Summary: graphics/py-poppler-qt4: fails to build with clang 4.0
Product: Ports & Packages Reporter: Jan Beich <jbeich>
Component: Individual Port(s)Assignee: Tobias C. Berner <tcberner>
Status: Closed FIXED    
Severity: Affects Only Me CC: kde, martin.dieringer, tcberner
Priority: --- Keywords: needs-patch
Version: LatestFlags: martin.dieringer: maintainer-feedback+
Hardware: Any   
OS: Any   
See Also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216016
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=215861
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216015
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216046
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216051
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216052
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216056
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216058
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216019
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216072
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216074
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216075
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216076
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216159
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216176
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216194
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216197
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216198
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216199
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216200
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216203
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216206
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216211
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216213
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216214
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216215
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216216
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216217
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216218
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216221
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216222
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216227
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216233
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216234
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216235
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216253
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216354
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216355
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216356
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216357
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216358
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216615
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216617
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216618
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216619
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216620
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216621
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216622
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216623
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216624
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216626
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216627
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216629
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216630
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216631
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216632
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216633
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216634
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216635
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216636
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216637
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216638
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216639
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216640
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216641
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216642
Bug Depends on:    
Bug Blocks: 216008    
Attachments:
Description Flags
proposed fix: PyList_SET_ITEM -> PyList_SetItem none

Description Jan Beich freebsd_committer freebsd_triage 2017-01-18 11:52:15 UTC
types.sip:30:56: error: ordered comparison between pointer and zero ('PyObject *' (aka '_object *') and 'int')
        if (obj == NULL || PyList_SET_ITEM (l, i, obj) < 0)
                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~

build log: http://sprunge.us/hgJC
regressed by: https://github.com/llvm-mirror/clang/commit/4b6ad14285f3
Comment 1 Jan Beich freebsd_committer freebsd_triage 2017-01-21 03:32:16 UTC
The fix here would probably be similar to bug 216253.
Comment 2 Tobias C. Berner freebsd_committer freebsd_triage 2017-01-21 07:25:31 UTC
Created attachment 179176 [details]
proposed fix: PyList_SET_ITEM -> PyList_SetItem
Comment 3 Jan Beich freebsd_committer freebsd_triage 2017-01-21 20:46:31 UTC
Comment on attachment 179176 [details]
proposed fix: PyList_SET_ITEM -> PyList_SetItem

Looks OK and builds fine[1]. Can you land under "portmgr blanket" as a maintainer approval? Also add "MFH: 2017Q1" to commit message.

[1] 10.3 i386: http://sprunge.us/NETT
    /projects/clang400-import i386: http://sprunge.us/JjTD
Comment 4 commit-hook freebsd_committer freebsd_triage 2017-01-21 22:11:35 UTC
A commit references this bug:

Author: tcberner
Date: Sat Jan 21 22:10:43 UTC 2017
New revision: 432089
URL: https://svnweb.freebsd.org/changeset/ports/432089

Log:
  Fix graphics/py-poppler-qt4: fails to build with clang 4.0

    PyList_SET_ITEM() is supposed to be void, but as a macro it's an
    expression and has a pointer value. Clang 4.0 trips on the bogus
    pointer comparison; given the comparison, it should be PyList_SetItem()
    which returns -1 on failure.

  PR:		216228
  Approved by:	portmgr blanket, rakuco (mentor)
  MFH:		2017Q1

Changes:
  head/graphics/py-poppler-qt4/Makefile
  head/graphics/py-poppler-qt4/files/
  head/graphics/py-poppler-qt4/files/patch-types.sip
Comment 5 martin.dieringer 2017-01-22 21:13:46 UTC
Still compiles with clang 3.9.1 so fix should be ok ...
Comment 6 commit-hook freebsd_committer freebsd_triage 2017-01-23 20:41:10 UTC
A commit references this bug:

Author: tcberner
Date: Mon Jan 23 20:40:08 UTC 2017
New revision: 432289
URL: https://svnweb.freebsd.org/changeset/ports/432289

Log:
  MFH: r432089

  Fix graphics/py-poppler-qt4: fails to build with clang 4.0

    PyList_SET_ITEM() is supposed to be void, but as a macro it's an
    expression and has a pointer value. Clang 4.0 trips on the bogus
    pointer comparison; given the comparison, it should be PyList_SetItem()
    which returns -1 on failure.

  PR:		216228
  Approved by:	portmgr blanket, rakuco (mentor)

  Approved by:	ports-secteam (junovitch), rakuco (mentor)

Changes:
_U  branches/2017Q1/
  branches/2017Q1/graphics/py-poppler-qt4/Makefile
  branches/2017Q1/graphics/py-poppler-qt4/files/