Bug 2083965 - libkdtree++ fails to build with Python 3.11: error: 'nullptr' was not declared in this scope
Summary: libkdtree++ fails to build with Python 3.11: error: 'nullptr' was not declare...
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: libkdtree++
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Eric Smith
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 2098737 (view as bug list)
Depends On:
Blocks: PYTHON3.11 F37FTBFS F37FailsToInstall
TreeView+ depends on / blocked
 
Reported: 2022-05-11 06:34 UTC by Tomáš Hrnčiar
Modified: 2022-07-15 11:54 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-07-15 11:54:25 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tomáš Hrnčiar 2022-05-11 06:34:51 UTC
libkdtree++ fails to build with Python 3.11.0b1.

In file included from /usr/include/python3.11/Python.h:38,
                 from py-kdtree_wrap.cxx:178:
/usr/include/python3.11/pyport.h:39:20: warning: identifier 'nullptr' is a keyword in C++11 [-Wc++11-compat]
   39 | #  define _Py_NULL nullptr
      |                    ^~~~~~~
/usr/include/python3.11/object.h:590:15: note: in expansion of macro '_Py_NULL'
  590 |     if (op != _Py_NULL) {
      |               ^~~~~~~~
In file included from /usr/include/python3.11/pymem.h:96,
                 from /usr/include/python3.11/Python.h:41:
/usr/include/python3.11/cpython/pymem.h:42:39: warning: comma at end of enumerator list [-Wpedantic]
   42 |     PYMEM_ALLOCATOR_PYMALLOC_DEBUG = 6,
      |                                       ^
/usr/include/python3.11/object.h: In function 'void Py_XINCREF(PyObject*)':
/usr/include/python3.11/pyport.h:39:20: error: 'nullptr' was not declared in this scope
   39 | #  define _Py_NULL nullptr
      |                    ^~~~~~~
/usr/include/python3.11/object.h:590:15: note: in expansion of macro '_Py_NULL'
  590 |     if (op != _Py_NULL) {
      |               ^~~~~~~~
/usr/include/python3.11/object.h: In function 'void Py_XDECREF(PyObject*)':
/usr/include/python3.11/pyport.h:39:20: error: 'nullptr' was not declared in this scope
   39 | #  define _Py_NULL nullptr
      |                    ^~~~~~~
/usr/include/python3.11/object.h:600:15: note: in expansion of macro '_Py_NULL'
  600 |     if (op != _Py_NULL) {
      |               ^~~~~~~~
In file included from /usr/include/python3.11/Python.h:44:
/usr/include/python3.11/object.h: At global scope:
/usr/include/python3.11/object.h:678:19: warning: comma at end of enumerator list [-Wpedantic]
  678 |     PYGEN_NEXT = 1,
      |                   ^
/usr/include/python3.11/cpython/unicodeobject.h: In function 'Py_ssize_t PyUnicode_GET_SIZE(PyObject*)':
/usr/include/python3.11/pyport.h:39:20: error: 'nullptr' was not declared in this scope
   39 | #  define _Py_NULL nullptr
      |                    ^~~~~~~
/usr/include/python3.11/cpython/unicodeobject.h:645:42: note: in expansion of macro '_Py_NULL'
  645 |     if (_PyASCIIObject_CAST(op)->wstr == _Py_NULL) {
      |                                          ^~~~~~~~
/usr/include/python3.11/cpython/unicodeobject.h: In function 'Py_UNICODE* PyUnicode_AS_UNICODE(PyObject*)':
/usr/include/python3.11/pyport.h:39:20: error: 'nullptr' was not declared in this scope
   39 | #  define _Py_NULL nullptr
      |                    ^~~~~~~
/usr/include/python3.11/cpython/unicodeobject.h:677:17: note: in expansion of macro '_Py_NULL'
  677 |     if (wstr != _Py_NULL) {
      |                 ^~~~~~~~
/usr/include/python3.11/cpython/methodobject.h: In function 'PyObject* PyCFunction_GET_SELF(PyObject*)':
/usr/include/python3.11/pyport.h:39:20: error: 'nullptr' was not declared in this scope
   39 | #  define _Py_NULL nullptr
      |                    ^~~~~~~
/usr/include/python3.11/cpython/methodobject.h:50:16: note: in expansion of macro '_Py_NULL'
   50 |         return _Py_NULL;
      |                ^~~~~~~~
/usr/include/python3.11/cpython/methodobject.h: In function 'PyTypeObject* PyCFunction_GET_CLASS(PyObject*)':
/usr/include/python3.11/pyport.h:39:20: error: 'nullptr' was not declared in this scope
   39 | #  define _Py_NULL nullptr
      |                    ^~~~~~~
/usr/include/python3.11/cpython/methodobject.h:70:12: note: in expansion of macro '_Py_NULL'
   70 |     return _Py_NULL;
      |            ^~~~~~~~
/usr/include/python3.11/cpython/abstract.h: In function 'PyObject* PyObject_CallMethodNoArgs(PyObject*, PyObject*)':
/usr/include/python3.11/pyport.h:39:20: error: 'nullptr' was not declared in this scope
   39 | #  define _Py_NULL nullptr
      |                    ^~~~~~~
/usr/include/python3.11/cpython/abstract.h:107:59: note: in expansion of macro '_Py_NULL'
  107 |     return PyObject_VectorcallMethod(name, &self, nargsf, _Py_NULL);
      |                                                           ^~~~~~~~
/usr/include/python3.11/cpython/abstract.h: In function 'PyObject* PyObject_CallMethodOneArg(PyObject*, PyObject*, PyObject*)':
/usr/include/python3.11/pyport.h:39:20: error: 'nullptr' was not declared in this scope
   39 | #  define _Py_NULL nullptr
      |                    ^~~~~~~
/usr/include/python3.11/cpython/abstract.h:117:58: note: in expansion of macro '_Py_NULL'
  117 |     return PyObject_VectorcallMethod(name, args, nargsf, _Py_NULL);
      |                                                          ^~~~~~~~
/usr/include/python3.11/cpython/abstract.h: In function 'PyObject* _PyObject_VectorcallMethodId(_Py_Identifier*, PyObject* const*, size_t, PyObject*)':
/usr/include/python3.11/pyport.h:39:20: error: 'nullptr' was not declared in this scope
   39 | #  define _Py_NULL nullptr
      |                    ^~~~~~~
/usr/include/python3.11/cpython/abstract.h:147:16: note: in expansion of macro '_Py_NULL'
  147 |         return _Py_NULL;
      |                ^~~~~~~~
/usr/include/python3.11/cpython/abstract.h: In function 'PyObject* _PyObject_CallMethodIdNoArgs(PyObject*, _Py_Identifier*)':
/usr/include/python3.11/pyport.h:39:20: error: 'nullptr' was not declared in this scope
   39 | #  define _Py_NULL nullptr
      |                    ^~~~~~~
/usr/include/python3.11/cpython/abstract.h:156:62: note: in expansion of macro '_Py_NULL'
  156 |     return _PyObject_VectorcallMethodId(name, &self, nargsf, _Py_NULL);
      |                                                              ^~~~~~~~
/usr/include/python3.11/cpython/abstract.h: In function 'PyObject* _PyObject_CallMethodIdOneArg(PyObject*, _Py_Identifier*, PyObject*)':
/usr/include/python3.11/pyport.h:39:20: error: 'nullptr' was not declared in this scope
   39 | #  define _Py_NULL nullptr
      |                    ^~~~~~~
/usr/include/python3.11/cpython/abstract.h:166:61: note: in expansion of macro '_Py_NULL'
  166 |     return _PyObject_VectorcallMethodId(name, args, nargsf, _Py_NULL);
      |                                                             ^~~~~~~~
py-kdtree_wrap.cxx: In function 'PyObject* PyInit__kdtree()':
/usr/include/python3.11/pyport.h:39:20: error: 'nullptr' was not declared in this scope
   39 | #  define _Py_NULL nullptr
      |                    ^~~~~~~
/usr/include/python3.11/object.h:81:8: note: in definition of macro 'PyObject_HEAD_INIT'
   81 |     1, type },
      |        ^~~~
/usr/include/python3.11/moduleobject.h:52:24: note: in expansion of macro '_Py_NULL'
   52 |     PyObject_HEAD_INIT(_Py_NULL) \
      |                        ^~~~~~~~
py-kdtree_wrap.cxx:6535:5: note: in expansion of macro 'PyModuleDef_HEAD_INIT'
 6535 |     PyModuleDef_HEAD_INIT,
      |     ^~~~~~~~~~~~~~~~~~~~~
make: *** [Makefile:35: _kdtree.so] Error 1

https://docs.python.org/3.11/whatsnew/3.11.html

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.11/fedora-rawhide-x86_64/04392263-libkdtree++/

For all our attempts to build libkdtree++ with Python 3.11, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.11/package/libkdtree++/

Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.11:
https://copr.fedorainfracloud.org/coprs/g/python/python3.11/

Let us know here if you have any questions.

Python 3.11 is planned to be included in Fedora 37. To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.11.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires), so if this package is required a lot, it's important for us to get it fixed soon.
We'd appreciate help from the people who know this package best, but if you don't want to work on this now, let us know so we can try to work around it on our side.

Comment 1 Miro Hrončok 2022-06-20 10:15:03 UTC
*** Bug 2098737 has been marked as a duplicate of this bug. ***

Comment 2 Miro Hrončok 2022-06-27 14:53:38 UTC
Hello,

This is the first reminder (step 3 from https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/#_package_removal_for_long_standing_ftbfs_and_fti_bugs).

If you know about this problem and are planning on fixing it, please acknowledge so by setting the bug status to ASSIGNED. If you don't have time to maintain this package, consider orphaning it, so maintainers of dependent packages realize the problem.

Comment 3 Miro Hrončok 2022-07-15 11:54:25 UTC
Hello,

Please note that this comment was generated automatically. If you feel that this output has mistakes, please contact me via email (mhroncok).

All subpackages of a package against which this bug was filled are now installable or removed from Fedora 37.

Thanks for taking care of it!


Note You need to log in before you can comment on or make changes to this bug.