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

Can't compile with python 3.8aX #147

Open
matrixise opened this issue Feb 26, 2019 · 2 comments

Comments

@matrixise
Copy link

commented Feb 26, 2019

python setup.py test
/tmp/python380a2/lib/python3.8/site-packages/setuptools/depends.py:2: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp
setup.py:7: ResourceWarning: unclosed file <_io.TextIOWrapper name='README.rst' mode='r' encoding='UTF-8'>
  open("README.rst").read() + '\n\n' + open("HISTORY.rst").read()
ResourceWarning: Enable tracemalloc to get the object allocation traceback
setup.py:7: ResourceWarning: unclosed file <_io.TextIOWrapper name='HISTORY.rst' mode='r' encoding='UTF-8'>
  open("README.rst").read() + '\n\n' + open("HISTORY.rst").read()
ResourceWarning: Enable tracemalloc to get the object allocation traceback
/tmp/python380a2/lib/python3.8/site-packages/setuptools/package_index.py:1058: DeprecationWarning: urllib.parse.splituser() is deprecated as of 3.8, use urllib.parse.urlparse() instead
  auth, host = urllib.parse.splituser(netloc)
In file included from c/cffi1_module.c:20,
                 from c/_cffi_backend.c:7552:
c/call_python.c: Dans la fonction « _get_interpstate_dict »:
c/call_python.c:20:30: error: déréférencement d'un pointeur du type incomplet « PyInterpreterState » {alias « struct _is »}
     builtins = tstate->interp->builtins;
                              ^~
Traceback (most recent call last):
  File "/home/stephane/src/github.com/python/cpython/Lib/distutils/unixccompiler.py", line 117, in _compile
    self.spawn(compiler_so + cc_args + [src, '-o', obj] +
  File "/home/stephane/src/github.com/python/cpython/Lib/distutils/ccompiler.py", line 909, in spawn
    spawn(cmd, dry_run=self.dry_run)
  File "/home/stephane/src/github.com/python/cpython/Lib/distutils/spawn.py", line 36, in spawn
    _spawn_posix(cmd, search_path, dry_run=dry_run)
  File "/home/stephane/src/github.com/python/cpython/Lib/distutils/spawn.py", line 157, in _spawn_posix
    raise DistutilsExecError(
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 "/home/stephane/src/github.com/python/cpython/Lib/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/home/stephane/src/github.com/python/cpython/Lib/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/home/stephane/src/github.com/python/cpython/Lib/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/tmp/python380a2/lib/python3.8/site-packages/setuptools/command/bdist_egg.py", line 172, in run
    cmd = self.call_command('install_lib', warn_dir=0)
  File "/tmp/python380a2/lib/python3.8/site-packages/setuptools/command/bdist_egg.py", line 158, in call_command
    self.run_command(cmdname)
  File "/home/stephane/src/github.com/python/cpython/Lib/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/home/stephane/src/github.com/python/cpython/Lib/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/tmp/python380a2/lib/python3.8/site-packages/setuptools/command/install_lib.py", line 11, in run
    self.build()
  File "/home/stephane/src/github.com/python/cpython/Lib/distutils/command/install_lib.py", line 107, in build
    self.run_command('build_ext')
  File "/home/stephane/src/github.com/python/cpython/Lib/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/home/stephane/src/github.com/python/cpython/Lib/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/tmp/python380a2/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 78, in run
    _build_ext.run(self)
  File "/home/stephane/src/github.com/python/cpython/Lib/distutils/command/build_ext.py", line 340, in run
    self.build_extensions()
  File "/home/stephane/src/github.com/python/cpython/Lib/distutils/command/build_ext.py", line 449, in build_extensions
    self._build_extensions_serial()
  File "/home/stephane/src/github.com/python/cpython/Lib/distutils/command/build_ext.py", line 474, in _build_extensions_serial
    self.build_extension(ext)
  File "/tmp/python380a2/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 199, in build_extension
    _build_ext.build_extension(self, ext)
  File "/home/stephane/src/github.com/python/cpython/Lib/distutils/command/build_ext.py", line 528, in build_extension
    objects = self.compiler.compile(sources,
  File "/home/stephane/src/github.com/python/cpython/Lib/distutils/ccompiler.py", line 574, in compile
    self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
  File "/home/stephane/src/github.com/python/cpython/Lib/distutils/unixccompiler.py", line 120, in _compile
    raise CompileError(msg)
distutils.errors.CompileError: command 'gcc' failed with exit status 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/tmp/python380a2/lib/python3.8/site-packages/setuptools/sandbox.py", line 154, in save_modules
    yield saved
  File "/tmp/python380a2/lib/python3.8/site-packages/setuptools/sandbox.py", line 195, in setup_context
    yield
  File "/tmp/python380a2/lib/python3.8/site-packages/setuptools/sandbox.py", line 250, in run_setup
    _execfile(setup_script, ns)
  File "/tmp/python380a2/lib/python3.8/site-packages/setuptools/sandbox.py", line 45, in _execfile
    exec(code, globals, locals)
  File "/tmp/easy_install-feauzqsc/cffi-1.12.1/setup.py", line 186, in <module>
  File "/tmp/python380a2/lib/python3.8/site-packages/setuptools/__init__.py", line 143, in setup
    return distutils.core.setup(**attrs)
  File "/home/stephane/src/github.com/python/cpython/Lib/distutils/core.py", line 163, in setup
    raise SystemExit("error: " + str(msg))
SystemExit: error: command 'gcc' failed with exit status 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/tmp/python380a2/lib/python3.8/site-packages/setuptools/command/easy_install.py", line 1144, in run_setup
    run_setup(setup_script, args)
  File "/tmp/python380a2/lib/python3.8/site-packages/setuptools/sandbox.py", line 253, in run_setup
    raise
  File "/home/stephane/src/github.com/python/cpython/Lib/contextlib.py", line 131, in __exit__
    self.gen.throw(type, value, traceback)
  File "/tmp/python380a2/lib/python3.8/site-packages/setuptools/sandbox.py", line 195, in setup_context
    yield
  File "/home/stephane/src/github.com/python/cpython/Lib/contextlib.py", line 131, in __exit__
    self.gen.throw(type, value, traceback)
  File "/tmp/python380a2/lib/python3.8/site-packages/setuptools/sandbox.py", line 166, in save_modules
    saved_exc.resume()
  File "/tmp/python380a2/lib/python3.8/site-packages/setuptools/sandbox.py", line 141, in resume
    six.reraise(type, exc, self._tb)
  File "/tmp/python380a2/lib/python3.8/site-packages/setuptools/_vendor/six.py", line 685, in reraise
    raise value.with_traceback(tb)
  File "/tmp/python380a2/lib/python3.8/site-packages/setuptools/sandbox.py", line 154, in save_modules
    yield saved
  File "/tmp/python380a2/lib/python3.8/site-packages/setuptools/sandbox.py", line 195, in setup_context
    yield
  File "/tmp/python380a2/lib/python3.8/site-packages/setuptools/sandbox.py", line 250, in run_setup
    _execfile(setup_script, ns)
  File "/tmp/python380a2/lib/python3.8/site-packages/setuptools/sandbox.py", line 45, in _execfile
    exec(code, globals, locals)
  File "/tmp/easy_install-feauzqsc/cffi-1.12.1/setup.py", line 186, in <module>
  File "/tmp/python380a2/lib/python3.8/site-packages/setuptools/__init__.py", line 143, in setup
    return distutils.core.setup(**attrs)
  File "/home/stephane/src/github.com/python/cpython/Lib/distutils/core.py", line 163, in setup
    raise SystemExit("error: " + str(msg))
SystemExit: error: command 'gcc' failed with exit status 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "setup.py", line 63, in <module>
    setup(
  File "/tmp/python380a2/lib/python3.8/site-packages/setuptools/__init__.py", line 142, in setup
    _install_setup_requires(attrs)
  File "/tmp/python380a2/lib/python3.8/site-packages/setuptools/__init__.py", line 137, in _install_setup_requires
    dist.fetch_build_eggs(dist.setup_requires)
  File "/tmp/python380a2/lib/python3.8/site-packages/setuptools/dist.py", line 583, in fetch_build_eggs
    resolved_dists = pkg_resources.working_set.resolve(
  File "/tmp/python380a2/lib/python3.8/site-packages/pkg_resources/__init__.py", line 778, in resolve
    dist = best[req.key] = env.best_match(
  File "/tmp/python380a2/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1063, in best_match
    return self.obtain(req, installer)
  File "/tmp/python380a2/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1075, in obtain
    return installer(requirement)
  File "/tmp/python380a2/lib/python3.8/site-packages/setuptools/dist.py", line 653, in fetch_build_egg
    return cmd.easy_install(req)
  File "/tmp/python380a2/lib/python3.8/site-packages/setuptools/command/easy_install.py", line 679, in easy_install
    return self.install_item(spec, dist.location, tmpdir, deps)
  File "/tmp/python380a2/lib/python3.8/site-packages/setuptools/command/easy_install.py", line 705, in install_item
    dists = self.install_eggs(spec, download, tmpdir)
  File "/tmp/python380a2/lib/python3.8/site-packages/setuptools/command/easy_install.py", line 890, in install_eggs
    return self.build_and_install(setup_script, setup_base)
  File "/tmp/python380a2/lib/python3.8/site-packages/setuptools/command/easy_install.py", line 1158, in build_and_install
    self.run_setup(setup_script, setup_base, args)
  File "/tmp/python380a2/lib/python3.8/site-packages/setuptools/command/easy_install.py", line 1146, in run_setup
    raise DistutilsError("Setup script exited with %s" % (v.args[0],))
distutils.errors.DistutilsError: Setup script exited with error: command 'gcc' failed with exit status 1

Version of Python:

Python 3.8.0a2+ (heads/master:c606a9cbd4, Feb 26 2019, 13:20:26)

@matrixise

This comment has been minimized.

Copy link
Author

commented Feb 26, 2019

Hi, this issue has been fixed in CFFI

https://bitbucket.org/cffi/cffi/issues/403/build-fails-on-38-dev-pyinterpreterstate

While the new version of CFFI is not released, I suppose you will keep it as open

@pquentin

This comment has been minimized.

Copy link

commented Feb 27, 2019

cffi 1.12.2 is out, so that issue should be fixed now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.