Bug 216253 - devel/py-pykde4: fails to build with clang 4.0
Summary: devel/py-pykde4: fails to build with clang 4.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: kde
URL:
Keywords: needs-patch
Depends on:
Blocks: 216008
  Show dependency treegraph
 
Reported: 2017-01-19 05:01 UTC by Jan Beich
Modified: 2017-01-31 00:04 UTC (History)
1 user (show)

See Also:
tcberner: maintainer-feedback+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer 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 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 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 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 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 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 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