[MacPorts] #55014: py35-poppler-qt4 @0.24.0_1: error: ordered comparison between pointer and zero

MacPorts noreply at macports.org
Sat Oct 21 01:51:53 UTC 2017


#55014: py35-poppler-qt4 @0.24.0_1: error: ordered comparison between pointer and
zero
-----------------------------+------------------------
  Reporter:  avysk           |      Owner:  dliessi
      Type:  defect          |     Status:  assigned
  Priority:  Normal          |  Milestone:
 Component:  ports           |    Version:
Resolution:                  |   Keywords:  highsierra
      Port:  py-poppler-qt4  |
-----------------------------+------------------------

Comment (by mneilly):

 I'm not familiar with CPython but from what I see PyList_SET_ITEM is a
 macro that does not return a value while PyList_SetItem is a function that
 potentially returns -1. This looks like an error in types.sip in that
 PyList_SetItem appears to be what should have been used.

 I've been able to get the py-poppler-qt5 port to compile and install by
 modifying
 /opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/python
 /py-poppler-qt5/files/patch-fix-qt-dirs.diff as follows:

 {{{
 --- setup.py
 +++ setup.py
 @@ -137,10 +137,10 @@ class build_ext(build_ext_base):
          build_ext_base.initialize_options(self)
          self.poppler_version = None

 -        self.qmake_bin = 'qmake'
 +        self.qmake_bin = '%%QMAKE%%'

          self.qt_include_dir = None
 -        self.pyqt_sip_dir = None
 +        self.pyqt_sip_dir = '%%PYQTSIPDIR%%'
          self.pyqt_sip_flags = None

      def finalize_options (self):
 @@ -382,6 +382,6 @@

  project['cmdclass']['build_ext'] = build_ext
  setup(
 -    ext_modules = [Extension("popplerqt5", ["poppler-qt5.sip"],
 **ext_args)],
 +    ext_modules = [Extension("popplerqt5", ["poppler-qt5.sip"],
 extra_compile_args=["-std=c++11"], **ext_args)],
      **project
  )
 --- types.sip
 +++ types.sip
 @@ -27,7 +27,7 @@
      foreach (Poppler::Document::RenderBackend value, set)
      {
          PyObject *obj = PyLong_FromLong ((long) value);
 -        if (obj == NULL || PyList_SET_ITEM (l, i, obj) < 0)
 +        if (obj == NULL || PyList_SetItem (l, i, obj) < 0)
          {
              Py_DECREF(l);
 }}}

--
Ticket URL: <https://trac.macports.org/ticket/55014#comment:5>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list