Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error building with python3.9 #90

Open
eamanu opened this issue Oct 10, 2020 · 2 comments · May be fixed by #91
Open

Error building with python3.9 #90

eamanu opened this issue Oct 10, 2020 · 2 comments · May be fixed by #91

Comments

@eamanu
Copy link

eamanu commented Oct 10, 2020

creating build/temp.linux-x86_64-3.9
creating build/temp.linux-x86_64-3.9/blist
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DBLIST_FLOAT_RADIX_SORT=1 -I/usr/include/python3.9 -c blist/_blist.c -o build/temp.linux-x86_64-3.9/blist/_blist.o
blist/_blist.c: In function ‘unwrap_leaf_array’:
blist/_blist.c:4583:37: warning: implicit declaration of function ‘_PyObject_GC_IS_TRACKED’ [-Wimplicit-function-declaration]
 4583 |                 if (leafs_n > 1 && !_PyObject_GC_IS_TRACKED(leafs[i]))
      |                                     ^~~~~~~~~~~~~~~~~~~~~~~
blist/_blist.c: In function ‘sort_ulong’:
blist/_blist.c:5387:31: warning: comparison of integer expressions of different signedness: ‘Py_ssize_t’ {aka ‘long int’} and ‘long unsigned int’ [-Wsign-compare]
 5387 |                 for (j = 0; j < NUM_PASSES; j++) {
      |                               ^
blist/_blist.c:5393:31: warning: comparison of integer expressions of different signedness: ‘Py_ssize_t’ {aka ‘long int’} and ‘long unsigned int’ [-Wsign-compare]
 5393 |                 for (j = 0; j < NUM_PASSES; j++) {
      |                               ^
blist/_blist.c:5403:23: warning: comparison of integer expressions of different signedness: ‘Py_ssize_t’ {aka ‘long int’} and ‘long unsigned int’ [-Wsign-compare]
 5403 |         for (j = 0; j < NUM_PASSES; j++) {
      |                       ^
x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fwrapv -O2 -Wl,-Bsymbolic-functions -Wl,-z,relro -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.9/blist/_blist.o -o /<<PKGBUILDDIR>>/.pybuild/cpython3_3.9_blist/build/blist/_blist.cpython-39-x86_64-linux-gnu.so
I: pybuild base:217: /usr/bin/python3 setup.py build
running build
running build_py
creating /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_blist/build/blist
copying blist/_sorteddict.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_blist/build/blist
copying blist/_btuple.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_blist/build/blist
copying blist/_sortedlist.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_blist/build/blist
copying blist/__init__.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_blist/build/blist
running build_ext
building 'blist._blist' extension
creating build/temp.linux-x86_64-3.8
creating build/temp.linux-x86_64-3.8/blist
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DBLIST_FLOAT_RADIX_SORT=1 -I/usr/include/python3.8 -c blist/_blist.c -o build/temp.linux-x86_64-3.8/blist/_blist.o
blist/_blist.c: In function ‘sort_ulong’:
blist/_blist.c:5387:31: warning: comparison of integer expressions of different signedness: ‘Py_ssize_t’ {aka ‘long int’} and ‘long unsigned int’ [-Wsign-compare]
 5387 |                 for (j = 0; j < NUM_PASSES; j++) {
      |                               ^
blist/_blist.c:5393:31: warning: comparison of integer expressions of different signedness: ‘Py_ssize_t’ {aka ‘long int’} and ‘long unsigned int’ [-Wsign-compare]
 5393 |                 for (j = 0; j < NUM_PASSES; j++) {
      |                               ^
blist/_blist.c:5403:23: warning: comparison of integer expressions of different signedness: ‘Py_ssize_t’ {aka ‘long int’} and ‘long unsigned int’ [-Wsign-compare]
 5403 |         for (j = 0; j < NUM_PASSES; j++) {
      |                       ^
x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fwrapv -O2 -Wl,-Bsymbolic-functions -Wl,-z,relro -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.8/blist/_blist.o -o /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_blist/build/blist/_blist.cpython-38-x86_64-linux-gnu.so
   dh_auto_test -O--buildsystem=pybuild
dh_auto_test: warning: Compatibility levels before 10 are deprecated (level 9 in use)
	pybuild --test -i python{version} -p "3.9 3.8"
I: pybuild base:217: python3.9 setup.py test
running test
WARNING: Testing via this command is deprecated and will be removed in a future version. Users looking for a generic test entry point independent of test runner are encouraged to use tox.
running egg_info
writing blist.egg-info/PKG-INFO
writing dependency_links to blist.egg-info/dependency_links.txt
writing top-level names to blist.egg-info/top_level.txt
reading manifest file 'blist.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'blist.rst'
writing manifest file 'blist.egg-info/SOURCES.txt'
running build_ext
copying /<<PKGBUILDDIR>>/.pybuild/cpython3_3.9_blist/build/blist/_blist.cpython-39-x86_64-linux-gnu.so -> blist
test_blist (unittest.loader._FailedTest) ... ERROR

======================================================================
ERROR: test_blist (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: test_blist
Traceback (most recent call last):
  File "/usr/lib/python3.9/unittest/loader.py", line 154, in loadTestsFromName
    module = __import__(module_name)
  File "/<<PKGBUILDDIR>>/test_blist.py", line 40, in <module>
    import blist, pickle
  File "/<<PKGBUILDDIR>>/blist/__init__.py", line 2, in <module>
    from blist._blist import *
ImportError: /<<PKGBUILDDIR>>/blist/_blist.cpython-39-x86_64-linux-gnu.so: undefined symbol: _PyObject_GC_IS_TRACKED


----------------------------------------------------------------------
Ran 1 test in 0.003s

FAILED (errors=1)
Test failed: <unittest.runner.TextTestResult run=1 errors=1 failures=0>
error: Test failed: <unittest.runner.TextTestResult run=1 errors=1 failures=0>
E: pybuild pybuild:352: test: plugin distutils failed with: exit code=1: python3.9 setup.py test
dh_auto_test: error: pybuild --test -i python{version} -p "3.9 3.8" returned exit code 13
make: *** [debian/rules:7: build] Error 25
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2
--------------------------------------------------------------------------------
Build finished at 2020-10-09T15:00:26Z
@h-vetinari
Copy link

I solved this for conda-forge in conda-forge/blist-feedstock#4, see patch 4 in the feedstock repo.

@eamanu
Copy link
Author

eamanu commented Oct 14, 2020

Thanks @h-vetinari

stefanor added a commit to stefanor/blist that referenced this issue Oct 15, 2020
Replace _PyObject_GC_IS_TRACKED() with PyObject_GC_IsTracked().
This is the new public API from Python 3.9, relegating
_PyObject_GC_IS_TRACKED() to private internal use.

Fixes: DanielStutzbach#90
@stefanor stefanor linked a pull request Oct 15, 2020 that will close this issue
@mzpqnxow mzpqnxow mentioned this issue Aug 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants