Home - Summaries: (main) : (py3.11) : (py3.12) : Everything - Nightly builds - Benchmarks - RPython - Builders - About

hpy_tests._vendored.test_slots_legacy.TestCustomLegacySlotsFeatures:test_legacy_slots_members[hybrid+debug]

self = <distutils.unixccompiler.UnixCCompiler object at 0x0000000013dc5408>
obj = '/tmp/pytest-of-buildslave/pytest-752/test_legacy_slots_members_hybr1/mytest.o'
src = 'mytest.c', ext = '.c'
cc_args = ['-DHPY', '-DHPY_ABI_HYBRID', '-I/build_dir/pypy-c-jit-linux-x86-64/build/lib_pypy/hpy/devel/include', '-I/build_dir/pypy-c-jit-linux-x86-64/venv/pypy-venv/include', '-I/build_dir/pypy-c-jit-linux-x86-64/build/include/pypy3.12', '-c']
extra_postargs = ['-g', '-O0', '-Wfatal-errors', '-Werror']
pp_opts = ['-DHPY', '-DHPY_ABI_HYBRID', '-I/build_dir/pypy-c-jit-linux-x86-64/build/lib_pypy/hpy/devel/include', '-I/build_dir/pypy-c-jit-linux-x86-64/venv/pypy-venv/include', '-I/build_dir/pypy-c-jit-linux-x86-64/build/include/pypy3.12']

    def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts):
        compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs)
        try:
>           self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs)

pypy-venv/lib/pypy3.12/site-packages/setuptools/_distutils/unixccompiler.py:188: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <distutils.unixccompiler.UnixCCompiler object at 0x0000000013dc5408>
cmd = ['gcc', '-pthread', '-DNDEBUG', '-O2', '-fPIC', '-DHPY', ...], kwargs = {}

    def spawn(self, cmd, **kwargs):
>       spawn(cmd, dry_run=self.dry_run, **kwargs)

pypy-venv/lib/pypy3.12/site-packages/setuptools/_distutils/ccompiler.py:1041: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

cmd = '/opt/rh/devtoolset-10/root/usr/bin/gcc', search_path = 1, verbose = 0
dry_run = 0
env = {'AUDITWHEEL_ARCH': 'x86_64', 'AUDITWHEEL_PLAT': 'manylinux2014_x86_64', 'AUDITWHEEL_POLICY': 'manylinux2014', 'DEVTOOLSET_ROOTPATH': '/opt/rh/devtoolset-10/root', ...}

    def spawn(cmd, search_path=1, verbose=0, dry_run=0, env=None):  # noqa: C901
        """Run another program, specified as a command list 'cmd', in a new process.
    
        'cmd' is just the argument list for the new process, ie.
        cmd[0] is the program to run and cmd[1:] are the rest of its arguments.
        There is no way to run a program with a name different from that of its
        executable.
    
        If 'search_path' is true (the default), the system's executable
        search path will be used to find the program; otherwise, cmd[0]
        must be the exact path to the executable.  If 'dry_run' is true,
        the command will not actually be run.
    
        Raise DistutilsExecError if running the program fails in any way; just
        return on success.
        """
        # cmd is documented as a list, but just in case some code passes a tuple
        # in, protect our %-formatting code against horrible death
        cmd = list(cmd)
    
        log.info(subprocess.list2cmdline(cmd))
        if dry_run:
            return
    
        if search_path:
            executable = find_executable(cmd[0])
            if executable is not None:
                cmd[0] = executable
    
        env = env if env is not None else dict(os.environ)
    
        if sys.platform == 'darwin':
            from distutils.util import MACOSX_VERSION_VAR, get_macosx_target_ver
    
            macosx_target_ver = get_macosx_target_ver()
            if macosx_target_ver:
                env[MACOSX_VERSION_VAR] = macosx_target_ver
    
        try:
            proc = subprocess.Popen(cmd, env=env)
            proc.wait()
            exitcode = proc.returncode
        except OSError as exc:
            if not DEBUG:
                cmd = cmd[0]
            raise DistutilsExecError(f"command {cmd!r} failed: {exc.args[-1]}") from exc
    
        if exitcode:
            if not DEBUG:
                cmd = cmd[0]
>           raise DistutilsExecError(f"command {cmd!r} failed with exit code {exitcode}")
E           distutils.errors.DistutilsExecError: command '/opt/rh/devtoolset-10/root/usr/bin/gcc' failed with exit code 1

pypy-venv/lib/pypy3.12/site-packages/setuptools/_distutils/spawn.py:68: DistutilsExecError

During handling of the above exception, another exception occurred:

self = <_vendored.test_slots_legacy.TestCustomLegacySlotsFeatures object at 0x000000000ec90560>

    def test_legacy_slots_members(self):
        import pytest
>       mod = self.make_module("""
            #include <Python.h>
            #include "structmember.h"
    
            typedef struct {
                PyObject_HEAD
                long x;
                long y;
            } PointObject;
    
            HPyDef_SLOT(Point_new, HPy_tp_new)
            static HPy Point_new_impl(HPyContext *ctx, HPy cls, const HPy *args,
                                      HPy_ssize_t nargs, HPy kw)
            {
                PointObject *point;
                HPy h_point = HPy_New(ctx, cls, &point);
                if (HPy_IsNull(h_point))
                    return HPy_NULL;
                point->x = 7;
                point->y = 3;
                return h_point;
            }
    
            HPyDef_MEMBER(Point_x, "x", HPyMember_LONG, offsetof(PointObject, x))
    
            // legacy members
            static PyMemberDef legacy_members[] = {
                {"y", T_LONG, offsetof(PointObject, y), 0},
                {"y_ro", T_LONG, offsetof(PointObject, y), READONLY},
                {NULL}
            };
    
            static PyType_Slot legacy_slots[] = {
                {Py_tp_members, legacy_members},
                {0, NULL}
            };
    
            static HPyDef *Point_defines[] = {
                &Point_new,
                &Point_x,
                NULL
            };
            static HPyType_Spec Point_spec = {
                .name = "mytest.Point",
                .basicsize = sizeof(PointObject),
                .builtin_shape = HPyType_BuiltinShape_Legacy,
                .legacy_slots = legacy_slots,
                .defines = Point_defines
            };
    
            @EXPORT_TYPE("Point", Point_spec)
            @INIT
        """)

../build/extra_tests/hpy_tests/_vendored/test_slots_legacy.py:110: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../build/extra_tests/hpy_tests/_vendored/support.py:457: in make_module
    return self.compiler.make_module(main_src, ExtensionTemplate, name,
../build/extra_tests/hpy_tests/_vendored/support.py:353: in make_module
    module = self.compile_module(
../build/extra_tests/hpy_tests/_vendored/support.py:335: in compile_module
    so_filename = c_compile(str(self.tmpdir), ext,
../build/extra_tests/hpy_tests/_vendored/support.py:539: in c_compile
    outputfilename = _build(tmpdir, ext, hpy_devel, hpy_abi, compiler_verbose, debug)
../build/extra_tests/hpy_tests/_vendored/support.py:584: in _build
    dist.run_command('build_ext')
pypy-venv/lib/pypy3.12/site-packages/setuptools/dist.py:968: in run_command
    super().run_command(command)
pypy-venv/lib/pypy3.12/site-packages/setuptools/_distutils/dist.py:988: in run_command
    cmd_obj.run()
pypy-venv/lib/pypy3.12/site-packages/setuptools/command/build_ext.py:91: in run
    _build_ext.run(self)
pypy-venv/lib/pypy3.12/site-packages/setuptools/_distutils/command/build_ext.py:359: in run
    self.build_extensions()
pypy-venv/lib/pypy3.12/site-packages/setuptools/_distutils/command/build_ext.py:479: in build_extensions
    self._build_extensions_serial()
pypy-venv/lib/pypy3.12/site-packages/setuptools/_distutils/command/build_ext.py:505: in _build_extensions_serial
    self.build_extension(ext)
pypy-venv/lib/pypy3.12/site-packages/setuptools/command/build_ext.py:252: in build_extension
    _build_ext.build_extension(self, ext)
pypy-venv/lib/pypy3.12/site-packages/setuptools/_distutils/command/build_ext.py:560: in build_extension
    objects = self.compiler.compile(
pypy-venv/lib/pypy3.12/site-packages/setuptools/_distutils/ccompiler.py:600: in compile
    self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <distutils.unixccompiler.UnixCCompiler object at 0x0000000013dc5408>
obj = '/tmp/pytest-of-buildslave/pytest-752/test_legacy_slots_members_hybr1/mytest.o'
src = 'mytest.c', ext = '.c'
cc_args = ['-DHPY', '-DHPY_ABI_HYBRID', '-I/build_dir/pypy-c-jit-linux-x86-64/build/lib_pypy/hpy/devel/include', '-I/build_dir/pypy-c-jit-linux-x86-64/venv/pypy-venv/include', '-I/build_dir/pypy-c-jit-linux-x86-64/build/include/pypy3.12', '-c']
extra_postargs = ['-g', '-O0', '-Wfatal-errors', '-Werror']
pp_opts = ['-DHPY', '-DHPY_ABI_HYBRID', '-I/build_dir/pypy-c-jit-linux-x86-64/build/lib_pypy/hpy/devel/include', '-I/build_dir/pypy-c-jit-linux-x86-64/venv/pypy-venv/include', '-I/build_dir/pypy-c-jit-linux-x86-64/build/include/pypy3.12']

    def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts):
        compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs)
        try:
            self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs)
        except DistutilsExecError as msg:
>           raise CompileError(msg)
E           distutils.errors.CompileError: command '/opt/rh/devtoolset-10/root/usr/bin/gcc' failed with exit code 1

pypy-venv/lib/pypy3.12/site-packages/setuptools/_distutils/unixccompiler.py:190: CompileError
builder: pypy-c-jit-linux-x86-64 build #11872+
test: hpy_tests._vendored.test_slots_legacy.TestCustomLegacySlotsFeatures:test_legacy_slots_members[hybrid+debug]