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

Cython 0.29.12: ValueError running test suite on Python 3.6 and musl #3045

Open
awilfox opened this issue Jul 17, 2019 · 1 comment

Comments

@awilfox
Copy link

commented Jul 17, 2019

I'm attempting to package Cython for Adélie Linux, which is a Linux distribution that uses the musl libc. While trying to run the test suite, I'm seeing the following error on ppc64:

Unable to find pgen, not compiling formal grammar.
running test
running egg_info
creating Cython.egg-info
writing Cython.egg-info/PKG-INFO
writing dependency_links to Cython.egg-info/dependency_links.txt
writing entry points to Cython.egg-info/entry_points.txt
writing top-level names to Cython.egg-info/top_level.txt
writing manifest file 'Cython.egg-info/SOURCES.txt'
reading manifest file 'Cython.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'Doc/*'
warning: no files found matching '*.pyx' under directory 'Cython/Debugger/Tests'
warning: no files found matching '*.pxd' under directory 'Cython/Debugger/Tests'
warning: no files found matching '*.pxd' under directory 'Cython/Utility'
warning: no files found matching 'pyximport/README'
writing manifest file 'Cython.egg-info/SOURCES.txt'
running build_ext
copying build/lib.linux-ppc64-3.6/Cython/Plex/Scanners.cpython-36m-powerpc64-linux-gnu.so -> Cython/Plex
copying build/lib.linux-ppc64-3.6/Cython/Plex/Actions.cpython-36m-powerpc64-linux-gnu.so -> Cython/Plex
copying build/lib.linux-ppc64-3.6/Cython/Compiler/Scanning.cpython-36m-powerpc64-linux-gnu.so -> Cython/Compiler
copying build/lib.linux-ppc64-3.6/Cython/Compiler/Visitor.cpython-36m-powerpc64-linux-gnu.so -> Cython/Compiler
copying build/lib.linux-ppc64-3.6/Cython/Compiler/FlowControl.cpython-36m-powerpc64-linux-gnu.so -> Cython/Compiler
copying build/lib.linux-ppc64-3.6/Cython/Runtime/refnanny.cpython-36m-powerpc64-linux-gnu.so -> Cython/Runtime
copying build/lib.linux-ppc64-3.6/Cython/Compiler/FusedNode.cpython-36m-powerpc64-linux-gnu.so -> Cython/Compiler
copying build/lib.linux-ppc64-3.6/Cython/Tempita/_tempita.cpython-36m-powerpc64-linux-gnu.so -> Cython/Tempita
Traceback (most recent call last):
  File "setup.py", line 285, in <module>
    **setup_args
  File "/usr/lib/python3.6/site-packages/setuptools/__init__.py", line 143, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib/python3.6/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/usr/lib/python3.6/site-packages/setuptools/command/test.py", line 228, in run
    self.run_tests()
  File "/usr/lib/python3.6/site-packages/setuptools/command/test.py", line 250, in run_tests
    exit=False,
  File "/usr/lib/python3.6/unittest/main.py", line 94, in __init__
    self.parseArgs(argv)
  File "/usr/lib/python3.6/unittest/main.py", line 118, in parseArgs
    self._do_discovery(argv[2:])
  File "/usr/lib/python3.6/unittest/main.py", line 229, in _do_discovery
    self.test = loader.discover(self.start, self.pattern, self.top)
  File "/usr/lib/python3.6/unittest/loader.py", line 341, in discover
    tests = list(self._find_tests(start_dir, pattern))
  File "/usr/lib/python3.6/unittest/loader.py", line 398, in _find_tests
    full_path, pattern, namespace)
  File "/usr/lib/python3.6/unittest/loader.py", line 475, in _find_test_path
    tests = self.loadTestsFromModule(package, pattern=pattern)
  File "/usr/lib/python3.6/site-packages/setuptools/command/test.py", line 54, in loadTestsFromModule
    tests.append(self.loadTestsFromName(submodule))
  File "/usr/lib/python3.6/unittest/loader.py", line 190, in loadTestsFromName
    return self.loadTestsFromModule(obj)
  File "/usr/lib/python3.6/site-packages/setuptools/command/test.py", line 54, in loadTestsFromModule
    tests.append(self.loadTestsFromName(submodule))
  File "/usr/lib/python3.6/unittest/loader.py", line 153, in loadTestsFromName
    module = __import__(module_name)
  File "Cython/Compiler/FlowControl.py", line 1, in init Cython.Compiler.FlowControl
    from __future__ import absolute_import
ValueError: Cython.Compiler.Visitor.TreeVisitor size changed, may indicate binary incompatibility. Expected 40 from C header, got 32 from PyObject

And a very similar error on ppc:

Unable to find pgen, not compiling formal grammar.
running test
running egg_info
creating Cython.egg-info
writing Cython.egg-info/PKG-INFO
writing dependency_links to Cython.egg-info/dependency_links.txt
writing entry points to Cython.egg-info/entry_points.txt
writing top-level names to Cython.egg-info/top_level.txt
writing manifest file 'Cython.egg-info/SOURCES.txt'
reading manifest file 'Cython.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'Doc/*'
warning: no files found matching '*.pyx' under directory 'Cython/Debugger/Tests'
warning: no files found matching '*.pxd' under directory 'Cython/Debugger/Tests'
warning: no files found matching '*.pxd' under directory 'Cython/Utility'
warning: no files found matching 'pyximport/README'
writing manifest file 'Cython.egg-info/SOURCES.txt'
running build_ext
copying build/lib.linux-ppc-3.6/Cython/Plex/Scanners.cpython-36m-powerpc-linux-gnu.so -> Cython/Plex
copying build/lib.linux-ppc-3.6/Cython/Plex/Actions.cpython-36m-powerpc-linux-gnu.so -> Cython/Plex
copying build/lib.linux-ppc-3.6/Cython/Compiler/Scanning.cpython-36m-powerpc-linux-gnu.so -> Cython/Compiler
copying build/lib.linux-ppc-3.6/Cython/Compiler/Visitor.cpython-36m-powerpc-linux-gnu.so -> Cython/Compiler
copying build/lib.linux-ppc-3.6/Cython/Compiler/FlowControl.cpython-36m-powerpc-linux-gnu.so -> Cython/Compiler
copying build/lib.linux-ppc-3.6/Cython/Runtime/refnanny.cpython-36m-powerpc-linux-gnu.so -> Cython/Runtime
copying build/lib.linux-ppc-3.6/Cython/Compiler/FusedNode.cpython-36m-powerpc-linux-gnu.so -> Cython/Compiler
copying build/lib.linux-ppc-3.6/Cython/Tempita/_tempita.cpython-36m-powerpc-linux-gnu.so -> Cython/Tempita
Traceback (most recent call last):
  File "setup.py", line 285, in <module>
    **setup_args
  File "/usr/lib/python3.6/site-packages/setuptools/__init__.py", line 143, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib/python3.6/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/usr/lib/python3.6/site-packages/setuptools/command/test.py", line 228, in run
    self.run_tests()
  File "/usr/lib/python3.6/site-packages/setuptools/command/test.py", line 250, in run_tests
    exit=False,
  File "/usr/lib/python3.6/unittest/main.py", line 94, in __init__
    self.parseArgs(argv)
  File "/usr/lib/python3.6/unittest/main.py", line 118, in parseArgs
    self._do_discovery(argv[2:])
  File "/usr/lib/python3.6/unittest/main.py", line 229, in _do_discovery
    self.test = loader.discover(self.start, self.pattern, self.top)
  File "/usr/lib/python3.6/unittest/loader.py", line 341, in discover
    tests = list(self._find_tests(start_dir, pattern))
  File "/usr/lib/python3.6/unittest/loader.py", line 398, in _find_tests
    full_path, pattern, namespace)
  File "/usr/lib/python3.6/unittest/loader.py", line 475, in _find_test_path
    tests = self.loadTestsFromModule(package, pattern=pattern)
  File "/usr/lib/python3.6/site-packages/setuptools/command/test.py", line 54, in loadTestsFromModule
    tests.append(self.loadTestsFromName(submodule))
  File "/usr/lib/python3.6/unittest/loader.py", line 190, in loadTestsFromName
    return self.loadTestsFromModule(obj)
  File "/usr/lib/python3.6/site-packages/setuptools/command/test.py", line 54, in loadTestsFromModule
    tests.append(self.loadTestsFromName(submodule))
  File "/usr/lib/python3.6/unittest/loader.py", line 153, in loadTestsFromName
    module = __import__(module_name)
  File "Cython/Compiler/FlowControl.py", line 1, in init Cython.Compiler.FlowControl
    from __future__ import absolute_import
ValueError: Cython.Compiler.Visitor.TreeVisitor size changed, may indicate binary incompatibility. Expected 20 from C header, got 16 from PyObject

@awilfox awilfox changed the title Cython 0.29.12: ValueError during test suite on Python 3.6 and musl Cython 0.29.12: ValueError running test suite on Python 3.6 and musl Jul 17, 2019

@scoder

This comment has been minimized.

Copy link
Contributor

commented Jul 18, 2019

Hmm, this could suggests a problem in the configuration of the C compiler. The extension module that it built seems to have a different configuration than the CPython runtime, or there's some other mismatch of the configuration between compile time and runtime, which leads to different struct sizes for extension types. Any idea if there's something on the platform that might cause this?

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.