Bug 216253

Summary: devel/py-pykde4: fails to build with clang 4.0
Product: Ports & Packages Reporter: Jan Beich <jbeich>
Component: Individual Port(s)Assignee: freebsd-kde (group) <kde>
Status: Closed FIXED    
Severity: Affects Only Me CC: tcberner
Priority: --- Keywords: needs-patch
Version: LatestFlags: tcberner: 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=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=216228
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=216019
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=216632
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216629
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216631
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216630
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216627
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    

Description Jan Beich freebsd_committer freebsd_triage 2017-01-19 05:01:38 UTC
sip/solid/predicate.sip:115: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/QUSZ
regressed by: https://github.com/llvm-mirror/clang/commit/4b6ad14285f3
Comment 1 Tobias C. Berner freebsd_committer freebsd_triage 2017-01-19 12:46:51 UTC
Adriaan is looking at this (and similiar failures elsewhere in pykde4). 

https://docs.python.org/2/c-api/list.html [Probably _SetItem wanted instead of _SET_ITEM]
Comment 2 commit-hook freebsd_committer freebsd_triage 2017-01-20 12:20:31 UTC
A commit references this bug:

Author: tcberner
Date: Fri Jan 20 12:20:15 UTC 2017
New revision: 431949
URL: https://svnweb.freebsd.org/changeset/ports/431949

Log:
  Fix py-pykde4 against newest clang

  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.

  As the produced code may be changed by this, bump PORTREVISION.

  PR:		216253
  Submitted by:	Adriaan de Groot <groot@kde.org>
  Reported by:	jbeich
  Reviewed by:	rakuco, tcberner
  Approved by:	rakuco (mentor)
  Differential Revision:	https://reviews.freebsd.org/D9253

Changes:
  head/devel/py-pykde4/Makefile
  head/devel/py-pykde4/files/patch-sip_phonon_abstractvideodataoutput.sip
  head/devel/py-pykde4/files/patch-sip_solid_powermanagement.sip
  head/devel/py-pykde4/files/patch-sip_solid_predicate.sip
Comment 3 Jan Beich freebsd_committer freebsd_triage 2017-01-20 12:44:01 UTC
Tobias, can you request MFH to 2017Q1? This looks like a regular bugfix but has a slight risk if some consumers rely on the broken behavior.
Comment 4 Tobias C. Berner freebsd_committer freebsd_triage 2017-01-20 19:48:01 UTC
(In reply to Jan Beich (mail not working) from comment #3)
will do
Comment 5 commit-hook freebsd_committer freebsd_triage 2017-01-21 12:19:05 UTC
A commit references this bug:

Author: tcberner
Date: Sat Jan 21 12:18:25 UTC 2017
New revision: 432026
URL: https://svnweb.freebsd.org/changeset/ports/432026

Log:
  MFH: r431949

  Fix py-pykde4 against newest clang

  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.

  As the produced code may be changed by this, bump PORTREVISION.

  PR:		216253
  Submitted by:	Adriaan de Groot <groot@kde.org>
  Reported by:	jbeich
  Reviewed by:	rakuco, tcberner
  Approved by:	rakuco (mentor)
  Differential Revision:	https://reviews.freebsd.org/D9253

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

Changes:
_U  branches/2017Q1/
  branches/2017Q1/devel/py-pykde4/Makefile
  branches/2017Q1/devel/py-pykde4/files/patch-sip_phonon_abstractvideodataoutput.sip
  branches/2017Q1/devel/py-pykde4/files/patch-sip_solid_powermanagement.sip
  branches/2017Q1/devel/py-pykde4/files/patch-sip_solid_predicate.sip
Comment 6 commit-hook freebsd_committer freebsd_triage 2017-01-21 12:19:07 UTC
A commit references this bug:

Author: tcberner
Date: Sat Jan 21 12:18:25 UTC 2017
New revision: 432026
URL: https://svnweb.freebsd.org/changeset/ports/432026

Log:
  MFH: r431949

  Fix py-pykde4 against newest clang

  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.

  As the produced code may be changed by this, bump PORTREVISION.

  PR:		216253
  Submitted by:	Adriaan de Groot <groot@kde.org>
  Reported by:	jbeich
  Reviewed by:	rakuco, tcberner
  Approved by:	rakuco (mentor)
  Differential Revision:	https://reviews.freebsd.org/D9253

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

Changes:
_U  branches/2017Q1/
  branches/2017Q1/devel/py-pykde4/Makefile
  branches/2017Q1/devel/py-pykde4/files/patch-sip_phonon_abstractvideodataoutput.sip
  branches/2017Q1/devel/py-pykde4/files/patch-sip_solid_powermanagement.sip
  branches/2017Q1/devel/py-pykde4/files/patch-sip_solid_predicate.sip