pytroll / pytroll/aggdraw

PyPy3.8 support

Open
#80 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
107
Forks
45
Avg merge
13h 41m
Merged PRs (30d)
7

Description

We can successfully install aggdraw on pypy3.7 (v7.3.7) and on CPython 3.8, but not pypy3.8 (v7.3.7). Does this output mean anything to anyone?

Preparing metadata (setup.py) ... done
Building wheels for collected packages: aggdraw
  Building wheel for aggdraw (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/barnesc/.pyenv/versions/pypy3.8-7.3.7/envs/cm-pypy38/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-_7xqrttx/aggdraw_bcd0f8bd313f41a4882c9a0461bd9edd/setup.py'"'"'; __file__='"'"'/tmp/pip-install-_7xqrttx/aggdraw_bcd0f8bd313f41a4882c9a0461bd9edd/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-jk4w5it5
       cwd: /tmp/pip-install-_7xqrttx/aggdraw_bcd0f8bd313f41a4882c9a0461bd9edd/
  Complete output (41 lines):
  Trying freetype-config to find freetype library...
  Using ctypes to find freetype library...
  === freetype found: '/usr'
  running bdist_wheel
  running build
  running build_ext
  building 'aggdraw' extension
  creating build
  creating build/temp.linux-x86_64-3.8
  creating build/temp.linux-x86_64-3.8/agg2
  creating build/temp.linux-x86_64-3.8/agg2/src
  creating build/temp.linux-x86_64-3.8/agg2/font_freetype
  gcc -pthread -DNDEBUG -O2 -fPIC -DVERSION=1.3.12 -DHAVE_FREETYPE2 -Iagg2/include -Iagg2/font_freetype -I/usr/include -I/usr/include/freetype -I/usr/include/freetype2 -I/home/barnesc/.pyenv/versions/pypy3.8-7.3.7/envs/cm-pypy38/include -I/home/barnesc/.pyenv/versions/pypy3.8-7.3.7/include/pypy3.8 -c aggdraw.cxx -o build/temp.linux-x86_64-3.8/aggdraw.o
  In file included from agg2/include/agg_conv_transform.h:23,
                   from aggdraw.cxx:81:
  agg2/include/agg_trans_affine.h: In member function ‘void agg::trans_affine::transform(double*, double*) const’:
  agg2/include/agg_trans_affine.h:254:25: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister]
    254 |         register double tx = *x;
        |                         ^~
  agg2/include/agg_trans_affine.h: In member function ‘void agg::trans_affine::inverse_transform(double*, double*) const’:
  agg2/include/agg_trans_affine.h:262:25: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister]
    262 |         register double d = determinant();
        |                         ^
  agg2/include/agg_trans_affine.h:263:25: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister]
    263 |         register double a = (*x - m4) * d;
        |                         ^
  agg2/include/agg_trans_affine.h:264:25: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister]
    264 |         register double b = (*y - m5) * d;
        |                         ^
  aggdraw.cxx: At global scope:
  aggdraw.cxx:269:1: error: invalid conversion from ‘printfunc’ {aka ‘int (*)(_object*, FILE*, int)’} to ‘Py_ssize_t’ {aka ‘long int’} [-fpermissive]
    269 | };
        | ^
        | |
        | printfunc {aka int (*)(_object*, FILE*, int)}
  aggdraw.cxx:310:1: error: invalid conversion from ‘printfunc’ {aka ‘int (*)(_object*, FILE*, int)’} to ‘Py_ssize_t’ {aka ‘long int’} [-fpermissive]
    310 | };
        | ^
        | |
        | printfunc {aka int (*)(_object*, FILE*, int)}
  error: command 'gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for aggdraw
  Running setup.py clean for aggdraw
Failed to build aggdraw
Installing collected packages: aggdraw
    Running setup.py install for aggdraw ... error
    ERROR: Command errored out with exit status 1:
     command: /home/barnesc/.pyenv/versions/pypy3.8-7.3.7/envs/cm-pypy38/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-_7xqrttx/aggdraw_bcd0f8bd313f41a4882c9a0461bd9edd/setup.py'"'"'; __file__='"'"'/tmp/pip-install-_7xqrttx/aggdraw_bcd0f8bd313f41a4882c9a0461bd9edd/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-7kzeod5l/install-record.txt --single-version-externally-managed --compile --install-headers /home/barnesc/.pyenv/versions/pypy3.8-7.3.7/envs/cm-pypy38/include/site/python3.8/aggdraw
         cwd: /tmp/pip-install-_7xqrttx/aggdraw_bcd0f8bd313f41a4882c9a0461bd9edd/
    Complete output (41 lines):
    Trying freetype-config to find freetype library...
    Using ctypes to find freetype library...
    === freetype found: '/usr'
    running install
    running build
    running build_ext
    building 'aggdraw' extension
    creating build
    creating build/temp.linux-x86_64-3.8
    creating build/temp.linux-x86_64-3.8/agg2
    creating build/temp.linux-x86_64-3.8/agg2/src
    creating build/temp.linux-x86_64-3.8/agg2/font_freetype
    gcc -pthread -DNDEBUG -O2 -fPIC -DVERSION=1.3.12 -DHAVE_FREETYPE2 -Iagg2/include -Iagg2/font_freetype -I/usr/include -I/usr/include/freetype -I/usr/include/freetype2 -I/home/barnesc/.pyenv/versions/pypy3.8-7.3.7/envs/cm-pypy38/include -I/home/barnesc/.pyenv/versions/pypy3.8-7.3.7/include/pypy3.8 -c aggdraw.cxx -o build/temp.linux-x86_64-3.8/aggdraw.o
    In file included from agg2/include/agg_conv_transform.h:23,
                     from aggdraw.cxx:81:
    agg2/include/agg_trans_affine.h: In member function ‘void agg::trans_affine::transform(double*, double*) const’:
    agg2/include/agg_trans_affine.h:254:25: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister]
      254 |         register double tx = *x;
          |                         ^~
    agg2/include/agg_trans_affine.h: In member function ‘void agg::trans_affine::inverse_transform(double*, double*) const’:
    agg2/include/agg_trans_affine.h:262:25: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister]
      262 |         register double d = determinant();
          |                         ^
    agg2/include/agg_trans_affine.h:263:25: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister]
      263 |         register double a = (*x - m4) * d;
          |                         ^
    agg2/include/agg_trans_affine.h:264:25: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister]
      264 |         register double b = (*y - m5) * d;
          |                         ^
    aggdraw.cxx: At global scope:
    aggdraw.cxx:269:1: error: invalid conversion from ‘printfunc’ {aka ‘int (*)(_object*, FILE*, int)’} to ‘Py_ssize_t’ {aka ‘long int’} [-fpermissive]
      269 | };
          | ^
          | |
          | printfunc {aka int (*)(_object*, FILE*, int)}
    aggdraw.cxx:310:1: error: invalid conversion from ‘printfunc’ {aka ‘int (*)(_object*, FILE*, int)’} to ‘Py_ssize_t’ {aka ‘long int’} [-fpermissive]
      310 | };
          | ^
          | |
          | printfunc {aka int (*)(_object*, FILE*, int)}
    error: command 'gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/barnesc/.pyenv/versions/pypy3.8-7.3.7/envs/cm-pypy38/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-_7xqrttx/aggdraw_bcd0f8bd313f41a4882c9a0461bd9edd/setup.py'"'"'; __file__='"'"'/tmp/pip-install-_7xqrttx/aggdraw_bcd0f8bd313f41a4882c9a0461bd9edd/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-7kzeod5l/install-record.txt --single-version-externally-managed --compile --install-headers /home/barnesc/.pyenv/versions/pypy3.8-7.3.7/envs/cm-pypy38/include/site/python3.8/aggdraw Check the logs for full command output

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the PyPy3.8 installation failure and inspect aggdraw.cxx at the errors reported on lines 269 and 310, along with the setup.py build invoked in the log. Compare the failing extension build with the working PyPy3.7 and CPython 3.8 cases; done means aggdraw installs successfully on PyPy3.8 without breaking those environments.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, python
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.