Bug 216356 - devel/py-ice: fails to build with clang 4.0
Summary: devel/py-ice: 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: freebsd-ports-bugs (Nobody)
URL:
Keywords: needs-patch
Depends on:
Blocks: 216008
  Show dependency treegraph
 
Reported: 2017-01-21 19:13 UTC by Jan Beich
Modified: 2017-01-31 00:04 UTC (History)
4 users (show)

See Also:
bugzilla: maintainer-feedback? (freebsd)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer freebsd_triage 2017-01-21 19:13:40 UTC
Operation.cpp:1685:70: error: ordered comparison between pointer and zero ('PyObject *' (aka '_object *') and 'int')
                if(PyTuple_SET_ITEM(results.get(), info->pos, Unset) < 0)
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
Operation.cpp:2549:75: error: ordered comparison between pointer and zero ('PyObject *' (aka '_object *') and 'int')
        if(PyTuple_SET_ITEM(result.get(), 0, ok ? incTrue() : incFalse()) < 0)
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
Operation.cpp:2589:56: error: ordered comparison between pointer and zero ('PyObject *' (aka '_object *') and 'int')
        if(PyTuple_SET_ITEM(result.get(), 1, op.get()) < 0)
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
Operation.cpp:2830:73: error: ordered comparison between pointer and zero ('PyObject *' (aka '_object *') and 'int')
        if(PyTuple_SET_ITEM(args.get(), 0, ok ? incTrue() : incFalse()) < 0)
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
Operation.cpp:2870:54: error: ordered comparison between pointer and zero ('PyObject *' (aka '_object *') and 'int')
        if(PyTuple_SET_ITEM(args.get(), 1, op.get()) < 0)
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
Operation.cpp:2913:73: error: ordered comparison between pointer and zero ('PyObject *' (aka '_object *') and 'int')
        if(PyTuple_SET_ITEM(args.get(), 0, ok ? incTrue() : incFalse()) < 0)
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
Operation.cpp:2961:54: error: ordered comparison between pointer and zero ('PyObject *' (aka '_object *') and 'int')
        if(PyTuple_SET_ITEM(args.get(), 1, op.get()) < 0)
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
Operation.cpp:3129:73: error: ordered comparison between pointer and zero ('PyObject *' (aka '_object *') and 'int')
        if(PyTuple_SET_ITEM(args.get(), 0, ok ? incTrue() : incFalse()) < 0)
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
Operation.cpp:3177:54: error: ordered comparison between pointer and zero ('PyObject *' (aka '_object *') and 'int')
        if(PyTuple_SET_ITEM(args.get(), 1, op.get()) < 0)
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
Operation.cpp:3305:80: error: ordered comparison between pointer and zero ('PyObject *' (aka '_object *') and 'int')
                    if(PyTuple_SET_ITEM(args.get(), info->pos + offset, Unset) < 0)
                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
Operation.cpp:3332:83: error: ordered comparison between pointer and zero ('PyObject *' (aka '_object *') and 'int')
    if(PyTuple_SET_ITEM(args.get(), PyTuple_GET_SIZE(args.get()) - 1, curr.get()) < 0)
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
Operation.cpp:3350:60: error: ordered comparison between pointer and zero ('PyObject *' (aka '_object *') and 'int')
        if(PyTuple_SET_ITEM(args.get(), 0, (PyObject*)obj) < 0) // PyTuple_SET_ITEM steals a reference.
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
Operation.cpp:3701:54: error: ordered comparison between pointer and zero ('PyObject *' (aka '_object *') and 'int')
    if(PyTuple_SET_ITEM(args.get(), start, ip.get()) < 0)
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
Operation.cpp:3713:56: error: ordered comparison between pointer and zero ('PyObject *' (aka '_object *') and 'int')
    if(PyTuple_SET_ITEM(args.get(), start, curr.get()) < 0)
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
Operation.cpp:3733:60: error: ordered comparison between pointer and zero ('PyObject *' (aka '_object *') and 'int')
        if(PyTuple_SET_ITEM(args.get(), 0, (PyObject*)obj) < 0) // PyTuple_SET_ITEM steals a reference.
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~

build log: http://sprunge.us/aUGD
regressed by: https://github.com/llvm-mirror/clang/commit/4b6ad14285f3
Comment 1 Jan Beich freebsd_committer freebsd_triage 2017-01-21 19:14:33 UTC
The fix here would probably be similar to bug 216253.
Comment 2 commit-hook freebsd_committer freebsd_triage 2017-01-29 21:40:07 UTC
A commit references this bug:

Author: grembo
Date: Sun Jan 29 21:39:30 UTC 2017
New revision: 432801
URL: https://svnweb.freebsd.org/changeset/ports/432801

Log:
  Allow building devel/py-ice with clang 4.0, based on bug report

  Tested that this still builds fine using previous versions of clang,
  didn't bump revision, as there is no functional change and it's
  a build time error.

  PR:		216356
  Reported by:	jbeich

Changes:
  head/devel/ice/files/patch-python-modules-IcePy-Operation.cpp
Comment 3 Michael Gmelin freebsd_committer freebsd_triage 2017-01-29 21:51:43 UTC
I committed an updated version of the master port that fixes that specific issue (which seems like a general bug in how the API is used), also opened a pull request upstream[0].

I don't have the resources to test using clang 4.0 myself right now, so it would be great if you could give it a try and let me know if there are additional issues.

[0] https://github.com/zeroc-ice/ice/pull/15
Comment 4 Jan Beich freebsd_committer freebsd_triage 2017-01-30 02:48:27 UTC
Not enough to unbreak with Clang 4.0 but I haven't tried base r312967 yet. Dimitry, do you see the error as well?

/usr/local/bin/python2.7 ../config/s2py.py --prefix Ice_ --no-package -I../../slice --ice ../../slice/Ice/BuiltinSequences.ice
Traceback (most recent call last):
  File "../config/s2py.py", line 22, in <module>
    import IcePy
ImportError: ../config/../python/IcePy.so: Undefined symbol "_ZN7IceUtil4TimeC1Ex"

build log: http://slexy.org/view/s20b7hOcqz
Comment 5 Dimitry Andric freebsd_committer freebsd_triage 2017-01-30 14:40:06 UTC
(In reply to Jan Beich (mail not working) from comment #4)
> Not enough to unbreak with Clang 4.0 but I haven't tried base r312967 yet.
> Dimitry, do you see the error as well?
> 
> /usr/local/bin/python2.7 ../config/s2py.py --prefix Ice_ --no-package
> -I../../slice --ice ../../slice/Ice/BuiltinSequences.ice
> Traceback (most recent call last):
>   File "../config/s2py.py", line 22, in <module>
>     import IcePy
> ImportError: ../config/../python/IcePy.so: Undefined symbol
> "_ZN7IceUtil4TimeC1Ex"
> 
> build log: http://slexy.org/view/s20b7hOcqz

No, for me it builds fine, with installing Ice-3.6.3_1 (ports head as of r432840), and py27-Ice-3.6.3_1 then also installs without issue.
Comment 6 Jan Beich freebsd_committer freebsd_triage 2017-01-30 16:55:21 UTC
(In reply to Dimitry Andric from comment #5)
I'm on base r312968 amd64 now, after removing existing packages the issue still occurs. Moving to bug 216609 since it's no longer related to Clang 4.0, this port builds fine with old libc++.