Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • pypy pypy
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 673
    • Issues 673
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 13
    • Merge requests 13
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • PyPy
  • pypypypy
  • Issues
  • #3554
Closed
Open
Created Sep 16, 2021 by Michał Górny@mgornyDeveloper

sysconfig.get_config_var('INCLUDEPY') incompatible with new install layout

>>>> import sysconfig
>>>> sysconfig.get_config_var('INCLUDEPY')
'/usr/lib/pypy3.8/include/pypy3.8'
>>>> sysconfig.get_path('include')
'/usr/include/pypy3.8'

This in turn breaks building _testcapi:

>>>> import _testcapi
creating /tmp/testcapi_b0e4bf05d43ae0ad/usr
creating /tmp/testcapi_b0e4bf05d43ae0ad/usr/lib
creating /tmp/testcapi_b0e4bf05d43ae0ad/usr/lib/pypy3.8
creating /tmp/testcapi_b0e4bf05d43ae0ad/usr/lib/pypy3.8/lib_pypy
gcc -pthread -fPIC -fPIC -Wimplicit-function-declaration -I/usr/lib/pypy3.8/include/pypy3.8 -c /usr/lib/pypy3.8/lib_pypy/_testcapimodule.c -o /tmp/testcapi_b0e4bf05d43ae0ad/usr/lib/pypy3.8/lib_pypy/_testcapimodule.o
/usr/lib/pypy3.8/lib_pypy/_testcapimodule.c:18:10: fatal error: Python.h: No such file or directory
   18 | #include "Python.h"
      |          ^~~~~~~~~~
compilation terminated.
Traceback (most recent call last):
  File "/usr/lib/pypy3.8/lib_pypy/_testcapi.py", line 16, in <module>
    path=[output_dir])
  File "/usr/lib/pypy3.8/imp.py", line 296, in find_module
    raise ImportError(_ERR_MSG.format(name), name=name)
ImportError: No module named '_testcapi'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/pypy3.8/distutils/unixccompiler.py", line 143, in _compile
    extra_postargs)
  File "/usr/lib/pypy3.8/distutils/ccompiler.py", line 910, in spawn
    spawn(cmd, dry_run=self.dry_run)
  File "/usr/lib/pypy3.8/distutils/spawn.py", line 36, in spawn
    _spawn_posix(cmd, search_path, dry_run=dry_run)
  File "/usr/lib/pypy3.8/distutils/spawn.py", line 159, in _spawn_posix
    % (cmd, exit_status))
distutils.errors.DistutilsExecError: command 'gcc' failed with exit status 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/pypy3.8/lib_pypy/_testcapi.py", line 26, in <module>
    _pypy_testcapi.compile_shared(cfile, '_testcapi', output_dir)
  File "/usr/lib/pypy3.8/lib_pypy/_pypy_testcapi.py", line 78, in compile_shared
    extra_preargs=ccflags,
  File "/usr/lib/pypy3.8/distutils/ccompiler.py", line 574, in compile
    self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
  File "/usr/lib/pypy3.8/distutils/unixccompiler.py", line 145, in _compile
    raise CompileError(msg)
distutils.errors.CompileError: command 'gcc' failed with exit status 1
Edited Sep 16, 2021 by Michał Górny
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking