Fri Dec 13 11:25:26 UTC 2024 I: starting to build python-cffi/unstable/i386 on jenkins on '2024-12-13 11:25' Fri Dec 13 11:25:26 UTC 2024 I: The jenkins build log is/was available at https://jenkins.debian.net/userContent/reproducible/debian/build_service/i386_3/47811/console.log Fri Dec 13 11:25:26 UTC 2024 I: Downloading source for unstable/python-cffi=1.17.1-2 --2024-12-13 11:25:26-- http://deb.debian.org/debian/pool/main/p/python-cffi/python-cffi_1.17.1-2.dsc Connecting to 46.16.76.132:3128... connected. Proxy request sent, awaiting response... 200 OK Length: 1978 (1.9K) [text/prs.lines.tag] Saving to: ‘python-cffi_1.17.1-2.dsc’ 0K . 100% 285M=0s 2024-12-13 11:25:26 (285 MB/s) - ‘python-cffi_1.17.1-2.dsc’ saved [1978/1978] Fri Dec 13 11:25:26 UTC 2024 I: python-cffi_1.17.1-2.dsc -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Format: 3.0 (quilt) Source: python-cffi Binary: python3-cffi, python3-cffi-backend, python-cffi-doc Architecture: any all Version: 1.17.1-2 Maintainer: Debian Python Team Uploaders: Stefano Rivera Homepage: https://cffi.readthedocs.org/ Standards-Version: 4.7.0 Vcs-Browser: https://salsa.debian.org/python-team/packages/python-cffi Vcs-Git: https://salsa.debian.org/python-team/packages/python-cffi.git Testsuite: autopkgtest Testsuite-Triggers: build-essential, python3-all-dbg, python3-all-dev, python3-py, python3-pytest, python3-setuptools, virtualenv Build-Depends: debhelper-compat (= 13), dh-python, dh-sequence-python3, libffi-dev, libpython3-all-dev, pybuild-plugin-pyproject, python3-all-dev:any, python3-py , python3-pycparser , python3-pytest , python3-setuptools, virtualenv Build-Depends-Indep: dh-sequence-sphinxdoc , python3-sphinx Package-List: python-cffi-doc deb doc optional arch=all python3-cffi deb python optional arch=all python3-cffi-backend deb python optional arch=any Checksums-Sha1: 6d35167bdc98f71dd0d0434b729efea62d548e22 516621 python-cffi_1.17.1.orig.tar.gz d931fb0805abe98490ab316ba1be28a461d32358 8368 python-cffi_1.17.1-2.debian.tar.xz Checksums-Sha256: 1c39c6016c32bc48dd54561950ebd6836e1670f2ae46128f67cf49e789c52824 516621 python-cffi_1.17.1.orig.tar.gz ad1edfd570a4cb94c87c7f332fc457bfe05d0757e9847446330a84d0bde265aa 8368 python-cffi_1.17.1-2.debian.tar.xz Files: 4336ca58b2df0cc3b163884d5fa2e5e2 516621 python-cffi_1.17.1.orig.tar.gz da07d057d634333cf77c2bb74f7b672a 8368 python-cffi_1.17.1-2.debian.tar.xz -----BEGIN PGP SIGNATURE----- iIoEARYKADIWIQTumtb5BSD6EfafSCRHew2wJjpU2AUCZzE5lhQcc3RlZmFub3JA ZGViaWFuLm9yZwAKCRBHew2wJjpU2BJKAQDyDD5WDDfsxzuRqBPqzj9roVH+oLvQ 4mjaGF2sL/6kMAD9GuVj8l6FrCbyslcUk+IcmAseCW9Jy3JRSJELHAHGEQg= =C6N0 -----END PGP SIGNATURE----- Fri Dec 13 11:25:26 UTC 2024 I: Checking whether the package is not for us Fri Dec 13 11:25:26 UTC 2024 I: Starting 1st build on remote node ionos2-i386.debian.net. Fri Dec 13 11:25:26 UTC 2024 I: Preparing to do remote build '1' on ionos2-i386.debian.net. Fri Dec 13 12:16:57 UTC 2024 I: Deleting $TMPDIR on ionos2-i386.debian.net. I: pbuilder: network access will be disabled during build I: Current time: Thu Dec 12 23:25:29 -12 2024 I: pbuilder-time-stamp: 1734089129 I: Building the build Environment I: extracting base tarball [/var/cache/pbuilder/unstable-reproducible-base.tgz] I: copying local configuration W: --override-config is not set; not updating apt.conf Read the manpage for details. I: mounting /proc filesystem I: mounting /sys filesystem I: creating /{dev,run}/shm I: mounting /dev/pts filesystem I: redirecting /dev/ptmx to /dev/pts/ptmx I: policy-rc.d already exists I: using eatmydata during job I: Copying source file I: copying [python-cffi_1.17.1-2.dsc] I: copying [./python-cffi_1.17.1.orig.tar.gz] I: copying [./python-cffi_1.17.1-2.debian.tar.xz] I: Extracting source gpgv: Signature made Sun Nov 10 22:54:14 2024 gpgv: using EDDSA key EE9AD6F90520FA11F69F4824477B0DB0263A54D8 gpgv: issuer "stefanor@debian.org" gpgv: Can't check signature: No public key dpkg-source: warning: cannot verify inline signature for ./python-cffi_1.17.1-2.dsc: no acceptable signature found dpkg-source: info: extracting python-cffi in python-cffi-1.17.1 dpkg-source: info: unpacking python-cffi_1.17.1.orig.tar.gz dpkg-source: info: unpacking python-cffi_1.17.1-2.debian.tar.xz dpkg-source: info: using patch list from debian/patches/series dpkg-source: info: applying bundled-wheel-and-setuptools I: Not using root during the build. I: Installing the build-deps I: user script /srv/workspace/pbuilder/47369/tmp/hooks/D02_print_environment starting I: set BUILDDIR='/build/reproducible-path' BUILDUSERGECOS='first user,first room,first work-phone,first home-phone,first other' BUILDUSERNAME='pbuilder1' BUILD_ARCH='i386' DEBIAN_FRONTEND='noninteractive' DEB_BUILD_OPTIONS='buildinfo=+all reproducible=+all parallel=11 ' DISTRIBUTION='unstable' HOME='/root' HOST_ARCH='i386' IFS=' ' INVOCATION_ID='1e614a291f8d49dcb022d41b8acbd332' LANG='C' LANGUAGE='en_US:en' LC_ALL='C' LD_LIBRARY_PATH='/usr/lib/libeatmydata' LD_PRELOAD='libeatmydata.so' MAIL='/var/mail/root' OPTIND='1' PATH='/usr/sbin:/usr/bin:/sbin:/bin:/usr/games' PBCURRENTCOMMANDLINEOPERATION='build' PBUILDER_OPERATION='build' PBUILDER_PKGDATADIR='/usr/share/pbuilder' PBUILDER_PKGLIBDIR='/usr/lib/pbuilder' PBUILDER_SYSCONFDIR='/etc' PPID='47369' PS1='# ' PS2='> ' PS4='+ ' PWD='/' SHELL='/bin/bash' SHLVL='2' SUDO_COMMAND='/usr/bin/timeout -k 18.1h 18h /usr/bin/ionice -c 3 /usr/bin/nice /usr/sbin/pbuilder --build --configfile /srv/reproducible-results/rbuild-debian/r-b-build.mLl8rzkG/pbuilderrc_nJuX --distribution unstable --hookdir /etc/pbuilder/first-build-hooks --debbuildopts -b --basetgz /var/cache/pbuilder/unstable-reproducible-base.tgz --buildresult /srv/reproducible-results/rbuild-debian/r-b-build.mLl8rzkG/b1 --logfile b1/build.log python-cffi_1.17.1-2.dsc' SUDO_GID='112' SUDO_UID='107' SUDO_USER='jenkins' TERM='unknown' TZ='/usr/share/zoneinfo/Etc/GMT+12' USER='root' _='/usr/bin/systemd-run' http_proxy='http://46.16.76.132:3128' I: uname -a Linux ionos2-i386 6.1.0-28-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.119-1 (2024-11-22) x86_64 GNU/Linux I: ls -l /bin lrwxrwxrwx 1 root root 7 Nov 22 14:40 /bin -> usr/bin I: user script /srv/workspace/pbuilder/47369/tmp/hooks/D02_print_environment finished -> Attempting to satisfy build-dependencies -> Creating pbuilder-satisfydepends-dummy package Package: pbuilder-satisfydepends-dummy Version: 0.invalid.0 Architecture: i386 Maintainer: Debian Pbuilder Team Description: Dummy package to satisfy dependencies with aptitude - created by pbuilder This package was created automatically by pbuilder to satisfy the build-dependencies of the package being currently built. Depends: debhelper-compat (= 13), dh-python, dh-sequence-python3, libffi-dev, libpython3-all-dev, pybuild-plugin-pyproject, python3-all-dev:any, python3-py, python3-pycparser, python3-pytest, python3-setuptools, virtualenv, dh-sequence-sphinxdoc, python3-sphinx dpkg-deb: building package 'pbuilder-satisfydepends-dummy' in '/tmp/satisfydepends-aptitude/pbuilder-satisfydepends-dummy.deb'. Selecting previously unselected package pbuilder-satisfydepends-dummy. (Reading database ... 19952 files and directories currently installed.) Preparing to unpack .../pbuilder-satisfydepends-dummy.deb ... Unpacking pbuilder-satisfydepends-dummy (0.invalid.0) ... dpkg: pbuilder-satisfydepends-dummy: dependency problems, but configuring anyway as you requested: pbuilder-satisfydepends-dummy depends on debhelper-compat (= 13); however: Package debhelper-compat is not installed. pbuilder-satisfydepends-dummy depends on dh-python; however: Package dh-python is not installed. pbuilder-satisfydepends-dummy depends on dh-sequence-python3; however: Package dh-sequence-python3 is not installed. pbuilder-satisfydepends-dummy depends on libffi-dev; however: Package libffi-dev is not installed. pbuilder-satisfydepends-dummy depends on libpython3-all-dev; however: Package libpython3-all-dev is not installed. pbuilder-satisfydepends-dummy depends on pybuild-plugin-pyproject; however: Package pybuild-plugin-pyproject is not installed. pbuilder-satisfydepends-dummy depends on python3-all-dev:any. pbuilder-satisfydepends-dummy depends on python3-py; however: Package python3-py is not installed. pbuilder-satisfydepends-dummy depends on python3-pycparser; however: Package python3-pycparser is not installed. pbuilder-satisfydepends-dummy depends on python3-pytest; however: Package python3-pytest is not installed. pbuilder-satisfydepends-dummy depends on python3-setuptools; however: Package python3-setuptools is not installed. pbuilder-satisfydepends-dummy depends on virtualenv; however: Package virtualenv is not installed. pbuilder-satisfydepends-dummy depends on dh-sequence-sphinxdoc; however: Package dh-sequence-sphinxdoc is not installed. pbuilder-satisfydepends-dummy depends on python3-sphinx; however: Package python3-sphinx is not installed. Setting up pbuilder-satisfydepends-dummy (0.invalid.0) ... Reading package lists... Building dependency tree... Reading state information... Initializing package states... Writing extended state information... Building tag database... pbuilder-satisfydepends-dummy is already installed at the requested version (0.invalid.0) pbuilder-satisfydepends-dummy is already installed at the requested version (0.invalid.0) The following NEW packages will be installed: autoconf{a} automake{a} autopoint{a} autotools-dev{a} bsdextrautils{a} ca-certificates{a} debhelper{a} dh-autoreconf{a} dh-python{a} dh-strip-nondeterminism{a} docutils-common{a} dwz{a} file{a} gettext{a} gettext-base{a} groff-base{a} intltool-debian{a} libarchive-zip-perl{a} libcom-err2{a} libdebhelper-perl{a} libelf1t64{a} libexpat1{a} libexpat1-dev{a} libffi-dev{a} libfile-stripnondeterminism-perl{a} libgssapi-krb5-2{a} libicu72{a} libjs-jquery{a} libjs-sphinxdoc{a} libjs-underscore{a} libjson-perl{a} libk5crypto3{a} libkeyutils1{a} libkrb5-3{a} libkrb5support0{a} libmagic-mgc{a} libmagic1t64{a} libnsl2{a} libpipeline1{a} libpython3-all-dev{a} libpython3-dev{a} libpython3-stdlib{a} libpython3.12-dev{a} libpython3.12-minimal{a} libpython3.12-stdlib{a} libpython3.12t64{a} libpython3.13{a} libpython3.13-dev{a} libpython3.13-minimal{a} libpython3.13-stdlib{a} libreadline8t64{a} libtirpc-common{a} libtirpc3t64{a} libtool{a} libuchardet0{a} libxml2{a} m4{a} man-db{a} media-types{a} netbase{a} openssl{a} po-debconf{a} pybuild-plugin-pyproject{a} python-babel-localedata{a} python3{a} python3-alabaster{a} python3-all{a} python3-all-dev{a} python3-autocommand{a} python3-babel{a} python3-build{a} python3-certifi{a} python3-chardet{a} python3-charset-normalizer{a} python3-defusedxml{a} python3-dev{a} python3-distlib{a} python3-docutils{a} python3-filelock{a} python3-idna{a} python3-imagesize{a} python3-inflect{a} python3-iniconfig{a} python3-installer{a} python3-jaraco.context{a} python3-jaraco.functools{a} python3-jaraco.text{a} python3-jinja2{a} python3-markupsafe{a} python3-minimal{a} python3-more-itertools{a} python3-packaging{a} python3-pip-whl{a} python3-pkg-resources{a} python3-platformdirs{a} python3-pluggy{a} python3-ply{a} python3-py{a} python3-pycparser{a} python3-pygments{a} python3-pyproject-hooks{a} python3-pytest{a} python3-requests{a} python3-roman{a} python3-setuptools{a} python3-setuptools-whl{a} python3-snowballstemmer{a} python3-sphinx{a} python3-toml{a} python3-typeguard{a} python3-typing-extensions{a} python3-urllib3{a} python3-virtualenv{a} python3-wheel{a} python3-wheel-whl{a} python3-zipp{a} python3.12{a} python3.12-dev{a} python3.12-minimal{a} python3.13{a} python3.13-dev{a} python3.13-minimal{a} readline-common{a} sensible-utils{a} sgml-base{a} sphinx-common{a} tzdata{a} virtualenv{a} xml-core{a} zlib1g-dev{a} The following packages are RECOMMENDED but will NOT be installed: curl javascript-common krb5-locales libarchive-cpio-perl libjson-xs-perl libltdl-dev libmail-sendmail-perl libpaper-utils lynx python3-pil wget 0 packages upgraded, 130 newly installed, 0 to remove and 0 not upgraded. Need to get 66.6 MB of archives. After unpacking 257 MB will be used. Writing extended state information... Get: 1 http://deb.debian.org/debian unstable/main i386 libpython3.12-minimal i386 3.12.8-2 [816 kB] Get: 2 http://deb.debian.org/debian unstable/main i386 libexpat1 i386 2.6.4-1 [107 kB] Get: 3 http://deb.debian.org/debian unstable/main i386 python3.12-minimal i386 3.12.8-2 [2241 kB] Get: 4 http://deb.debian.org/debian unstable/main i386 python3-minimal i386 3.12.7-1 [26.8 kB] Get: 5 http://deb.debian.org/debian unstable/main i386 media-types all 10.1.0 [26.9 kB] Get: 6 http://deb.debian.org/debian unstable/main i386 netbase all 6.4 [12.8 kB] Get: 7 http://deb.debian.org/debian unstable/main i386 tzdata all 2024b-4 [256 kB] Get: 8 http://deb.debian.org/debian unstable/main i386 libkrb5support0 i386 1.21.3-3 [34.9 kB] Get: 9 http://deb.debian.org/debian unstable/main i386 libcom-err2 i386 1.47.2~rc1-2 [24.0 kB] Get: 10 http://deb.debian.org/debian unstable/main i386 libk5crypto3 i386 1.21.3-3 [83.6 kB] Get: 11 http://deb.debian.org/debian unstable/main i386 libkeyutils1 i386 1.6.3-4 [9600 B] Get: 12 http://deb.debian.org/debian unstable/main i386 libkrb5-3 i386 1.21.3-3 [350 kB] Get: 13 http://deb.debian.org/debian unstable/main i386 libgssapi-krb5-2 i386 1.21.3-3 [146 kB] Get: 14 http://deb.debian.org/debian unstable/main i386 libtirpc-common all 1.3.4+ds-1.3 [10.9 kB] Get: 15 http://deb.debian.org/debian unstable/main i386 libtirpc3t64 i386 1.3.4+ds-1.3+b1 [90.5 kB] Get: 16 http://deb.debian.org/debian unstable/main i386 libnsl2 i386 1.3.0-3+b3 [42.7 kB] Get: 17 http://deb.debian.org/debian unstable/main i386 readline-common all 8.2-5 [69.3 kB] Get: 18 http://deb.debian.org/debian unstable/main i386 libreadline8t64 i386 8.2-5 [173 kB] Get: 19 http://deb.debian.org/debian unstable/main i386 libpython3.12-stdlib i386 3.12.8-2 [1966 kB] Get: 20 http://deb.debian.org/debian unstable/main i386 python3.12 i386 3.12.8-2 [677 kB] Get: 21 http://deb.debian.org/debian unstable/main i386 libpython3-stdlib i386 3.12.7-1 [9712 B] Get: 22 http://deb.debian.org/debian unstable/main i386 python3 i386 3.12.7-1 [27.8 kB] Get: 23 http://deb.debian.org/debian unstable/main i386 libpython3.13-minimal i386 3.13.1-2 [858 kB] Get: 24 http://deb.debian.org/debian unstable/main i386 python3.13-minimal i386 3.13.1-2 [2260 kB] Get: 25 http://deb.debian.org/debian unstable/main i386 sgml-base all 1.31 [15.4 kB] Get: 26 http://deb.debian.org/debian unstable/main i386 sensible-utils all 0.0.24 [24.8 kB] Get: 27 http://deb.debian.org/debian unstable/main i386 openssl i386 3.3.2-2 [1387 kB] Get: 28 http://deb.debian.org/debian unstable/main i386 ca-certificates all 20240203 [158 kB] Get: 29 http://deb.debian.org/debian unstable/main i386 libmagic-mgc i386 1:5.45-3+b1 [314 kB] Get: 30 http://deb.debian.org/debian unstable/main i386 libmagic1t64 i386 1:5.45-3+b1 [115 kB] Get: 31 http://deb.debian.org/debian unstable/main i386 file i386 1:5.45-3+b1 [43.2 kB] Get: 32 http://deb.debian.org/debian unstable/main i386 gettext-base i386 0.22.5-2 [201 kB] Get: 33 http://deb.debian.org/debian unstable/main i386 libuchardet0 i386 0.0.8-1+b2 [69.2 kB] Get: 34 http://deb.debian.org/debian unstable/main i386 groff-base i386 1.23.0-6 [1198 kB] Get: 35 http://deb.debian.org/debian unstable/main i386 bsdextrautils i386 2.40.2-12 [95.9 kB] Get: 36 http://deb.debian.org/debian unstable/main i386 libpipeline1 i386 1.5.8-1 [41.2 kB] Get: 37 http://deb.debian.org/debian unstable/main i386 man-db i386 2.13.0-1 [1428 kB] Get: 38 http://deb.debian.org/debian unstable/main i386 m4 i386 1.4.19-4 [293 kB] Get: 39 http://deb.debian.org/debian unstable/main i386 autoconf all 2.72-3 [493 kB] Get: 40 http://deb.debian.org/debian unstable/main i386 autotools-dev all 20220109.1 [51.6 kB] Get: 41 http://deb.debian.org/debian unstable/main i386 automake all 1:1.16.5-1.3 [823 kB] Get: 42 http://deb.debian.org/debian unstable/main i386 autopoint all 0.22.5-2 [723 kB] Get: 43 http://deb.debian.org/debian unstable/main i386 libdebhelper-perl all 13.20 [89.7 kB] Get: 44 http://deb.debian.org/debian unstable/main i386 libtool all 2.4.7-8 [517 kB] Get: 45 http://deb.debian.org/debian unstable/main i386 dh-autoreconf all 20 [17.1 kB] Get: 46 http://deb.debian.org/debian unstable/main i386 libarchive-zip-perl all 1.68-1 [104 kB] Get: 47 http://deb.debian.org/debian unstable/main i386 libfile-stripnondeterminism-perl all 1.14.0-1 [19.5 kB] Get: 48 http://deb.debian.org/debian unstable/main i386 dh-strip-nondeterminism all 1.14.0-1 [8448 B] Get: 49 http://deb.debian.org/debian unstable/main i386 libelf1t64 i386 0.192-4 [195 kB] Get: 50 http://deb.debian.org/debian unstable/main i386 dwz i386 0.15-1+b1 [116 kB] Get: 51 http://deb.debian.org/debian unstable/main i386 libicu72 i386 72.1-5+b1 [9583 kB] Get: 52 http://deb.debian.org/debian unstable/main i386 libxml2 i386 2.12.7+dfsg+really2.9.14-0.2+b1 [734 kB] Get: 53 http://deb.debian.org/debian unstable/main i386 gettext i386 0.22.5-2 [1631 kB] Get: 54 http://deb.debian.org/debian unstable/main i386 intltool-debian all 0.35.0+20060710.6 [22.9 kB] Get: 55 http://deb.debian.org/debian unstable/main i386 po-debconf all 1.0.21+nmu1 [248 kB] Get: 56 http://deb.debian.org/debian unstable/main i386 debhelper all 13.20 [915 kB] Get: 57 http://deb.debian.org/debian unstable/main i386 python3-autocommand all 2.2.2-3 [13.6 kB] Get: 58 http://deb.debian.org/debian unstable/main i386 python3-more-itertools all 10.5.0-1 [63.8 kB] Get: 59 http://deb.debian.org/debian unstable/main i386 python3-typing-extensions all 4.12.2-2 [73.0 kB] Get: 60 http://deb.debian.org/debian unstable/main i386 python3-typeguard all 4.4.1-1 [37.0 kB] Get: 61 http://deb.debian.org/debian unstable/main i386 python3-inflect all 7.3.1-2 [32.4 kB] Get: 62 http://deb.debian.org/debian unstable/main i386 python3-jaraco.context all 6.0.0-1 [7984 B] Get: 63 http://deb.debian.org/debian unstable/main i386 python3-jaraco.functools all 4.1.0-1 [12.0 kB] Get: 64 http://deb.debian.org/debian unstable/main i386 python3-pkg-resources all 75.2.0-1 [213 kB] Get: 65 http://deb.debian.org/debian unstable/main i386 python3-jaraco.text all 4.0.0-1 [11.4 kB] Get: 66 http://deb.debian.org/debian unstable/main i386 python3-zipp all 3.21.0-1 [10.6 kB] Get: 67 http://deb.debian.org/debian unstable/main i386 python3-setuptools all 75.2.0-1 [731 kB] Get: 68 http://deb.debian.org/debian unstable/main i386 dh-python all 6.20241024 [109 kB] Get: 69 http://deb.debian.org/debian unstable/main i386 xml-core all 0.19 [20.1 kB] Get: 70 http://deb.debian.org/debian unstable/main i386 docutils-common all 0.21.2+dfsg-2 [128 kB] Get: 71 http://deb.debian.org/debian unstable/main i386 libexpat1-dev i386 2.6.4-1 [165 kB] Get: 72 http://deb.debian.org/debian unstable/main i386 libffi-dev i386 3.4.6-1 [57.8 kB] Get: 73 http://deb.debian.org/debian unstable/main i386 libjs-jquery all 3.6.1+dfsg+~3.5.14-1 [326 kB] Get: 74 http://deb.debian.org/debian unstable/main i386 libjs-underscore all 1.13.4~dfsg+~1.11.4-3 [116 kB] Get: 75 http://deb.debian.org/debian unstable/main i386 libjs-sphinxdoc all 8.1.3-2 [30.3 kB] Get: 76 http://deb.debian.org/debian unstable/main i386 libjson-perl all 4.10000-1 [87.5 kB] Get: 77 http://deb.debian.org/debian unstable/main i386 libpython3.12t64 i386 3.12.8-2 [2171 kB] Get: 78 http://deb.debian.org/debian unstable/main i386 zlib1g-dev i386 1:1.3.dfsg+really1.3.1-1+b1 [916 kB] Get: 79 http://deb.debian.org/debian unstable/main i386 libpython3.12-dev i386 3.12.8-2 [5298 kB] Get: 80 http://deb.debian.org/debian unstable/main i386 libpython3-dev i386 3.12.7-1 [9988 B] Get: 81 http://deb.debian.org/debian unstable/main i386 libpython3.13-stdlib i386 3.13.1-2 [1981 kB] Get: 82 http://deb.debian.org/debian unstable/main i386 libpython3.13 i386 3.13.1-2 [2199 kB] Get: 83 http://deb.debian.org/debian unstable/main i386 libpython3.13-dev i386 3.13.1-2 [5193 kB] Get: 84 http://deb.debian.org/debian unstable/main i386 libpython3-all-dev i386 3.12.7-1 [1072 B] Get: 85 http://deb.debian.org/debian unstable/main i386 python3-packaging all 24.2-1 [55.3 kB] Get: 86 http://deb.debian.org/debian unstable/main i386 python3-pyproject-hooks all 1.2.0-1 [11.7 kB] Get: 87 http://deb.debian.org/debian unstable/main i386 python3-toml all 0.10.2-1 [16.2 kB] Get: 88 http://deb.debian.org/debian unstable/main i386 python3-wheel all 0.45.1-1 [56.7 kB] Get: 89 http://deb.debian.org/debian unstable/main i386 python3-build all 1.2.2-1 [36.0 kB] Get: 90 http://deb.debian.org/debian unstable/main i386 python3-installer all 0.7.0+dfsg1-3 [18.6 kB] Get: 91 http://deb.debian.org/debian unstable/main i386 pybuild-plugin-pyproject all 6.20241024 [11.4 kB] Get: 92 http://deb.debian.org/debian unstable/main i386 python-babel-localedata all 2.16.0-1 [5696 kB] Get: 93 http://deb.debian.org/debian unstable/main i386 python3-alabaster all 0.7.16-0.1 [27.9 kB] Get: 94 http://deb.debian.org/debian unstable/main i386 python3.13 i386 3.13.1-2 [740 kB] Get: 95 http://deb.debian.org/debian unstable/main i386 python3-all i386 3.12.7-1 [1052 B] Get: 96 http://deb.debian.org/debian unstable/main i386 python3.12-dev i386 3.12.8-2 [505 kB] Get: 97 http://deb.debian.org/debian unstable/main i386 python3-dev i386 3.12.7-1 [26.1 kB] Get: 98 http://deb.debian.org/debian unstable/main i386 python3.13-dev i386 3.13.1-2 [505 kB] Get: 99 http://deb.debian.org/debian unstable/main i386 python3-all-dev i386 3.12.7-1 [1076 B] Get: 100 http://deb.debian.org/debian unstable/main i386 python3-babel all 2.16.0-1 [114 kB] Get: 101 http://deb.debian.org/debian unstable/main i386 python3-certifi all 2024.8.30+dfsg-1 [9576 B] Get: 102 http://deb.debian.org/debian unstable/main i386 python3-chardet all 5.2.0+dfsg-1 [107 kB] Get: 103 http://deb.debian.org/debian unstable/main i386 python3-charset-normalizer i386 3.4.0-1+b1 [139 kB] Get: 104 http://deb.debian.org/debian unstable/main i386 python3-defusedxml all 0.7.1-3 [43.4 kB] Get: 105 http://deb.debian.org/debian unstable/main i386 python3-distlib all 0.3.9-1 [257 kB] Get: 106 http://deb.debian.org/debian unstable/main i386 python3-roman all 4.2-1 [10.4 kB] Get: 107 http://deb.debian.org/debian unstable/main i386 python3-docutils all 0.21.2+dfsg-2 [403 kB] Get: 108 http://deb.debian.org/debian unstable/main i386 python3-filelock all 3.16.1-1 [12.6 kB] Get: 109 http://deb.debian.org/debian unstable/main i386 python3-idna all 3.8-2 [41.6 kB] Get: 110 http://deb.debian.org/debian unstable/main i386 python3-imagesize all 1.4.1-1 [6688 B] Get: 111 http://deb.debian.org/debian unstable/main i386 python3-iniconfig all 1.1.1-2 [6396 B] Get: 112 http://deb.debian.org/debian unstable/main i386 python3-markupsafe i386 2.1.5-1+b2 [13.9 kB] Get: 113 http://deb.debian.org/debian unstable/main i386 python3-jinja2 all 3.1.3-1 [119 kB] Get: 114 http://deb.debian.org/debian unstable/main i386 python3-pip-whl all 24.3.1+dfsg-1 [1501 kB] Get: 115 http://deb.debian.org/debian unstable/main i386 python3-platformdirs all 4.3.6-1 [16.6 kB] Get: 116 http://deb.debian.org/debian unstable/main i386 python3-pluggy all 1.5.0-1 [26.9 kB] Get: 117 http://deb.debian.org/debian unstable/main i386 python3-ply all 3.11-7 [62.6 kB] Get: 118 http://deb.debian.org/debian unstable/main i386 python3-py all 1.11.0-2 [88.7 kB] Get: 119 http://deb.debian.org/debian unstable/main i386 python3-pycparser all 2.22-2 [78.0 kB] Get: 120 http://deb.debian.org/debian unstable/main i386 python3-pygments all 2.18.0+dfsg-1 [836 kB] Get: 121 http://deb.debian.org/debian unstable/main i386 python3-pytest all 8.3.4-1 [250 kB] Get: 122 http://deb.debian.org/debian unstable/main i386 python3-urllib3 all 2.2.3-4 [112 kB] Get: 123 http://deb.debian.org/debian unstable/main i386 python3-requests all 2.32.3+dfsg-1 [71.9 kB] Get: 124 http://deb.debian.org/debian unstable/main i386 python3-setuptools-whl all 75.2.0-1 [1249 kB] Get: 125 http://deb.debian.org/debian unstable/main i386 python3-snowballstemmer all 2.2.0-4 [58.0 kB] Get: 126 http://deb.debian.org/debian unstable/main i386 sphinx-common all 8.1.3-2 [616 kB] Get: 127 http://deb.debian.org/debian unstable/main i386 python3-sphinx all 8.1.3-2 [468 kB] Get: 128 http://deb.debian.org/debian unstable/main i386 python3-wheel-whl all 0.45.1-1 [75.3 kB] Get: 129 http://deb.debian.org/debian unstable/main i386 python3-virtualenv all 20.28.0+ds-1 [71.3 kB] Get: 130 http://deb.debian.org/debian unstable/main i386 virtualenv all 20.28.0+ds-1 [7132 B] Fetched 66.6 MB in 2s (34.1 MB/s) debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package libpython3.12-minimal:i386. (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 19952 files and directories currently installed.) Preparing to unpack .../libpython3.12-minimal_3.12.8-2_i386.deb ... Unpacking libpython3.12-minimal:i386 (3.12.8-2) ... Selecting previously unselected package libexpat1:i386. Preparing to unpack .../libexpat1_2.6.4-1_i386.deb ... Unpacking libexpat1:i386 (2.6.4-1) ... Selecting previously unselected package python3.12-minimal. Preparing to unpack .../python3.12-minimal_3.12.8-2_i386.deb ... Unpacking python3.12-minimal (3.12.8-2) ... Setting up libpython3.12-minimal:i386 (3.12.8-2) ... Setting up libexpat1:i386 (2.6.4-1) ... Setting up python3.12-minimal (3.12.8-2) ... Selecting previously unselected package python3-minimal. (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 20272 files and directories currently installed.) Preparing to unpack .../00-python3-minimal_3.12.7-1_i386.deb ... Unpacking python3-minimal (3.12.7-1) ... Selecting previously unselected package media-types. Preparing to unpack .../01-media-types_10.1.0_all.deb ... Unpacking media-types (10.1.0) ... Selecting previously unselected package netbase. Preparing to unpack .../02-netbase_6.4_all.deb ... Unpacking netbase (6.4) ... Selecting previously unselected package tzdata. Preparing to unpack .../03-tzdata_2024b-4_all.deb ... Unpacking tzdata (2024b-4) ... Selecting previously unselected package libkrb5support0:i386. Preparing to unpack .../04-libkrb5support0_1.21.3-3_i386.deb ... Unpacking libkrb5support0:i386 (1.21.3-3) ... Selecting previously unselected package libcom-err2:i386. Preparing to unpack .../05-libcom-err2_1.47.2~rc1-2_i386.deb ... Unpacking libcom-err2:i386 (1.47.2~rc1-2) ... Selecting previously unselected package libk5crypto3:i386. Preparing to unpack .../06-libk5crypto3_1.21.3-3_i386.deb ... Unpacking libk5crypto3:i386 (1.21.3-3) ... Selecting previously unselected package libkeyutils1:i386. Preparing to unpack .../07-libkeyutils1_1.6.3-4_i386.deb ... Unpacking libkeyutils1:i386 (1.6.3-4) ... Selecting previously unselected package libkrb5-3:i386. Preparing to unpack .../08-libkrb5-3_1.21.3-3_i386.deb ... Unpacking libkrb5-3:i386 (1.21.3-3) ... Selecting previously unselected package libgssapi-krb5-2:i386. Preparing to unpack .../09-libgssapi-krb5-2_1.21.3-3_i386.deb ... Unpacking libgssapi-krb5-2:i386 (1.21.3-3) ... Selecting previously unselected package libtirpc-common. Preparing to unpack .../10-libtirpc-common_1.3.4+ds-1.3_all.deb ... Unpacking libtirpc-common (1.3.4+ds-1.3) ... Selecting previously unselected package libtirpc3t64:i386. Preparing to unpack .../11-libtirpc3t64_1.3.4+ds-1.3+b1_i386.deb ... Adding 'diversion of /lib/i386-linux-gnu/libtirpc.so.3 to /lib/i386-linux-gnu/libtirpc.so.3.usr-is-merged by libtirpc3t64' Adding 'diversion of /lib/i386-linux-gnu/libtirpc.so.3.0.0 to /lib/i386-linux-gnu/libtirpc.so.3.0.0.usr-is-merged by libtirpc3t64' Unpacking libtirpc3t64:i386 (1.3.4+ds-1.3+b1) ... Selecting previously unselected package libnsl2:i386. Preparing to unpack .../12-libnsl2_1.3.0-3+b3_i386.deb ... Unpacking libnsl2:i386 (1.3.0-3+b3) ... Selecting previously unselected package readline-common. Preparing to unpack .../13-readline-common_8.2-5_all.deb ... Unpacking readline-common (8.2-5) ... Selecting previously unselected package libreadline8t64:i386. Preparing to unpack .../14-libreadline8t64_8.2-5_i386.deb ... Adding 'diversion of /lib/i386-linux-gnu/libhistory.so.8 to /lib/i386-linux-gnu/libhistory.so.8.usr-is-merged by libreadline8t64' Adding 'diversion of /lib/i386-linux-gnu/libhistory.so.8.2 to /lib/i386-linux-gnu/libhistory.so.8.2.usr-is-merged by libreadline8t64' Adding 'diversion of /lib/i386-linux-gnu/libreadline.so.8 to /lib/i386-linux-gnu/libreadline.so.8.usr-is-merged by libreadline8t64' Adding 'diversion of /lib/i386-linux-gnu/libreadline.so.8.2 to /lib/i386-linux-gnu/libreadline.so.8.2.usr-is-merged by libreadline8t64' Unpacking libreadline8t64:i386 (8.2-5) ... Selecting previously unselected package libpython3.12-stdlib:i386. Preparing to unpack .../15-libpython3.12-stdlib_3.12.8-2_i386.deb ... Unpacking libpython3.12-stdlib:i386 (3.12.8-2) ... Selecting previously unselected package python3.12. Preparing to unpack .../16-python3.12_3.12.8-2_i386.deb ... Unpacking python3.12 (3.12.8-2) ... Selecting previously unselected package libpython3-stdlib:i386. Preparing to unpack .../17-libpython3-stdlib_3.12.7-1_i386.deb ... Unpacking libpython3-stdlib:i386 (3.12.7-1) ... Setting up python3-minimal (3.12.7-1) ... Selecting previously unselected package python3. (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 21335 files and directories currently installed.) Preparing to unpack .../000-python3_3.12.7-1_i386.deb ... Unpacking python3 (3.12.7-1) ... Selecting previously unselected package libpython3.13-minimal:i386. Preparing to unpack .../001-libpython3.13-minimal_3.13.1-2_i386.deb ... Unpacking libpython3.13-minimal:i386 (3.13.1-2) ... Selecting previously unselected package python3.13-minimal. Preparing to unpack .../002-python3.13-minimal_3.13.1-2_i386.deb ... Unpacking python3.13-minimal (3.13.1-2) ... Selecting previously unselected package sgml-base. Preparing to unpack .../003-sgml-base_1.31_all.deb ... Unpacking sgml-base (1.31) ... Selecting previously unselected package sensible-utils. Preparing to unpack .../004-sensible-utils_0.0.24_all.deb ... Unpacking sensible-utils (0.0.24) ... Selecting previously unselected package openssl. Preparing to unpack .../005-openssl_3.3.2-2_i386.deb ... Unpacking openssl (3.3.2-2) ... Selecting previously unselected package ca-certificates. Preparing to unpack .../006-ca-certificates_20240203_all.deb ... Unpacking ca-certificates (20240203) ... Selecting previously unselected package libmagic-mgc. Preparing to unpack .../007-libmagic-mgc_1%3a5.45-3+b1_i386.deb ... Unpacking libmagic-mgc (1:5.45-3+b1) ... Selecting previously unselected package libmagic1t64:i386. Preparing to unpack .../008-libmagic1t64_1%3a5.45-3+b1_i386.deb ... Unpacking libmagic1t64:i386 (1:5.45-3+b1) ... Selecting previously unselected package file. Preparing to unpack .../009-file_1%3a5.45-3+b1_i386.deb ... Unpacking file (1:5.45-3+b1) ... Selecting previously unselected package gettext-base. Preparing to unpack .../010-gettext-base_0.22.5-2_i386.deb ... Unpacking gettext-base (0.22.5-2) ... Selecting previously unselected package libuchardet0:i386. Preparing to unpack .../011-libuchardet0_0.0.8-1+b2_i386.deb ... Unpacking libuchardet0:i386 (0.0.8-1+b2) ... Selecting previously unselected package groff-base. Preparing to unpack .../012-groff-base_1.23.0-6_i386.deb ... Unpacking groff-base (1.23.0-6) ... Selecting previously unselected package bsdextrautils. Preparing to unpack .../013-bsdextrautils_2.40.2-12_i386.deb ... Unpacking bsdextrautils (2.40.2-12) ... Selecting previously unselected package libpipeline1:i386. Preparing to unpack .../014-libpipeline1_1.5.8-1_i386.deb ... Unpacking libpipeline1:i386 (1.5.8-1) ... Selecting previously unselected package man-db. Preparing to unpack .../015-man-db_2.13.0-1_i386.deb ... Unpacking man-db (2.13.0-1) ... Selecting previously unselected package m4. Preparing to unpack .../016-m4_1.4.19-4_i386.deb ... Unpacking m4 (1.4.19-4) ... Selecting previously unselected package autoconf. Preparing to unpack .../017-autoconf_2.72-3_all.deb ... Unpacking autoconf (2.72-3) ... Selecting previously unselected package autotools-dev. Preparing to unpack .../018-autotools-dev_20220109.1_all.deb ... Unpacking autotools-dev (20220109.1) ... Selecting previously unselected package automake. Preparing to unpack .../019-automake_1%3a1.16.5-1.3_all.deb ... Unpacking automake (1:1.16.5-1.3) ... Selecting previously unselected package autopoint. Preparing to unpack .../020-autopoint_0.22.5-2_all.deb ... Unpacking autopoint (0.22.5-2) ... Selecting previously unselected package libdebhelper-perl. Preparing to unpack .../021-libdebhelper-perl_13.20_all.deb ... Unpacking libdebhelper-perl (13.20) ... Selecting previously unselected package libtool. Preparing to unpack .../022-libtool_2.4.7-8_all.deb ... Unpacking libtool (2.4.7-8) ... Selecting previously unselected package dh-autoreconf. Preparing to unpack .../023-dh-autoreconf_20_all.deb ... Unpacking dh-autoreconf (20) ... Selecting previously unselected package libarchive-zip-perl. Preparing to unpack .../024-libarchive-zip-perl_1.68-1_all.deb ... Unpacking libarchive-zip-perl (1.68-1) ... Selecting previously unselected package libfile-stripnondeterminism-perl. Preparing to unpack .../025-libfile-stripnondeterminism-perl_1.14.0-1_all.deb ... Unpacking libfile-stripnondeterminism-perl (1.14.0-1) ... Selecting previously unselected package dh-strip-nondeterminism. Preparing to unpack .../026-dh-strip-nondeterminism_1.14.0-1_all.deb ... Unpacking dh-strip-nondeterminism (1.14.0-1) ... Selecting previously unselected package libelf1t64:i386. Preparing to unpack .../027-libelf1t64_0.192-4_i386.deb ... Unpacking libelf1t64:i386 (0.192-4) ... Selecting previously unselected package dwz. Preparing to unpack .../028-dwz_0.15-1+b1_i386.deb ... Unpacking dwz (0.15-1+b1) ... Selecting previously unselected package libicu72:i386. Preparing to unpack .../029-libicu72_72.1-5+b1_i386.deb ... Unpacking libicu72:i386 (72.1-5+b1) ... Selecting previously unselected package libxml2:i386. Preparing to unpack .../030-libxml2_2.12.7+dfsg+really2.9.14-0.2+b1_i386.deb ... Unpacking libxml2:i386 (2.12.7+dfsg+really2.9.14-0.2+b1) ... Selecting previously unselected package gettext. Preparing to unpack .../031-gettext_0.22.5-2_i386.deb ... Unpacking gettext (0.22.5-2) ... Selecting previously unselected package intltool-debian. Preparing to unpack .../032-intltool-debian_0.35.0+20060710.6_all.deb ... Unpacking intltool-debian (0.35.0+20060710.6) ... Selecting previously unselected package po-debconf. Preparing to unpack .../033-po-debconf_1.0.21+nmu1_all.deb ... Unpacking po-debconf (1.0.21+nmu1) ... Selecting previously unselected package debhelper. Preparing to unpack .../034-debhelper_13.20_all.deb ... Unpacking debhelper (13.20) ... Selecting previously unselected package python3-autocommand. Preparing to unpack .../035-python3-autocommand_2.2.2-3_all.deb ... Unpacking python3-autocommand (2.2.2-3) ... Selecting previously unselected package python3-more-itertools. Preparing to unpack .../036-python3-more-itertools_10.5.0-1_all.deb ... Unpacking python3-more-itertools (10.5.0-1) ... Selecting previously unselected package python3-typing-extensions. Preparing to unpack .../037-python3-typing-extensions_4.12.2-2_all.deb ... Unpacking python3-typing-extensions (4.12.2-2) ... Selecting previously unselected package python3-typeguard. Preparing to unpack .../038-python3-typeguard_4.4.1-1_all.deb ... Unpacking python3-typeguard (4.4.1-1) ... Selecting previously unselected package python3-inflect. Preparing to unpack .../039-python3-inflect_7.3.1-2_all.deb ... Unpacking python3-inflect (7.3.1-2) ... Selecting previously unselected package python3-jaraco.context. Preparing to unpack .../040-python3-jaraco.context_6.0.0-1_all.deb ... Unpacking python3-jaraco.context (6.0.0-1) ... Selecting previously unselected package python3-jaraco.functools. Preparing to unpack .../041-python3-jaraco.functools_4.1.0-1_all.deb ... Unpacking python3-jaraco.functools (4.1.0-1) ... Selecting previously unselected package python3-pkg-resources. Preparing to unpack .../042-python3-pkg-resources_75.2.0-1_all.deb ... Unpacking python3-pkg-resources (75.2.0-1) ... Selecting previously unselected package python3-jaraco.text. Preparing to unpack .../043-python3-jaraco.text_4.0.0-1_all.deb ... Unpacking python3-jaraco.text (4.0.0-1) ... Selecting previously unselected package python3-zipp. Preparing to unpack .../044-python3-zipp_3.21.0-1_all.deb ... Unpacking python3-zipp (3.21.0-1) ... Selecting previously unselected package python3-setuptools. Preparing to unpack .../045-python3-setuptools_75.2.0-1_all.deb ... Unpacking python3-setuptools (75.2.0-1) ... Selecting previously unselected package dh-python. Preparing to unpack .../046-dh-python_6.20241024_all.deb ... Unpacking dh-python (6.20241024) ... Selecting previously unselected package xml-core. Preparing to unpack .../047-xml-core_0.19_all.deb ... Unpacking xml-core (0.19) ... Selecting previously unselected package docutils-common. Preparing to unpack .../048-docutils-common_0.21.2+dfsg-2_all.deb ... Unpacking docutils-common (0.21.2+dfsg-2) ... Selecting previously unselected package libexpat1-dev:i386. Preparing to unpack .../049-libexpat1-dev_2.6.4-1_i386.deb ... Unpacking libexpat1-dev:i386 (2.6.4-1) ... Selecting previously unselected package libffi-dev:i386. Preparing to unpack .../050-libffi-dev_3.4.6-1_i386.deb ... Unpacking libffi-dev:i386 (3.4.6-1) ... Selecting previously unselected package libjs-jquery. Preparing to unpack .../051-libjs-jquery_3.6.1+dfsg+~3.5.14-1_all.deb ... Unpacking libjs-jquery (3.6.1+dfsg+~3.5.14-1) ... Selecting previously unselected package libjs-underscore. Preparing to unpack .../052-libjs-underscore_1.13.4~dfsg+~1.11.4-3_all.deb ... Unpacking libjs-underscore (1.13.4~dfsg+~1.11.4-3) ... Selecting previously unselected package libjs-sphinxdoc. Preparing to unpack .../053-libjs-sphinxdoc_8.1.3-2_all.deb ... Unpacking libjs-sphinxdoc (8.1.3-2) ... Selecting previously unselected package libjson-perl. Preparing to unpack .../054-libjson-perl_4.10000-1_all.deb ... Unpacking libjson-perl (4.10000-1) ... Selecting previously unselected package libpython3.12t64:i386. Preparing to unpack .../055-libpython3.12t64_3.12.8-2_i386.deb ... Unpacking libpython3.12t64:i386 (3.12.8-2) ... Selecting previously unselected package zlib1g-dev:i386. Preparing to unpack .../056-zlib1g-dev_1%3a1.3.dfsg+really1.3.1-1+b1_i386.deb ... Unpacking zlib1g-dev:i386 (1:1.3.dfsg+really1.3.1-1+b1) ... Selecting previously unselected package libpython3.12-dev:i386. Preparing to unpack .../057-libpython3.12-dev_3.12.8-2_i386.deb ... Unpacking libpython3.12-dev:i386 (3.12.8-2) ... Selecting previously unselected package libpython3-dev:i386. Preparing to unpack .../058-libpython3-dev_3.12.7-1_i386.deb ... Unpacking libpython3-dev:i386 (3.12.7-1) ... Selecting previously unselected package libpython3.13-stdlib:i386. Preparing to unpack .../059-libpython3.13-stdlib_3.13.1-2_i386.deb ... Unpacking libpython3.13-stdlib:i386 (3.13.1-2) ... Selecting previously unselected package libpython3.13:i386. Preparing to unpack .../060-libpython3.13_3.13.1-2_i386.deb ... Unpacking libpython3.13:i386 (3.13.1-2) ... Selecting previously unselected package libpython3.13-dev:i386. Preparing to unpack .../061-libpython3.13-dev_3.13.1-2_i386.deb ... Unpacking libpython3.13-dev:i386 (3.13.1-2) ... Selecting previously unselected package libpython3-all-dev:i386. Preparing to unpack .../062-libpython3-all-dev_3.12.7-1_i386.deb ... Unpacking libpython3-all-dev:i386 (3.12.7-1) ... Selecting previously unselected package python3-packaging. Preparing to unpack .../063-python3-packaging_24.2-1_all.deb ... Unpacking python3-packaging (24.2-1) ... Selecting previously unselected package python3-pyproject-hooks. Preparing to unpack .../064-python3-pyproject-hooks_1.2.0-1_all.deb ... Unpacking python3-pyproject-hooks (1.2.0-1) ... Selecting previously unselected package python3-toml. Preparing to unpack .../065-python3-toml_0.10.2-1_all.deb ... Unpacking python3-toml (0.10.2-1) ... Selecting previously unselected package python3-wheel. Preparing to unpack .../066-python3-wheel_0.45.1-1_all.deb ... Unpacking python3-wheel (0.45.1-1) ... Selecting previously unselected package python3-build. Preparing to unpack .../067-python3-build_1.2.2-1_all.deb ... Unpacking python3-build (1.2.2-1) ... Selecting previously unselected package python3-installer. Preparing to unpack .../068-python3-installer_0.7.0+dfsg1-3_all.deb ... Unpacking python3-installer (0.7.0+dfsg1-3) ... Selecting previously unselected package pybuild-plugin-pyproject. Preparing to unpack .../069-pybuild-plugin-pyproject_6.20241024_all.deb ... Unpacking pybuild-plugin-pyproject (6.20241024) ... Selecting previously unselected package python-babel-localedata. Preparing to unpack .../070-python-babel-localedata_2.16.0-1_all.deb ... Unpacking python-babel-localedata (2.16.0-1) ... Selecting previously unselected package python3-alabaster. Preparing to unpack .../071-python3-alabaster_0.7.16-0.1_all.deb ... Unpacking python3-alabaster (0.7.16-0.1) ... Selecting previously unselected package python3.13. Preparing to unpack .../072-python3.13_3.13.1-2_i386.deb ... Unpacking python3.13 (3.13.1-2) ... Selecting previously unselected package python3-all. Preparing to unpack .../073-python3-all_3.12.7-1_i386.deb ... Unpacking python3-all (3.12.7-1) ... Selecting previously unselected package python3.12-dev. Preparing to unpack .../074-python3.12-dev_3.12.8-2_i386.deb ... Unpacking python3.12-dev (3.12.8-2) ... Selecting previously unselected package python3-dev. Preparing to unpack .../075-python3-dev_3.12.7-1_i386.deb ... Unpacking python3-dev (3.12.7-1) ... Selecting previously unselected package python3.13-dev. Preparing to unpack .../076-python3.13-dev_3.13.1-2_i386.deb ... Unpacking python3.13-dev (3.13.1-2) ... Selecting previously unselected package python3-all-dev. Preparing to unpack .../077-python3-all-dev_3.12.7-1_i386.deb ... Unpacking python3-all-dev (3.12.7-1) ... Selecting previously unselected package python3-babel. Preparing to unpack .../078-python3-babel_2.16.0-1_all.deb ... Unpacking python3-babel (2.16.0-1) ... Selecting previously unselected package python3-certifi. Preparing to unpack .../079-python3-certifi_2024.8.30+dfsg-1_all.deb ... Unpacking python3-certifi (2024.8.30+dfsg-1) ... Selecting previously unselected package python3-chardet. Preparing to unpack .../080-python3-chardet_5.2.0+dfsg-1_all.deb ... Unpacking python3-chardet (5.2.0+dfsg-1) ... Selecting previously unselected package python3-charset-normalizer. Preparing to unpack .../081-python3-charset-normalizer_3.4.0-1+b1_i386.deb ... Unpacking python3-charset-normalizer (3.4.0-1+b1) ... Selecting previously unselected package python3-defusedxml. Preparing to unpack .../082-python3-defusedxml_0.7.1-3_all.deb ... Unpacking python3-defusedxml (0.7.1-3) ... Selecting previously unselected package python3-distlib. Preparing to unpack .../083-python3-distlib_0.3.9-1_all.deb ... Unpacking python3-distlib (0.3.9-1) ... Selecting previously unselected package python3-roman. Preparing to unpack .../084-python3-roman_4.2-1_all.deb ... Unpacking python3-roman (4.2-1) ... Selecting previously unselected package python3-docutils. Preparing to unpack .../085-python3-docutils_0.21.2+dfsg-2_all.deb ... Unpacking python3-docutils (0.21.2+dfsg-2) ... Selecting previously unselected package python3-filelock. Preparing to unpack .../086-python3-filelock_3.16.1-1_all.deb ... Unpacking python3-filelock (3.16.1-1) ... Selecting previously unselected package python3-idna. Preparing to unpack .../087-python3-idna_3.8-2_all.deb ... Unpacking python3-idna (3.8-2) ... Selecting previously unselected package python3-imagesize. Preparing to unpack .../088-python3-imagesize_1.4.1-1_all.deb ... Unpacking python3-imagesize (1.4.1-1) ... Selecting previously unselected package python3-iniconfig. Preparing to unpack .../089-python3-iniconfig_1.1.1-2_all.deb ... Unpacking python3-iniconfig (1.1.1-2) ... Selecting previously unselected package python3-markupsafe. Preparing to unpack .../090-python3-markupsafe_2.1.5-1+b2_i386.deb ... Unpacking python3-markupsafe (2.1.5-1+b2) ... Selecting previously unselected package python3-jinja2. Preparing to unpack .../091-python3-jinja2_3.1.3-1_all.deb ... Unpacking python3-jinja2 (3.1.3-1) ... Selecting previously unselected package python3-pip-whl. Preparing to unpack .../092-python3-pip-whl_24.3.1+dfsg-1_all.deb ... Unpacking python3-pip-whl (24.3.1+dfsg-1) ... Selecting previously unselected package python3-platformdirs. Preparing to unpack .../093-python3-platformdirs_4.3.6-1_all.deb ... Unpacking python3-platformdirs (4.3.6-1) ... Selecting previously unselected package python3-pluggy. Preparing to unpack .../094-python3-pluggy_1.5.0-1_all.deb ... Unpacking python3-pluggy (1.5.0-1) ... Selecting previously unselected package python3-ply. Preparing to unpack .../095-python3-ply_3.11-7_all.deb ... Unpacking python3-ply (3.11-7) ... Selecting previously unselected package python3-py. Preparing to unpack .../096-python3-py_1.11.0-2_all.deb ... Unpacking python3-py (1.11.0-2) ... Selecting previously unselected package python3-pycparser. Preparing to unpack .../097-python3-pycparser_2.22-2_all.deb ... Unpacking python3-pycparser (2.22-2) ... Selecting previously unselected package python3-pygments. Preparing to unpack .../098-python3-pygments_2.18.0+dfsg-1_all.deb ... Unpacking python3-pygments (2.18.0+dfsg-1) ... Selecting previously unselected package python3-pytest. Preparing to unpack .../099-python3-pytest_8.3.4-1_all.deb ... Unpacking python3-pytest (8.3.4-1) ... Selecting previously unselected package python3-urllib3. Preparing to unpack .../100-python3-urllib3_2.2.3-4_all.deb ... Unpacking python3-urllib3 (2.2.3-4) ... Selecting previously unselected package python3-requests. Preparing to unpack .../101-python3-requests_2.32.3+dfsg-1_all.deb ... Unpacking python3-requests (2.32.3+dfsg-1) ... Selecting previously unselected package python3-setuptools-whl. Preparing to unpack .../102-python3-setuptools-whl_75.2.0-1_all.deb ... Unpacking python3-setuptools-whl (75.2.0-1) ... Selecting previously unselected package python3-snowballstemmer. Preparing to unpack .../103-python3-snowballstemmer_2.2.0-4_all.deb ... Unpacking python3-snowballstemmer (2.2.0-4) ... Selecting previously unselected package sphinx-common. Preparing to unpack .../104-sphinx-common_8.1.3-2_all.deb ... Unpacking sphinx-common (8.1.3-2) ... Selecting previously unselected package python3-sphinx. Preparing to unpack .../105-python3-sphinx_8.1.3-2_all.deb ... Unpacking python3-sphinx (8.1.3-2) ... Selecting previously unselected package python3-wheel-whl. Preparing to unpack .../106-python3-wheel-whl_0.45.1-1_all.deb ... Unpacking python3-wheel-whl (0.45.1-1) ... Selecting previously unselected package python3-virtualenv. Preparing to unpack .../107-python3-virtualenv_20.28.0+ds-1_all.deb ... Unpacking python3-virtualenv (20.28.0+ds-1) ... Selecting previously unselected package virtualenv. Preparing to unpack .../108-virtualenv_20.28.0+ds-1_all.deb ... Unpacking virtualenv (20.28.0+ds-1) ... Setting up media-types (10.1.0) ... Setting up libpipeline1:i386 (1.5.8-1) ... Setting up python3-setuptools-whl (75.2.0-1) ... Setting up libkeyutils1:i386 (1.6.3-4) ... Setting up libicu72:i386 (72.1-5+b1) ... Setting up bsdextrautils (2.40.2-12) ... Setting up libmagic-mgc (1:5.45-3+b1) ... Setting up libarchive-zip-perl (1.68-1) ... Setting up libtirpc-common (1.3.4+ds-1.3) ... Setting up libdebhelper-perl (13.20) ... Setting up libmagic1t64:i386 (1:5.45-3+b1) ... Setting up gettext-base (0.22.5-2) ... Setting up m4 (1.4.19-4) ... Setting up libcom-err2:i386 (1.47.2~rc1-2) ... Setting up file (1:5.45-3+b1) ... Setting up libffi-dev:i386 (3.4.6-1) ... Setting up libelf1t64:i386 (0.192-4) ... Setting up python-babel-localedata (2.16.0-1) ... Setting up libkrb5support0:i386 (1.21.3-3) ... Setting up tzdata (2024b-4) ... Current default time zone: 'Etc/UTC' Local time is now: Fri Dec 13 11:27:03 UTC 2024. Universal Time is now: Fri Dec 13 11:27:03 UTC 2024. Run 'dpkg-reconfigure tzdata' if you wish to change it. Setting up libpython3.13-minimal:i386 (3.13.1-2) ... Setting up autotools-dev (20220109.1) ... Setting up libexpat1-dev:i386 (2.6.4-1) ... Setting up autopoint (0.22.5-2) ... Setting up libk5crypto3:i386 (1.21.3-3) ... Setting up autoconf (2.72-3) ... Setting up zlib1g-dev:i386 (1:1.3.dfsg+really1.3.1-1+b1) ... Setting up dwz (0.15-1+b1) ... Setting up sensible-utils (0.0.24) ... Setting up libuchardet0:i386 (0.0.8-1+b2) ... Setting up libjson-perl (4.10000-1) ... Setting up python3.13-minimal (3.13.1-2) ... Setting up netbase (6.4) ... Setting up sgml-base (1.31) ... Setting up libkrb5-3:i386 (1.21.3-3) ... Setting up libjs-jquery (3.6.1+dfsg+~3.5.14-1) ... Setting up openssl (3.3.2-2) ... Setting up python3-wheel-whl (0.45.1-1) ... Setting up readline-common (8.2-5) ... Setting up libxml2:i386 (2.12.7+dfsg+really2.9.14-0.2+b1) ... Setting up libjs-underscore (1.13.4~dfsg+~1.11.4-3) ... Setting up automake (1:1.16.5-1.3) ... update-alternatives: using /usr/bin/automake-1.16 to provide /usr/bin/automake (automake) in auto mode Setting up libfile-stripnondeterminism-perl (1.14.0-1) ... Setting up gettext (0.22.5-2) ... Setting up libtool (2.4.7-8) ... Setting up intltool-debian (0.35.0+20060710.6) ... Setting up dh-autoreconf (20) ... Setting up ca-certificates (20240203) ... Updating certificates in /etc/ssl/certs... 146 added, 0 removed; done. Setting up libgssapi-krb5-2:i386 (1.21.3-3) ... Setting up libjs-sphinxdoc (8.1.3-2) ... Setting up libreadline8t64:i386 (8.2-5) ... Setting up dh-strip-nondeterminism (1.14.0-1) ... Setting up groff-base (1.23.0-6) ... Setting up xml-core (0.19) ... Setting up libpython3.13-stdlib:i386 (3.13.1-2) ... Setting up libpython3.13:i386 (3.13.1-2) ... Setting up libtirpc3t64:i386 (1.3.4+ds-1.3+b1) ... Setting up python3.13 (3.13.1-2) ... Setting up python3-pip-whl (24.3.1+dfsg-1) ... Setting up po-debconf (1.0.21+nmu1) ... Setting up man-db (2.13.0-1) ... Not building database; man-db/auto-update is not 'true'. Setting up libpython3.13-dev:i386 (3.13.1-2) ... Setting up sphinx-common (8.1.3-2) ... Setting up libnsl2:i386 (1.3.0-3+b3) ... Setting up libpython3.12-stdlib:i386 (3.12.8-2) ... Setting up python3.13-dev (3.13.1-2) ... Setting up python3.12 (3.12.8-2) ... Setting up debhelper (13.20) ... Setting up libpython3.12t64:i386 (3.12.8-2) ... Setting up libpython3-stdlib:i386 (3.12.7-1) ... Setting up python3 (3.12.7-1) ... Setting up libpython3.12-dev:i386 (3.12.8-2) ... Setting up python3-distlib (0.3.9-1) ... Setting up python3-zipp (3.21.0-1) ... Setting up python3-autocommand (2.2.2-3) ... Setting up python3-markupsafe (2.1.5-1+b2) ... Setting up python3-wheel (0.45.1-1) ... Setting up python3-platformdirs (4.3.6-1) ... Setting up python3-roman (4.2-1) ... Setting up python3-jinja2 (3.1.3-1) ... Setting up python3-packaging (24.2-1) ... Setting up python3-pyproject-hooks (1.2.0-1) ... Setting up python3-certifi (2024.8.30+dfsg-1) ... Setting up python3-snowballstemmer (2.2.0-4) ... Setting up python3-idna (3.8-2) ... Setting up python3.12-dev (3.12.8-2) ... Setting up python3-typing-extensions (4.12.2-2) ... Setting up python3-toml (0.10.2-1) ... Setting up python3-installer (0.7.0+dfsg1-3) ... Setting up python3-urllib3 (2.2.3-4) ... Setting up python3-pluggy (1.5.0-1) ... Setting up python3-build (1.2.2-1) ... Setting up python3-imagesize (1.4.1-1) ... Setting up python3-more-itertools (10.5.0-1) ... Setting up python3-iniconfig (1.1.1-2) ... Setting up python3-filelock (3.16.1-1) ... Setting up libpython3-dev:i386 (3.12.7-1) ... Setting up python3-jaraco.functools (4.1.0-1) ... Setting up python3-jaraco.context (6.0.0-1) ... Setting up python3-defusedxml (0.7.1-3) ... Setting up python3-charset-normalizer (3.4.0-1+b1) ... Setting up python3-pytest (8.3.4-1) ... Setting up python3-alabaster (0.7.16-0.1) ... Setting up python3-ply (3.11-7) ... Setting up python3-typeguard (4.4.1-1) ... Setting up python3-virtualenv (20.28.0+ds-1) ... Setting up python3-all (3.12.7-1) ... Setting up python3-pycparser (2.22-2) ... Setting up python3-inflect (7.3.1-2) ... Setting up libpython3-all-dev:i386 (3.12.7-1) ... Setting up python3-jaraco.text (4.0.0-1) ... Setting up virtualenv (20.28.0+ds-1) ... Setting up python3-dev (3.12.7-1) ... Setting up python3-pkg-resources (75.2.0-1) ... Setting up python3-all-dev (3.12.7-1) ... Setting up python3-setuptools (75.2.0-1) ... Setting up python3-py (1.11.0-2) ... Setting up python3-babel (2.16.0-1) ... update-alternatives: using /usr/bin/pybabel-python3 to provide /usr/bin/pybabel (pybabel) in auto mode Setting up python3-pygments (2.18.0+dfsg-1) ... Setting up python3-chardet (5.2.0+dfsg-1) ... Setting up python3-requests (2.32.3+dfsg-1) ... Setting up dh-python (6.20241024) ... Setting up pybuild-plugin-pyproject (6.20241024) ... Processing triggers for libc-bin (2.40-4) ... Processing triggers for sgml-base (1.31) ... Setting up docutils-common (0.21.2+dfsg-2) ... Processing triggers for sgml-base (1.31) ... Setting up python3-docutils (0.21.2+dfsg-2) ... Setting up python3-sphinx (8.1.3-2) ... Processing triggers for ca-certificates (20240203) ... Updating certificates in /etc/ssl/certs... 0 added, 0 removed; done. Running hooks in /etc/ca-certificates/update.d... done. Reading package lists... Building dependency tree... Reading state information... Reading extended state information... Initializing package states... Writing extended state information... Building tag database... -> Finished parsing the build-deps I: Building the package I: Running cd /build/reproducible-path/python-cffi-1.17.1/ && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" HOME="/nonexistent/first-build" dpkg-buildpackage -us -uc -b && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" HOME="/nonexistent/first-build" dpkg-genchanges -S > ../python-cffi_1.17.1-2_source.changes dpkg-buildpackage: info: source package python-cffi dpkg-buildpackage: info: source version 1.17.1-2 dpkg-buildpackage: info: source distribution unstable dpkg-buildpackage: info: source changed by Stefano Rivera dpkg-source --before-build . dpkg-buildpackage: info: host architecture i386 debian/rules clean dh clean --buildsystem pybuild dh_auto_clean -O--buildsystem=pybuild dh_autoreconf_clean -O--buildsystem=pybuild dh_clean -O--buildsystem=pybuild debian/rules execute_after_dh_clean make[1]: Entering directory '/build/reproducible-path/python-cffi-1.17.1' rm -rf make[1]: Leaving directory '/build/reproducible-path/python-cffi-1.17.1' debian/rules binary dh binary --buildsystem pybuild dh_update_autotools_config -O--buildsystem=pybuild dh_autoreconf -O--buildsystem=pybuild dh_auto_configure -O--buildsystem=pybuild dh_auto_build -O--buildsystem=pybuild I: pybuild plugin_pyproject:129: Building wheel for python3.13 with "build" module I: pybuild base:311: python3.13 -m build --skip-dependency-check --no-isolation --wheel --outdir /build/reproducible-path/python-cffi-1.17.1/.pybuild/cpython3_3.13_cffi * Building wheel... running bdist_wheel running build running build_py creating build/lib.linux-i686-cpython-313/cffi copying src/cffi/api.py -> build/lib.linux-i686-cpython-313/cffi copying src/cffi/cffi_opcode.py -> build/lib.linux-i686-cpython-313/cffi copying src/cffi/_imp_emulation.py -> build/lib.linux-i686-cpython-313/cffi copying src/cffi/lock.py -> build/lib.linux-i686-cpython-313/cffi copying src/cffi/error.py -> build/lib.linux-i686-cpython-313/cffi copying src/cffi/commontypes.py -> build/lib.linux-i686-cpython-313/cffi copying src/cffi/model.py -> build/lib.linux-i686-cpython-313/cffi copying src/cffi/_shimmed_dist_utils.py -> build/lib.linux-i686-cpython-313/cffi copying src/cffi/vengine_gen.py -> build/lib.linux-i686-cpython-313/cffi copying src/cffi/verifier.py -> build/lib.linux-i686-cpython-313/cffi copying src/cffi/pkgconfig.py -> build/lib.linux-i686-cpython-313/cffi copying src/cffi/setuptools_ext.py -> build/lib.linux-i686-cpython-313/cffi copying src/cffi/backend_ctypes.py -> build/lib.linux-i686-cpython-313/cffi copying src/cffi/cparser.py -> build/lib.linux-i686-cpython-313/cffi copying src/cffi/__init__.py -> build/lib.linux-i686-cpython-313/cffi copying src/cffi/recompiler.py -> build/lib.linux-i686-cpython-313/cffi copying src/cffi/vengine_cpy.py -> build/lib.linux-i686-cpython-313/cffi copying src/cffi/ffiplatform.py -> build/lib.linux-i686-cpython-313/cffi copying src/cffi/_cffi_include.h -> build/lib.linux-i686-cpython-313/cffi copying src/cffi/parse_c_type.h -> build/lib.linux-i686-cpython-313/cffi copying src/cffi/_embedding.h -> build/lib.linux-i686-cpython-313/cffi copying src/cffi/_cffi_errors.h -> build/lib.linux-i686-cpython-313/cffi running build_ext building '_cffi_backend' extension creating build/temp.linux-i686-cpython-313/src/c i686-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DFFI_BUILDING=1 -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/usr/include/ffi -I/usr/include/libffi -I/usr/include/python3.13 -c src/c/_cffi_backend.c -o build/temp.linux-i686-cpython-313/src/c/_cffi_backend.o src/c/_cffi_backend.c: In function 'b_do_dlopen': src/c/_cffi_backend.c:4579:22: warning: 'Py_FileSystemDefaultEncoding' is deprecated [-Wdeprecated-declarations] 4579 | Py_FileSystemDefaultEncoding, &filename_or_null, &flags)) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/python3.13/Python.h:99, from src/c/_cffi_backend.c:2: /usr/include/python3.13/fileobject.h:22:46: note: declared here 22 | Py_DEPRECATED(3.12) PyAPI_DATA(const char *) Py_FileSystemDefaultEncoding; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ i686-linux-gnu-gcc -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fwrapv -O2 -Wl,-z,relro -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-i686-cpython-313/src/c/_cffi_backend.o -L/usr/lib/i386-linux-gnu -lffi -o build/lib.linux-i686-cpython-313/_cffi_backend.cpython-313-i386-linux-gnu.so installing to build/bdist.linux-i686/wheel running install running install_lib creating build/bdist.linux-i686/wheel copying build/lib.linux-i686-cpython-313/_cffi_backend.cpython-313-i386-linux-gnu.so -> build/bdist.linux-i686/wheel/. creating build/bdist.linux-i686/wheel/cffi copying build/lib.linux-i686-cpython-313/cffi/api.py -> build/bdist.linux-i686/wheel/./cffi copying build/lib.linux-i686-cpython-313/cffi/parse_c_type.h -> build/bdist.linux-i686/wheel/./cffi copying build/lib.linux-i686-cpython-313/cffi/cffi_opcode.py -> build/bdist.linux-i686/wheel/./cffi copying build/lib.linux-i686-cpython-313/cffi/_imp_emulation.py -> build/bdist.linux-i686/wheel/./cffi copying build/lib.linux-i686-cpython-313/cffi/lock.py -> build/bdist.linux-i686/wheel/./cffi copying build/lib.linux-i686-cpython-313/cffi/_cffi_include.h -> build/bdist.linux-i686/wheel/./cffi copying build/lib.linux-i686-cpython-313/cffi/error.py -> build/bdist.linux-i686/wheel/./cffi copying build/lib.linux-i686-cpython-313/cffi/commontypes.py -> build/bdist.linux-i686/wheel/./cffi copying build/lib.linux-i686-cpython-313/cffi/model.py -> build/bdist.linux-i686/wheel/./cffi copying build/lib.linux-i686-cpython-313/cffi/_shimmed_dist_utils.py -> build/bdist.linux-i686/wheel/./cffi copying build/lib.linux-i686-cpython-313/cffi/vengine_gen.py -> build/bdist.linux-i686/wheel/./cffi copying build/lib.linux-i686-cpython-313/cffi/verifier.py -> build/bdist.linux-i686/wheel/./cffi copying build/lib.linux-i686-cpython-313/cffi/pkgconfig.py -> build/bdist.linux-i686/wheel/./cffi copying build/lib.linux-i686-cpython-313/cffi/setuptools_ext.py -> build/bdist.linux-i686/wheel/./cffi copying build/lib.linux-i686-cpython-313/cffi/backend_ctypes.py -> build/bdist.linux-i686/wheel/./cffi copying build/lib.linux-i686-cpython-313/cffi/_cffi_errors.h -> build/bdist.linux-i686/wheel/./cffi copying build/lib.linux-i686-cpython-313/cffi/cparser.py -> build/bdist.linux-i686/wheel/./cffi copying build/lib.linux-i686-cpython-313/cffi/__init__.py -> build/bdist.linux-i686/wheel/./cffi copying build/lib.linux-i686-cpython-313/cffi/recompiler.py -> build/bdist.linux-i686/wheel/./cffi copying build/lib.linux-i686-cpython-313/cffi/vengine_cpy.py -> build/bdist.linux-i686/wheel/./cffi copying build/lib.linux-i686-cpython-313/cffi/ffiplatform.py -> build/bdist.linux-i686/wheel/./cffi copying build/lib.linux-i686-cpython-313/cffi/_embedding.h -> build/bdist.linux-i686/wheel/./cffi running install_egg_info running egg_info creating src/cffi.egg-info writing src/cffi.egg-info/PKG-INFO writing dependency_links to src/cffi.egg-info/dependency_links.txt writing entry points to src/cffi.egg-info/entry_points.txt writing requirements to src/cffi.egg-info/requires.txt writing top-level names to src/cffi.egg-info/top_level.txt writing manifest file 'src/cffi.egg-info/SOURCES.txt' reading manifest file 'src/cffi.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' adding license file 'LICENSE' writing manifest file 'src/cffi.egg-info/SOURCES.txt' Copying src/cffi.egg-info to build/bdist.linux-i686/wheel/./cffi-1.17.1.egg-info running install_scripts creating build/bdist.linux-i686/wheel/cffi-1.17.1.dist-info/WHEEL creating '/build/reproducible-path/python-cffi-1.17.1/.pybuild/cpython3_3.13_cffi/.tmp-7xgrd3j6/cffi-1.17.1-cp313-cp313-linux_i686.whl' and adding 'build/bdist.linux-i686/wheel' to it adding '_cffi_backend.cpython-313-i386-linux-gnu.so' adding 'cffi/__init__.py' adding 'cffi/_cffi_errors.h' adding 'cffi/_cffi_include.h' adding 'cffi/_embedding.h' adding 'cffi/_imp_emulation.py' adding 'cffi/_shimmed_dist_utils.py' adding 'cffi/api.py' adding 'cffi/backend_ctypes.py' adding 'cffi/cffi_opcode.py' adding 'cffi/commontypes.py' adding 'cffi/cparser.py' adding 'cffi/error.py' adding 'cffi/ffiplatform.py' adding 'cffi/lock.py' adding 'cffi/model.py' adding 'cffi/parse_c_type.h' adding 'cffi/pkgconfig.py' adding 'cffi/recompiler.py' adding 'cffi/setuptools_ext.py' adding 'cffi/vengine_cpy.py' adding 'cffi/vengine_gen.py' adding 'cffi/verifier.py' adding 'cffi-1.17.1.dist-info/LICENSE' adding 'cffi-1.17.1.dist-info/METADATA' adding 'cffi-1.17.1.dist-info/WHEEL' adding 'cffi-1.17.1.dist-info/entry_points.txt' adding 'cffi-1.17.1.dist-info/top_level.txt' adding 'cffi-1.17.1.dist-info/RECORD' removing build/bdist.linux-i686/wheel Successfully built cffi-1.17.1-cp313-cp313-linux_i686.whl I: pybuild plugin_pyproject:144: Unpacking wheel built for python3.13 with "installer" module I: pybuild plugin_pyproject:129: Building wheel for python3.12 with "build" module I: pybuild base:311: python3.12 -m build --skip-dependency-check --no-isolation --wheel --outdir /build/reproducible-path/python-cffi-1.17.1/.pybuild/cpython3_3.12_cffi * Building wheel... running bdist_wheel running build running build_py creating build/lib.linux-i686-cpython-312/cffi copying src/cffi/api.py -> build/lib.linux-i686-cpython-312/cffi copying src/cffi/cffi_opcode.py -> build/lib.linux-i686-cpython-312/cffi copying src/cffi/_imp_emulation.py -> build/lib.linux-i686-cpython-312/cffi copying src/cffi/lock.py -> build/lib.linux-i686-cpython-312/cffi copying src/cffi/error.py -> build/lib.linux-i686-cpython-312/cffi copying src/cffi/commontypes.py -> build/lib.linux-i686-cpython-312/cffi copying src/cffi/model.py -> build/lib.linux-i686-cpython-312/cffi copying src/cffi/_shimmed_dist_utils.py -> build/lib.linux-i686-cpython-312/cffi copying src/cffi/vengine_gen.py -> build/lib.linux-i686-cpython-312/cffi copying src/cffi/verifier.py -> build/lib.linux-i686-cpython-312/cffi copying src/cffi/pkgconfig.py -> build/lib.linux-i686-cpython-312/cffi copying src/cffi/setuptools_ext.py -> build/lib.linux-i686-cpython-312/cffi copying src/cffi/backend_ctypes.py -> build/lib.linux-i686-cpython-312/cffi copying src/cffi/cparser.py -> build/lib.linux-i686-cpython-312/cffi copying src/cffi/__init__.py -> build/lib.linux-i686-cpython-312/cffi copying src/cffi/recompiler.py -> build/lib.linux-i686-cpython-312/cffi copying src/cffi/vengine_cpy.py -> build/lib.linux-i686-cpython-312/cffi copying src/cffi/ffiplatform.py -> build/lib.linux-i686-cpython-312/cffi copying src/cffi/_cffi_include.h -> build/lib.linux-i686-cpython-312/cffi copying src/cffi/parse_c_type.h -> build/lib.linux-i686-cpython-312/cffi copying src/cffi/_embedding.h -> build/lib.linux-i686-cpython-312/cffi copying src/cffi/_cffi_errors.h -> build/lib.linux-i686-cpython-312/cffi running build_ext building '_cffi_backend' extension creating build/temp.linux-i686-cpython-312/src/c i686-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DFFI_BUILDING=1 -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/usr/include/ffi -I/usr/include/libffi -I/usr/include/python3.12 -c src/c/_cffi_backend.c -o build/temp.linux-i686-cpython-312/src/c/_cffi_backend.o src/c/_cffi_backend.c: In function 'b_do_dlopen': src/c/_cffi_backend.c:4579:22: warning: 'Py_FileSystemDefaultEncoding' is deprecated [-Wdeprecated-declarations] 4579 | Py_FileSystemDefaultEncoding, &filename_or_null, &flags)) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/python3.12/Python.h:72, from src/c/_cffi_backend.c:2: /usr/include/python3.12/fileobject.h:22:46: note: declared here 22 | Py_DEPRECATED(3.12) PyAPI_DATA(const char *) Py_FileSystemDefaultEncoding; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ i686-linux-gnu-gcc -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fwrapv -O2 -Wl,-z,relro -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-i686-cpython-312/src/c/_cffi_backend.o -L/usr/lib/i386-linux-gnu -lffi -o build/lib.linux-i686-cpython-312/_cffi_backend.cpython-312-i386-linux-gnu.so installing to build/bdist.linux-i686/wheel running install running install_lib creating build/bdist.linux-i686/wheel creating build/bdist.linux-i686/wheel/cffi copying build/lib.linux-i686-cpython-312/cffi/api.py -> build/bdist.linux-i686/wheel/./cffi copying build/lib.linux-i686-cpython-312/cffi/parse_c_type.h -> build/bdist.linux-i686/wheel/./cffi copying build/lib.linux-i686-cpython-312/cffi/cffi_opcode.py -> build/bdist.linux-i686/wheel/./cffi copying build/lib.linux-i686-cpython-312/cffi/_imp_emulation.py -> build/bdist.linux-i686/wheel/./cffi copying build/lib.linux-i686-cpython-312/cffi/lock.py -> build/bdist.linux-i686/wheel/./cffi copying build/lib.linux-i686-cpython-312/cffi/_cffi_include.h -> build/bdist.linux-i686/wheel/./cffi copying build/lib.linux-i686-cpython-312/cffi/error.py -> build/bdist.linux-i686/wheel/./cffi copying build/lib.linux-i686-cpython-312/cffi/commontypes.py -> build/bdist.linux-i686/wheel/./cffi copying build/lib.linux-i686-cpython-312/cffi/model.py -> build/bdist.linux-i686/wheel/./cffi copying build/lib.linux-i686-cpython-312/cffi/_shimmed_dist_utils.py -> build/bdist.linux-i686/wheel/./cffi copying build/lib.linux-i686-cpython-312/cffi/vengine_gen.py -> build/bdist.linux-i686/wheel/./cffi copying build/lib.linux-i686-cpython-312/cffi/verifier.py -> build/bdist.linux-i686/wheel/./cffi copying build/lib.linux-i686-cpython-312/cffi/pkgconfig.py -> build/bdist.linux-i686/wheel/./cffi copying build/lib.linux-i686-cpython-312/cffi/setuptools_ext.py -> build/bdist.linux-i686/wheel/./cffi copying build/lib.linux-i686-cpython-312/cffi/backend_ctypes.py -> build/bdist.linux-i686/wheel/./cffi copying build/lib.linux-i686-cpython-312/cffi/_cffi_errors.h -> build/bdist.linux-i686/wheel/./cffi copying build/lib.linux-i686-cpython-312/cffi/cparser.py -> build/bdist.linux-i686/wheel/./cffi copying build/lib.linux-i686-cpython-312/cffi/__init__.py -> build/bdist.linux-i686/wheel/./cffi copying build/lib.linux-i686-cpython-312/cffi/recompiler.py -> build/bdist.linux-i686/wheel/./cffi copying build/lib.linux-i686-cpython-312/cffi/vengine_cpy.py -> build/bdist.linux-i686/wheel/./cffi copying build/lib.linux-i686-cpython-312/cffi/ffiplatform.py -> build/bdist.linux-i686/wheel/./cffi copying build/lib.linux-i686-cpython-312/cffi/_embedding.h -> build/bdist.linux-i686/wheel/./cffi copying build/lib.linux-i686-cpython-312/_cffi_backend.cpython-312-i386-linux-gnu.so -> build/bdist.linux-i686/wheel/. running install_egg_info running egg_info writing src/cffi.egg-info/PKG-INFO writing dependency_links to src/cffi.egg-info/dependency_links.txt writing entry points to src/cffi.egg-info/entry_points.txt writing requirements to src/cffi.egg-info/requires.txt writing top-level names to src/cffi.egg-info/top_level.txt reading manifest file 'src/cffi.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' adding license file 'LICENSE' writing manifest file 'src/cffi.egg-info/SOURCES.txt' Copying src/cffi.egg-info to build/bdist.linux-i686/wheel/./cffi-1.17.1.egg-info running install_scripts creating build/bdist.linux-i686/wheel/cffi-1.17.1.dist-info/WHEEL creating '/build/reproducible-path/python-cffi-1.17.1/.pybuild/cpython3_3.12_cffi/.tmp-0risq8lv/cffi-1.17.1-cp312-cp312-linux_i686.whl' and adding 'build/bdist.linux-i686/wheel' to it adding '_cffi_backend.cpython-312-i386-linux-gnu.so' adding 'cffi/__init__.py' adding 'cffi/_cffi_errors.h' adding 'cffi/_cffi_include.h' adding 'cffi/_embedding.h' adding 'cffi/_imp_emulation.py' adding 'cffi/_shimmed_dist_utils.py' adding 'cffi/api.py' adding 'cffi/backend_ctypes.py' adding 'cffi/cffi_opcode.py' adding 'cffi/commontypes.py' adding 'cffi/cparser.py' adding 'cffi/error.py' adding 'cffi/ffiplatform.py' adding 'cffi/lock.py' adding 'cffi/model.py' adding 'cffi/parse_c_type.h' adding 'cffi/pkgconfig.py' adding 'cffi/recompiler.py' adding 'cffi/setuptools_ext.py' adding 'cffi/vengine_cpy.py' adding 'cffi/vengine_gen.py' adding 'cffi/verifier.py' adding 'cffi-1.17.1.dist-info/LICENSE' adding 'cffi-1.17.1.dist-info/METADATA' adding 'cffi-1.17.1.dist-info/WHEEL' adding 'cffi-1.17.1.dist-info/entry_points.txt' adding 'cffi-1.17.1.dist-info/top_level.txt' adding 'cffi-1.17.1.dist-info/RECORD' removing build/bdist.linux-i686/wheel Successfully built cffi-1.17.1-cp312-cp312-linux_i686.whl I: pybuild plugin_pyproject:144: Unpacking wheel built for python3.12 with "installer" module debian/rules execute_after_dh_auto_build-indep make[1]: Entering directory '/build/reproducible-path/python-cffi-1.17.1' python3 -m sphinx -b html -d doc/build/doctrees doc/source doc/build/html Running Sphinx v8.1.3 loading translations [en]... done making output directory... done Converting `source_suffix = '.rst'` to `source_suffix = {'.rst': 'restructuredtext'}`. building [mo]: targets for 0 po files that are out of date writing output... building [html]: targets for 9 source files that are out of date updating environment: [new config] 9 added, 0 changed, 0 removed reading sources... [ 11%] cdef reading sources... [ 22%] embedding reading sources... [ 33%] goals reading sources... [ 44%] index reading sources... [ 56%] installation reading sources... [ 67%] overview reading sources... [ 78%] ref reading sources... [ 89%] using reading sources... [100%] whatsnew /build/reproducible-path/python-cffi-1.17.1/doc/source/installation.rst:53: ERROR: Unknown target name: "github". [docutils] looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done copying assets... copying static files... Writing evaluated template result to /build/reproducible-path/python-cffi-1.17.1/doc/build/html/_static/documentation_options.js Writing evaluated template result to /build/reproducible-path/python-cffi-1.17.1/doc/build/html/_static/basic.css Writing evaluated template result to /build/reproducible-path/python-cffi-1.17.1/doc/build/html/_static/language_data.js Writing evaluated template result to /build/reproducible-path/python-cffi-1.17.1/doc/build/html/_static/alabaster.css copying static files: done copying extra files... copying extra files: done copying assets: done writing output... [ 11%] cdef writing output... [ 22%] embedding writing output... [ 33%] goals writing output... [ 44%] index writing output... [ 56%] installation writing output... [ 67%] overview writing output... [ 78%] ref writing output... [ 89%] using writing output... [100%] whatsnew generating indices... genindex done writing additional pages... search done dumping search index in English (code: en)... done dumping object inventory... done build succeeded, 1 warning. The HTML pages are in doc/build/html. make[1]: Leaving directory '/build/reproducible-path/python-cffi-1.17.1' debian/rules override_dh_auto_test make[1]: Entering directory '/build/reproducible-path/python-cffi-1.17.1' PYBUILD_SYSTEM=custom \ PYBUILD_BEFORE_TEST="{interpreter} setup.py egg_info" \ PYBUILD_TEST_ARGS="{interpreter} -m pytest src/c/ testing/" \ dh_auto_test I: pybuild pybuild:308: python3.13 setup.py egg_info running egg_info writing src/cffi.egg-info/PKG-INFO writing dependency_links to src/cffi.egg-info/dependency_links.txt writing entry points to src/cffi.egg-info/entry_points.txt writing requirements to src/cffi.egg-info/requires.txt writing top-level names to src/cffi.egg-info/top_level.txt reading manifest file 'src/cffi.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' adding license file 'LICENSE' writing manifest file 'src/cffi.egg-info/SOURCES.txt' I: pybuild base:311: python3.13 -m pytest src/c/ testing/ ============================= test session starts ============================== platform linux -- Python 3.13.1, pytest-8.3.4, pluggy-1.5.0 rootdir: /build/reproducible-path/python-cffi-1.17.1 configfile: pyproject.toml plugins: typeguard-4.4.1 collected 2053 items src/c/test_c.py ........................................................ [ 2%] ........................................................................ [ 6%] ...............s.......................s................................ [ 9%] ............................. [ 11%] testing/cffi0/test_cdata.py . [ 11%] testing/cffi0/test_ctypes.py ..................s...............s.s.s.... [ 13%] ...s.........................sssssss..s..s.............................. [ 16%] ...............sssssssss [ 17%] testing/cffi0/test_ffi_backend.py ..................s................... [ 19%] ..ss.................................................................... [ 23%] ...................s...s................................................ [ 26%] .................s.s...s................... [ 28%] testing/cffi0/test_function.py ......s.......s.....s..ss..sss..ss [ 30%] testing/cffi0/test_model.py ............. [ 31%] testing/cffi0/test_ownlib.py ..ss...sssss [ 31%] testing/cffi0/test_parsing.py .........................s........... [ 33%] testing/cffi0/test_platform.py .... [ 33%] testing/cffi0/test_unicode_literals.py ............ [ 34%] testing/cffi0/test_verify.py ...................s......s.....s.......... [ 36%] ........................................................................ [ 39%] ...............................s...s.............ss.. [ 42%] testing/cffi0/test_verify2.py ...................s......s.....s......... [ 44%] ........................................................................ [ 48%] ................................s...s.............ss.. [ 50%] testing/cffi0/test_version.py ..... [ 50%] testing/cffi0/test_vgen.py ...................s......s.....s............ [ 53%] ........................................................................ [ 56%] .............................s...s.............ss.. [ 59%] testing/cffi0/test_vgen2.py ...................s......s.....s........... [ 61%] ........................................................................ [ 64%] ..............................s...s.............ss.. [ 67%] testing/cffi0/test_zdistutils.py ...................................... [ 69%] testing/cffi0/test_zintegration.py ........ [ 69%] testing/cffi1/test_cffi_binary.py . [ 69%] testing/cffi1/test_commontypes.py ... [ 69%] testing/cffi1/test_dlopen.py ............... [ 70%] testing/cffi1/test_dlopen_unicode_literals.py ............... [ 71%] testing/cffi1/test_ffi_obj.py .............................s............ [ 73%] . [ 73%] testing/cffi1/test_function_args.py s [ 73%] testing/cffi1/test_new_ffi_1.py ........................................ [ 75%] .........................................s...s.......................... [ 78%] .........F.. [ 79%] testing/cffi1/test_parse_c_type.py .................. [ 80%] testing/cffi1/test_pkgconfig.py ... [ 80%] testing/cffi1/test_re_python.py ..................... [ 81%] testing/cffi1/test_realize_c_type.py ......... [ 81%] testing/cffi1/test_recompiler.py ....................................... [ 83%] ..........................s............................................. [ 87%] .......................s.....s.......................... [ 90%] testing/cffi1/test_unicode_literals.py ....... [ 90%] testing/cffi1/test_verify1.py ..............................s........... [ 92%] ...............................................................s.....xxx [ 95%] ....x......................s...s....s...s.ss [ 98%] testing/cffi1/test_zdist.py ....................... [ 99%] testing/embedding/test_basic.py ..... [ 99%] testing/embedding/test_performance.py ..... [ 99%] testing/embedding/test_recursive.py . [ 99%] testing/embedding/test_thread.py .... [ 99%] testing/embedding/test_tlocal.py . [100%] =================================== FAILURES =================================== _______________________ TestNewFFI1.test_import_from_lib _______________________ self = def test_import_from_lib(self): ffi2 = cffi.FFI() ffi2.cdef("int myfunc(int); extern int myvar;\n#define MYFOO ...\n") outputfilename = recompile(ffi2, "_test_import_from_lib", "int myfunc(int x) { return x + 1; }\n" "int myvar = -5;\n" "#define MYFOO 42", tmpdir=str(udir)) load_dynamic("_test_import_from_lib", outputfilename) from _test_import_from_lib.lib import myfunc, myvar, MYFOO assert MYFOO == 42 assert myfunc(43) == 44 assert myvar == -5 # but can't be changed, so not very useful with pytest.raises(ImportError): > from _test_import_from_lib.lib import bar E TypeError: bad argument type for built-in operation testing/cffi1/test_new_ffi_1.py:1799: TypeError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-0/_test_import_from_lib.c setting the current directory to '/tmp/ffi-0' ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_test_import_from_lib' extension INFO root:spawn.py:60 i686-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.13 -c _test_import_from_lib.c -o ./_test_import_from_lib.o INFO root:spawn.py:60 i686-linux-gnu-gcc -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fwrapv -O2 -Wl,-z,relro -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 ./_test_import_from_lib.o -L/usr/lib/i386-linux-gnu -o ./_test_import_from_lib.cpython-313-i386-linux-gnu.so =============================== warnings summary =============================== src/c/test_c.py::test_callback_return_type /usr/lib/python3/dist-packages/_pytest/unraisableexception.py:85: PytestUnraisableExceptionWarning: Exception ignored from cffi callback .cb at 0xf4c6a9d8>, trying to convert the result back to C: None Traceback (most recent call last): File "/build/reproducible-path/python-cffi-1.17.1/src/c/test_c.py", line 1453, in test_callback_return_type assert f(max) == 42 ~^^^^^ OverflowError: int too big to convert warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) src/c/test_c.py::test_callback_returning_wchar_t /usr/lib/python3/dist-packages/_pytest/unraisableexception.py:85: PytestUnraisableExceptionWarning: Exception ignored from cffi callback .cb at 0xf4c6aa78>: None Traceback (most recent call last): File "/build/reproducible-path/python-cffi-1.17.1/src/c/test_c.py", line 1748, in cb raise ValueError ValueError warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) src/c/test_c.py::test_cast_with_functionptr /build/reproducible-path/python-cffi-1.17.1/src/c/test_c.py:2166: UserWarning: implicit cast from 'char *' to a different pointer type: will be forbidden in the future (check that the types are as you expect; use an explicit ffi.cast() if they are correct) newp(BStructPtr, [cast(BCharP, 0)]) testing/cffi0/test_ffi_backend.py::TestFFI::test_callback_crash /usr/lib/python3/dist-packages/_pytest/unraisableexception.py:85: PytestUnraisableExceptionWarning: Exception ignored from cffi callback .cb at 0xf5ea87f8>: None Traceback (most recent call last): File "/build/reproducible-path/python-cffi-1.17.1/testing/cffi0/backend_tests.py", line 848, in cb raise Exception Exception warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) testing/cffi0/test_ffi_backend.py::TestFFI::test_callback_decorator /usr/lib/python3/dist-packages/_pytest/unraisableexception.py:85: PytestUnraisableExceptionWarning: Exception ignored from cffi callback .cb at 0xf5e84028>, trying to convert the result back to C: None Traceback (most recent call last): File "/build/reproducible-path/python-cffi-1.17.1/testing/cffi0/backend_tests.py", line 1390, in test_callback_decorator assert cb((1 << (sz*8-1)) - 1, -10) == 42 ~~^^^^^^^^^^^^^^^^^^^^^^^^^^ OverflowError: integer 2147483657 does not fit 'long' warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) testing/cffi0/test_parsing.py::test_missing_newline_bug /build/reproducible-path/python-cffi-1.17.1/src/c/../cffi/cparser.py:436: UserWarning: #pragma in cdef() are entirely ignored. They should be removed for now, otherwise your code might behave differently in a future version of CFFI if #pragma support gets added. Note that '#pragma pack' needs to be replaced with the 'packed' keyword argument to cdef(). warnings.warn( testing/cffi1/test_ffi_obj.py::test_ffi_callback /usr/lib/python3/dist-packages/_pytest/unraisableexception.py:85: PytestUnraisableExceptionWarning: Exception ignored from cffi callback . at 0xf54f26b8>: None Traceback (most recent call last): File "/build/reproducible-path/python-cffi-1.17.1/testing/cffi1/test_ffi_obj.py", line 130, in assert ffi.callback("int(int)", lambda x: x + "", error=-66)(10) == -66 ~~^~~~ TypeError: unsupported operand type(s) for +: 'int' and 'str' warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) testing/cffi1/test_ffi_obj.py::test_ffi_callback_decorator /usr/lib/python3/dist-packages/_pytest/unraisableexception.py:85: PytestUnraisableExceptionWarning: Exception ignored from cffi callback . at 0xf54f26b8>: None Traceback (most recent call last): File "/build/reproducible-path/python-cffi-1.17.1/testing/cffi1/test_ffi_obj.py", line 136, in assert deco(lambda x: x + "")(10) == -66 ~~^~~~ TypeError: unsupported operand type(s) for +: 'int' and 'str' warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) testing/cffi1/test_new_ffi_1.py::TestNewFFI1::test_callback_crash /usr/lib/python3/dist-packages/_pytest/unraisableexception.py:85: PytestUnraisableExceptionWarning: Exception ignored from cffi callback .cb at 0xf54bd8e8>: None Traceback (most recent call last): File "/build/reproducible-path/python-cffi-1.17.1/testing/cffi1/test_new_ffi_1.py", line 863, in cb raise Exception Exception warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) testing/cffi1/test_new_ffi_1.py::TestNewFFI1::test_callback_decorator /usr/lib/python3/dist-packages/_pytest/unraisableexception.py:85: PytestUnraisableExceptionWarning: Exception ignored from cffi callback .cb at 0xf65772f8>, trying to convert the result back to C: None Traceback (most recent call last): File "/build/reproducible-path/python-cffi-1.17.1/testing/cffi1/test_new_ffi_1.py", line 1341, in test_callback_decorator assert cb((1 << (sz*8-1)) - 1, -10) == 42 ~~^^^^^^^^^^^^^^^^^^^^^^^^^^ OverflowError: integer 2147483657 does not fit 'long' warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) testing/cffi1/test_recompiler.py::test_macro_var_callback /usr/lib/python3/dist-packages/_pytest/unraisableexception.py:85: PytestUnraisableExceptionWarning: Exception ignored from cffi callback .get_my_value at 0xf509ce38>, trying to convert the result back to C: None Traceback (most recent call last): File "/usr/lib/python3/dist-packages/_pytest/python_api.py", line 976, in raises func(*args[1:], **kwargs) ~~~~^^^^^^^^^^^^^^^^^^^^^ TypeError: initializer for ctype 'int *' must be a cdata pointer, not str warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info ============================ FAILED testing/cffi1/test_new_ffi_1.py::TestNewFFI1::test_import_from_lib - T... = 1 failed, 1954 passed, 94 skipped, 4 xfailed, 11 warnings in 1423.86s (0:23:43) = E: pybuild pybuild:389: test: plugin custom failed with: exit code=1: python3.13 -m pytest src/c/ testing/ I: pybuild pybuild:308: python3.12 setup.py egg_info running egg_info writing src/cffi.egg-info/PKG-INFO writing dependency_links to src/cffi.egg-info/dependency_links.txt writing entry points to src/cffi.egg-info/entry_points.txt writing requirements to src/cffi.egg-info/requires.txt writing top-level names to src/cffi.egg-info/top_level.txt reading manifest file 'src/cffi.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' adding license file 'LICENSE' writing manifest file 'src/cffi.egg-info/SOURCES.txt' I: pybuild base:311: python3.12 -m pytest src/c/ testing/ ============================= test session starts ============================== platform linux -- Python 3.12.8, pytest-8.3.4, pluggy-1.5.0 rootdir: /build/reproducible-path/python-cffi-1.17.1 configfile: pyproject.toml plugins: typeguard-4.4.1 collected 2053 items src/c/test_c.py ........................................................ [ 2%] ........................................................................ [ 6%] ...............s.......................s................................ [ 9%] ............................. [ 11%] testing/cffi0/test_cdata.py . [ 11%] testing/cffi0/test_ctypes.py ..................s...............s.s.s.... [ 13%] ...s.........................sssssss..s..s.............................. [ 16%] ...............sssssssss [ 17%] testing/cffi0/test_ffi_backend.py ..................s................... [ 19%] ..ss.................................................................... [ 23%] ...................s...s................................................ [ 26%] .................s.s...s................... [ 28%] testing/cffi0/test_function.py ......s.......s.....s..ss..sss..ss [ 30%] testing/cffi0/test_model.py ............. [ 31%] testing/cffi0/test_ownlib.py ..ss...sssss [ 31%] testing/cffi0/test_parsing.py .........................s........... [ 33%] testing/cffi0/test_platform.py .... [ 33%] testing/cffi0/test_unicode_literals.py ............ [ 34%] testing/cffi0/test_verify.py ...................s......s.....s.......... [ 36%] ........................................................................ [ 39%] ...............................s...s.............ss.. [ 42%] testing/cffi0/test_verify2.py ...................s......s.....s......... [ 44%] ........................................................................ [ 48%] ................................s...s.............ss.. [ 50%] testing/cffi0/test_version.py ..... [ 50%] testing/cffi0/test_vgen.py ...................s......s.....s............ [ 53%] ........................................................................ [ 56%] .............................s...s.............ss.. [ 59%] testing/cffi0/test_vgen2.py ...................s......s.....s........... [ 61%] ........................................................................ [ 64%] ..............................s...s.............ss.. [ 67%] testing/cffi0/test_zdistutils.py ...................................... [ 69%] testing/cffi0/test_zintegration.py ........ [ 69%] testing/cffi1/test_cffi_binary.py . [ 69%] testing/cffi1/test_commontypes.py ... [ 69%] testing/cffi1/test_dlopen.py ............... [ 70%] testing/cffi1/test_dlopen_unicode_literals.py ............... [ 71%] testing/cffi1/test_ffi_obj.py .............................s............ [ 73%] . [ 73%] testing/cffi1/test_function_args.py s [ 73%] testing/cffi1/test_new_ffi_1.py ........................................ [ 75%] .........................................s...s.......................... [ 78%] ............ [ 79%] testing/cffi1/test_parse_c_type.py .................. [ 80%] testing/cffi1/test_pkgconfig.py ... [ 80%] testing/cffi1/test_re_python.py ..................... [ 81%] testing/cffi1/test_realize_c_type.py ......... [ 81%] testing/cffi1/test_recompiler.py .................FFFFFFFFFFFFFFFFFFFFFF [ 83%] .FF.FFFFFF...FFFFFFFFFFFFFsFFFFFFFFFFFFFFFFFFFFFFF.FFFFFFFFFFFFFFFFFFFFF [ 87%] FFFFFFFFFFFFFFFFFFFFFF.s.FF..s..FFFFFFFF.FFF.FFFFFFFFFFF [ 90%] testing/cffi1/test_unicode_literals.py ....... [ 90%] testing/cffi1/test_verify1.py ..............................s........... [ 92%] ...............................................................s.....xxx [ 95%] ....x......................s...s....s...s.ss [ 98%] testing/cffi1/test_zdist.py ....................... [ 99%] testing/embedding/test_basic.py ..... [ 99%] testing/embedding/test_performance.py ..... [ 99%] testing/embedding/test_recursive.py . [ 99%] testing/embedding/test_thread.py .... [ 99%] testing/embedding/test_tlocal.py . [100%] =================================== FAILURES =================================== ________________________________ test_math_sin _________________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_math_sin.cpp', '-o', './_CFFI_test_math_sin.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_math_sin.o', src = '_CFFI_test_math_sin.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_math_sin.o', src = '_CFFI_test_math_sin.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_math_sin(): import math ffi = FFI() ffi.cdef("float sin(double); double cos(double);") > lib = verify(ffi, 'test_math_sin', '#include ', ignore_warnings=True) testing/cffi1/test_recompiler.py:143: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_math_sin.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_math_sin.cpp:707:30: error: expected '}' at end of input 707 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_math_sin.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_math_sin' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_math_sin.cpp -o ./_CFFI_test_math_sin.o ________________________________ test_repr_lib _________________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_repr_lib.cpp', '-o', './_CFFI_test_repr_lib.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_repr_lib.o', src = '_CFFI_test_repr_lib.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_repr_lib.o', src = '_CFFI_test_repr_lib.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_repr_lib(): ffi = FFI() > lib = verify(ffi, 'test_repr_lib', '') testing/cffi1/test_recompiler.py:149: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_repr_lib.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_repr_lib.cpp:636:30: error: expected '}' at end of input 636 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_repr_lib.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_repr_lib' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_repr_lib.cpp -o ./_CFFI_test_repr_lib.o _______________________________ test_funcarg_ptr _______________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_funcarg_ptr.cpp', '-o', './_CFFI_test_funcarg_ptr.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_funcarg_ptr.o', src = '_CFFI_test_funcarg_ptr.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_funcarg_ptr.o', src = '_CFFI_test_funcarg_ptr.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_funcarg_ptr(): ffi = FFI() ffi.cdef("int foo(int *);") > lib = verify(ffi, 'test_funcarg_ptr', 'int foo(int *p) { return *p; }') testing/cffi1/test_recompiler.py:155: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_funcarg_ptr.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_funcarg_ptr.cpp:681:30: error: expected '}' at end of input 681 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_funcarg_ptr.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_funcarg_ptr' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_funcarg_ptr.cpp -o ./_CFFI_test_funcarg_ptr.o _______________________________ test_funcres_ptr _______________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_funcres_ptr.cpp', '-o', './_CFFI_test_funcres_ptr.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_funcres_ptr.o', src = '_CFFI_test_funcres_ptr.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_funcres_ptr.o', src = '_CFFI_test_funcres_ptr.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_funcres_ptr(): ffi = FFI() ffi.cdef("int *foo(void);") > lib = verify(ffi, 'test_funcres_ptr', 'int *foo(void) { static int x=-12345; return &x; }') testing/cffi1/test_recompiler.py:161: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_funcres_ptr.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_funcres_ptr.cpp:669:30: error: expected '}' at end of input 669 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_funcres_ptr.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_funcres_ptr' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_funcres_ptr.cpp -o ./_CFFI_test_funcres_ptr.o ____________________________ test_global_var_array _____________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_global_var_array.cpp', '-o', './_CFFI_test_global_var_array.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_global_var_array.o', src = '_CFFI_test_global_var_array.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_global_var_array.o', src = '_CFFI_test_global_var_array.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_global_var_array(): ffi = FFI() ffi.cdef("extern int a[100];") > lib = verify(ffi, 'test_global_var_array', 'int a[100] = { 9999 };') testing/cffi1/test_recompiler.py:168: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_global_var_array.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_global_var_array.cpp:647:30: error: expected '}' at end of input 647 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_global_var_array.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_global_var_array' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_global_var_array.cpp -o ./_CFFI_test_global_var_array.o _____________________________ test_verify_typedef ______________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_verify_typedef.cpp', '-o', './_CFFI_test_verify_typedef.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_verify_typedef.o', src = '_CFFI_test_verify_typedef.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_verify_typedef.o', src = '_CFFI_test_verify_typedef.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_verify_typedef(): ffi = FFI() ffi.cdef("typedef int **foo_t;") > lib = verify(ffi, 'test_verify_typedef', 'typedef int **foo_t;') testing/cffi1/test_recompiler.py:176: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_verify_typedef.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_verify_typedef.cpp:642:30: error: expected '}' at end of input 642 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_verify_typedef.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_verify_typedef' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_verify_typedef.cpp -o ./_CFFI_test_verify_typedef.o ________________________ test_verify_typedef_dotdotdot _________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_verify_typedef_dotdotdot.cpp', '-o', './_CFFI_test_verify_typedef_dotdotdot.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_verify_typedef_dotdotdot.o' src = '_CFFI_test_verify_typedef_dotdotdot.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_verify_typedef_dotdotdot.o' src = '_CFFI_test_verify_typedef_dotdotdot.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_verify_typedef_dotdotdot(): ffi = FFI() ffi.cdef("typedef ... foo_t;") > verify(ffi, 'test_verify_typedef_dotdotdot', 'typedef int **foo_t;') testing/cffi1/test_recompiler.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_verify_typedef_dotdotdot.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_verify_typedef_dotdotdot.cpp:645:30: error: expected '}' at end of input 645 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_verify_typedef_dotdotdot.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_verify_typedef_dotdotdot' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_verify_typedef_dotdotdot.cpp -o ./_CFFI_test_verify_typedef_dotdotdot.o ______________________ test_verify_typedef_star_dotdotdot ______________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_verify_typedef_star_dotdotdot.cpp', '-o', './_CFFI_test_verify_typedef_star_dotdotdot.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_verify_typedef_star_dotdotdot.o' src = '_CFFI_test_verify_typedef_star_dotdotdot.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_verify_typedef_star_dotdotdot.o' src = '_CFFI_test_verify_typedef_star_dotdotdot.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_verify_typedef_star_dotdotdot(): ffi = FFI() ffi.cdef("typedef ... *foo_t;") > verify(ffi, 'test_verify_typedef_star_dotdotdot', 'typedef int **foo_t;') testing/cffi1/test_recompiler.py:187: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_verify_typedef_star_dotdotdot.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_verify_typedef_star_dotdotdot.cpp:646:30: error: expected '}' at end of input 646 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_verify_typedef_star_dotdotdot.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_verify_typedef_star_dotdotdot' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_verify_typedef_star_dotdotdot.cpp -o ./_CFFI_test_verify_typedef_star_dotdotdot.o _____________________________ test_global_var_int ______________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_global_var_int.cpp', '-o', './_CFFI_test_global_var_int.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_global_var_int.o', src = '_CFFI_test_global_var_int.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_global_var_int.o', src = '_CFFI_test_global_var_int.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_global_var_int(): ffi = FFI() ffi.cdef("extern int a, b, c;") > lib = verify(ffi, 'test_global_var_int', 'int a = 999, b, c;') testing/cffi1/test_recompiler.py:192: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_global_var_int.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_global_var_int.cpp:657:30: error: expected '}' at end of input 657 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_global_var_int.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_global_var_int' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_global_var_int.cpp -o ./_CFFI_test_global_var_int.o __________________________________ test_macro __________________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_macro.cpp', '-o', './_CFFI_test_macro.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_macro.o', src = '_CFFI_test_macro.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_macro.o', src = '_CFFI_test_macro.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_macro(): ffi = FFI() ffi.cdef("#define FOOBAR ...") > lib = verify(ffi, 'test_macro', "#define FOOBAR (-6912)") testing/cffi1/test_recompiler.py:214: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_macro.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_macro.cpp:647:30: error: expected '}' at end of input 647 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_macro.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_macro' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_macro.cpp -o ./_CFFI_test_macro.o ____________________________ test_macro_check_value ____________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_macro_check_value_ok.cpp', '-o', './_CFFI_test_macro_check_value_ok.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_macro_check_value_ok.o' src = '_CFFI_test_macro_check_value_ok.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_macro_check_value_ok.o' src = '_CFFI_test_macro_check_value_ok.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_macro_check_value(): # the value '-0x80000000' in C sources does not have a clear meaning # to me; it appears to have a different effect than '-2147483648'... # Moreover, on 32-bits, -2147483648 is actually equal to # -2147483648U, which in turn is equal to 2147483648U and so positive. vals = ['42', '-42', '0x80000000', '-2147483648', '0', '9223372036854775809ULL', '-9223372036854775807LL'] if sys.maxsize <= 2**32 or sys.platform == 'win32': vals.remove('-2147483648') ffi = FFI() cdef_lines = ['#define FOO_%d_%d %s' % (i, j, vals[i]) for i in range(len(vals)) for j in range(len(vals))] ffi.cdef('\n'.join(cdef_lines)) verify_lines = ['#define FOO_%d_%d %s' % (i, j, vals[j]) # [j], not [i] for i in range(len(vals)) for j in range(len(vals))] > lib = verify(ffi, 'test_macro_check_value_ok', '\n'.join(verify_lines)) testing/cffi1/test_recompiler.py:238: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_macro_check_value_ok.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_macro_check_value_ok.cpp:1034:30: error: expected '}' at end of input 1034 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_macro_check_value_ok.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_macro_check_value_ok' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_macro_check_value_ok.cpp -o ./_CFFI_test_macro_check_value_ok.o ________________________________ test_constant _________________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_constant.cpp', '-o', './_CFFI_test_constant.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_constant.o', src = '_CFFI_test_constant.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_constant.o', src = '_CFFI_test_constant.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_constant(): ffi = FFI() ffi.cdef("static const int FOOBAR;") > lib = verify(ffi, 'test_constant', "#define FOOBAR (-6912)") testing/cffi1/test_recompiler.py:261: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_constant.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_constant.cpp:647:30: error: expected '}' at end of input 647 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_constant.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_constant' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_constant.cpp -o ./_CFFI_test_constant.o _______________________ test_check_value_of_static_const _______________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_check_value_of_static_const.cpp', '-o', './_CFFI_test_check_value_of_static_const.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_check_value_of_static_const.o' src = '_CFFI_test_check_value_of_static_const.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_check_value_of_static_const.o' src = '_CFFI_test_check_value_of_static_const.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_check_value_of_static_const(): ffi = FFI() ffi.cdef("static const int FOOBAR = 042;") > lib = verify(ffi, 'test_check_value_of_static_const', "#define FOOBAR (-6912)") testing/cffi1/test_recompiler.py:269: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_check_value_of_static_const.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_check_value_of_static_const.cpp:649:30: error: expected '}' at end of input 649 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_check_value_of_static_const.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_check_value_of_static_const' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_check_value_of_static_const.cpp -o ./_CFFI_test_check_value_of_static_const.o _____________________________ test_constant_nonint _____________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_constant_nonint.cpp', '-o', './_CFFI_test_constant_nonint.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_constant_nonint.o', src = '_CFFI_test_constant_nonint.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_constant_nonint.o', src = '_CFFI_test_constant_nonint.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_constant_nonint(): ffi = FFI() ffi.cdef("static const double FOOBAR;") > lib = verify(ffi, 'test_constant_nonint', "#define FOOBAR (-6912.5)") testing/cffi1/test_recompiler.py:278: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_constant_nonint.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_constant_nonint.cpp:645:30: error: expected '}' at end of input 645 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_constant_nonint.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_constant_nonint' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_constant_nonint.cpp -o ./_CFFI_test_constant_nonint.o ______________________________ test_constant_ptr _______________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_constant_ptr.cpp', '-o', './_CFFI_test_constant_ptr.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_constant_ptr.o', src = '_CFFI_test_constant_ptr.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_constant_ptr.o', src = '_CFFI_test_constant_ptr.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_constant_ptr(): ffi = FFI() ffi.cdef("static double *const FOOBAR;") > lib = verify(ffi, 'test_constant_ptr', "#define FOOBAR NULL") testing/cffi1/test_recompiler.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_constant_ptr.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_constant_ptr.cpp:646:30: error: expected '}' at end of input 646 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_constant_ptr.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_constant_ptr' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_constant_ptr.cpp -o ./_CFFI_test_constant_ptr.o ___________________________________ test_dir ___________________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_dir.cpp', '-o', './_CFFI_test_dir.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_dir.o', src = '_CFFI_test_dir.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_dir.o', src = '_CFFI_test_dir.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_dir(): ffi = FFI() ffi.cdef("int ff(int); extern int aa; static const int my_constant;") > lib = verify(ffi, 'test_dir', """ #define my_constant (-45) int aa; int ff(int x) { return x+aa; } """) testing/cffi1/test_recompiler.py:293: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_dir.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_dir.cpp:690:30: error: expected '}' at end of input 690 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_dir.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_dir' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_dir.cpp -o ./_CFFI_test_dir.o __________________________ test_verify_opaque_struct ___________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_verify_opaque_struct.cpp', '-o', './_CFFI_test_verify_opaque_struct.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_verify_opaque_struct.o' src = '_CFFI_test_verify_opaque_struct.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_verify_opaque_struct.o' src = '_CFFI_test_verify_opaque_struct.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_verify_opaque_struct(): ffi = FFI() ffi.cdef("struct foo_s;") > lib = verify(ffi, 'test_verify_opaque_struct', "struct foo_s;") testing/cffi1/test_recompiler.py:313: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_verify_opaque_struct.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_verify_opaque_struct.cpp:641:30: error: expected '}' at end of input 641 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_verify_opaque_struct.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_verify_opaque_struct' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_verify_opaque_struct.cpp -o ./_CFFI_test_verify_opaque_struct.o ___________________________ test_verify_opaque_union ___________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_verify_opaque_union.cpp', '-o', './_CFFI_test_verify_opaque_union.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_verify_opaque_union.o' src = '_CFFI_test_verify_opaque_union.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_verify_opaque_union.o' src = '_CFFI_test_verify_opaque_union.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_verify_opaque_union(): ffi = FFI() ffi.cdef("union foo_s;") > lib = verify(ffi, 'test_verify_opaque_union', "union foo_s;") testing/cffi1/test_recompiler.py:319: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_verify_opaque_union.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_verify_opaque_union.cpp:641:30: error: expected '}' at end of input 641 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_verify_opaque_union.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_verify_opaque_union' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_verify_opaque_union.cpp -o ./_CFFI_test_verify_opaque_union.o ______________________________ test_verify_struct ______________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_verify_struct.cpp', '-o', './_CFFI_test_verify_struct.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_verify_struct.o', src = '_CFFI_test_verify_struct.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_verify_struct.o', src = '_CFFI_test_verify_struct.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_verify_struct(): ffi = FFI() ffi.cdef("""struct foo_s { int b; short a; ...; }; struct bar_s { struct foo_s *f; };""") > lib = verify(ffi, 'test_verify_struct', """struct foo_s { short a; int b; }; struct bar_s { struct foo_s *f; };""") testing/cffi1/test_recompiler.py:326: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_verify_struct.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_verify_struct.cpp:679:30: error: expected '}' at end of input 679 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_verify_struct.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_verify_struct' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_verify_struct.cpp -o ./_CFFI_test_verify_struct.o ________________________ test_verify_exact_field_offset ________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_verify_exact_field_offset.cpp', '-o', './_CFFI_test_verify_exact_field_offset.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_verify_exact_field_offset.o' src = '_CFFI_test_verify_exact_field_offset.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_verify_exact_field_offset.o' src = '_CFFI_test_verify_exact_field_offset.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_verify_exact_field_offset(): ffi = FFI() ffi.cdef("""struct foo_s { int b; short a; };""") > lib = verify(ffi, 'test_verify_exact_field_offset', """struct foo_s { short a; int b; };""") testing/cffi1/test_recompiler.py:353: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_verify_exact_field_offset.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_verify_exact_field_offset.cpp:662:30: error: expected '}' at end of input 662 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_verify_exact_field_offset.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_verify_exact_field_offset' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_verify_exact_field_offset.cpp -o ./_CFFI_test_verify_exact_field_offset.o ______________________________ test_type_caching _______________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_type_caching_1.cpp', '-o', './_CFFI_test_type_caching_1.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_type_caching_1.o', src = '_CFFI_test_type_caching_1.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_type_caching_1.o', src = '_CFFI_test_type_caching_1.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_type_caching(): ffi1 = FFI(); ffi1.cdef("struct foo_s;") ffi2 = FFI(); ffi2.cdef("struct foo_s;") # different one! > lib1 = verify(ffi1, 'test_type_caching_1', 'struct foo_s;') testing/cffi1/test_recompiler.py:363: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_type_caching_1.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_type_caching_1.cpp:641:30: error: expected '}' at end of input 641 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_type_caching_1.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_type_caching_1' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_type_caching_1.cpp -o ./_CFFI_test_type_caching_1.o _______________________________ test_verify_enum _______________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_verify_enum.cpp', '-o', './_CFFI_test_verify_enum.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_verify_enum.o', src = '_CFFI_test_verify_enum.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_verify_enum.o', src = '_CFFI_test_verify_enum.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_verify_enum(): ffi = FFI() ffi.cdef("""enum e1 { B1, A1, ... }; enum e2 { B2, A2, ... };""") > lib = verify(ffi, 'test_verify_enum', "enum e1 { A1, B1, C1=%d };" % sys.maxsize + "enum e2 { A2, B2, C2 };") testing/cffi1/test_recompiler.py:380: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_verify_enum.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_verify_enum.cpp:679:30: error: expected '}' at end of input 679 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_verify_enum.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_verify_enum' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_verify_enum.cpp -o ./_CFFI_test_verify_enum.o _____________________ test_dotdotdot_length_of_array_field _____________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_dotdotdot_length_of_array_field.cpp', '-o', './_CFFI_test_dotdotdot_length_of_array_field.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_dotdotdot_length_of_array_field.o' src = '_CFFI_test_dotdotdot_length_of_array_field.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_dotdotdot_length_of_array_field.o' src = '_CFFI_test_dotdotdot_length_of_array_field.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_dotdotdot_length_of_array_field(): ffi = FFI() ffi.cdef("struct foo_s { int a[...]; int b[...]; };") > verify(ffi, 'test_dotdotdot_length_of_array_field', "struct foo_s { int a[42]; int b[11]; };") testing/cffi1/test_recompiler.py:402: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_dotdotdot_length_of_array_field.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_dotdotdot_length_of_array_field.cpp:665:30: error: expected '}' at end of input 665 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_dotdotdot_length_of_array_field.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_dotdotdot_length_of_array_field' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_dotdotdot_length_of_array_field.cpp -o ./_CFFI_test_dotdotdot_length_of_array_field.o _________________________ test_dotdotdot_global_array __________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_dotdotdot_global_array.cpp', '-o', './_CFFI_test_dotdotdot_global_array.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_dotdotdot_global_array.o' src = '_CFFI_test_dotdotdot_global_array.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_dotdotdot_global_array.o' src = '_CFFI_test_dotdotdot_global_array.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_dotdotdot_global_array(): ffi = FFI() ffi.cdef("extern int aa[...]; extern int bb[...];") > lib = verify(ffi, 'test_dotdotdot_global_array', "int aa[41]; int bb[12];") testing/cffi1/test_recompiler.py:415: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_dotdotdot_global_array.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_dotdotdot_global_array.cpp:655:30: error: expected '}' at end of input 655 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_dotdotdot_global_array.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_dotdotdot_global_array' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_dotdotdot_global_array.cpp -o ./_CFFI_test_dotdotdot_global_array.o __________________________ test_open_array_in_struct ___________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_open_array_in_struct.cpp', '-o', './_CFFI_test_open_array_in_struct.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_open_array_in_struct.o' src = '_CFFI_test_open_array_in_struct.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_open_array_in_struct.o' src = '_CFFI_test_open_array_in_struct.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_open_array_in_struct(): ffi = FFI() ffi.cdef("struct foo_s { int b; int a[]; };") > verify(ffi, 'test_open_array_in_struct', "struct foo_s { int b; int a[]; };") testing/cffi1/test_recompiler.py:447: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_open_array_in_struct.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_open_array_in_struct.cpp:662:30: error: expected '}' at end of input 662 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_open_array_in_struct.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_open_array_in_struct' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_open_array_in_struct.cpp -o ./_CFFI_test_open_array_in_struct.o ______________________________ test_math_sin_type ______________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_math_sin_type.cpp', '-o', './_CFFI_test_math_sin_type.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_math_sin_type.o', src = '_CFFI_test_math_sin_type.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_math_sin_type.o', src = '_CFFI_test_math_sin_type.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_math_sin_type(): ffi = FFI() ffi.cdef("double sin(double); void *xxtestfunc();") > lib = verify(ffi, 'test_math_sin_type', """ #include void *xxtestfunc(void) { return 0; } """) testing/cffi1/test_recompiler.py:458: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_math_sin_type.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_math_sin_type.cpp:706:30: error: expected '}' at end of input 706 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_math_sin_type.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_math_sin_type' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_math_sin_type.cpp -o ./_CFFI_test_math_sin_type.o __________________ test_verify_anonymous_struct_with_typedef ___________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_verify_anonymous_struct_with_typedef.cpp', '-o', './_CFFI_test_verify_anonymous_struct_with_typedef.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_verify_anonymous_struct_with_typedef.o' src = '_CFFI_test_verify_anonymous_struct_with_typedef.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_verify_anonymous_struct_with_typedef.o' src = '_CFFI_test_verify_anonymous_struct_with_typedef.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_verify_anonymous_struct_with_typedef(): ffi = FFI() ffi.cdef("typedef struct { int a; long b; ...; } foo_t;") > verify(ffi, 'test_verify_anonymous_struct_with_typedef', "typedef struct { long b; int hidden, a; } foo_t;") testing/cffi1/test_recompiler.py:485: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_verify_anonymous_struct_with_typedef.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_verify_anonymous_struct_with_typedef.cpp:666:30: error: expected '}' at end of input 666 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_verify_anonymous_struct_with_typedef.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_verify_anonymous_struct_with_typedef' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_verify_anonymous_struct_with_typedef.cpp -o ./_CFFI_test_verify_anonymous_struct_with_typedef.o ________________ test_verify_anonymous_struct_with_star_typedef ________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_verify_anonymous_struct_with_star_typedef.cpp', '-o', './_CFFI_test_verify_anonymous_struct_with_star_typedef.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_verify_anonymous_struct_with_star_typedef.o' src = '_CFFI_test_verify_anonymous_struct_with_star_typedef.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_verify_anonymous_struct_with_star_typedef.o' src = '_CFFI_test_verify_anonymous_struct_with_star_typedef.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_verify_anonymous_struct_with_star_typedef(): ffi = FFI() ffi.cdef("typedef struct { int a; long b; } *foo_t;") > verify(ffi, 'test_verify_anonymous_struct_with_star_typedef', "typedef struct { int a; long b; } *foo_t;") testing/cffi1/test_recompiler.py:494: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_verify_anonymous_struct_with_star_typedef.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_verify_anonymous_struct_with_star_typedef.cpp:657:30: error: expected '}' at end of input 657 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_verify_anonymous_struct_with_star_typedef.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_verify_anonymous_struct_with_star_typedef' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_verify_anonymous_struct_with_star_typedef.cpp -o ./_CFFI_test_verify_anonymous_struct_with_star_typedef.o ___________________ test_verify_anonymous_enum_with_typedef ____________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_verify_anonymous_enum_with_typedef1.cpp', '-o', './_CFFI_test_verify_anonymous_enum_with_typedef1.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_verify_anonymous_enum_with_typedef1.o' src = '_CFFI_test_verify_anonymous_enum_with_typedef1.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_verify_anonymous_enum_with_typedef1.o' src = '_CFFI_test_verify_anonymous_enum_with_typedef1.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_verify_anonymous_enum_with_typedef(): ffi = FFI() ffi.cdef("typedef enum { AA, ... } e1;") > lib = verify(ffi, 'test_verify_anonymous_enum_with_typedef1', "typedef enum { BB, CC, AA } e1;") testing/cffi1/test_recompiler.py:502: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_verify_anonymous_enum_with_typedef1.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_verify_anonymous_enum_with_typedef1.cpp:656:30: error: expected '}' at end of input 656 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_verify_anonymous_enum_with_typedef1.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_verify_anonymous_enum_with_typedef1' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_verify_anonymous_enum_with_typedef1.cpp -o ./_CFFI_test_verify_anonymous_enum_with_typedef1.o ______________________________ test_unique_types _______________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_unique_types_1.cpp', '-o', './_CFFI_test_unique_types_1.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_unique_types_1.o', src = '_CFFI_test_unique_types_1.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_unique_types_1.o', src = '_CFFI_test_unique_types_1.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_unique_types(): CDEF = "struct foo_s; union foo_u; enum foo_e { AA };" > ffi1 = FFI(); ffi1.cdef(CDEF); verify(ffi1, "test_unique_types_1", CDEF) testing/cffi1/test_recompiler.py:517: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_unique_types_1.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_unique_types_1.cpp:661:30: error: expected '}' at end of input 661 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_unique_types_1.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_unique_types_1' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_unique_types_1.cpp -o ./_CFFI_test_unique_types_1.o ______________________ test_unspecified_size_of_global_1 _______________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_unspecified_size_of_global_1.cpp', '-o', './_CFFI_test_unspecified_size_of_global_1.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_unspecified_size_of_global_1.o' src = '_CFFI_test_unspecified_size_of_global_1.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_unspecified_size_of_global_1.o' src = '_CFFI_test_unspecified_size_of_global_1.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_unspecified_size_of_global_1(): ffi = FFI() ffi.cdef("extern int glob[];") > lib = verify(ffi, "test_unspecified_size_of_global_1", "int glob[10];") testing/cffi1/test_recompiler.py:582: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_unspecified_size_of_global_1.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_unspecified_size_of_global_1.cpp:646:30: error: expected '}' at end of input 646 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_unspecified_size_of_global_1.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_unspecified_size_of_global_1' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_unspecified_size_of_global_1.cpp -o ./_CFFI_test_unspecified_size_of_global_1.o ______________________ test_unspecified_size_of_global_2 _______________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_unspecified_size_of_global_2.cpp', '-o', './_CFFI_test_unspecified_size_of_global_2.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_unspecified_size_of_global_2.o' src = '_CFFI_test_unspecified_size_of_global_2.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_unspecified_size_of_global_2.o' src = '_CFFI_test_unspecified_size_of_global_2.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_unspecified_size_of_global_2(): ffi = FFI() ffi.cdef("extern int glob[][5];") > lib = verify(ffi, "test_unspecified_size_of_global_2", "int glob[10][5];") testing/cffi1/test_recompiler.py:588: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_unspecified_size_of_global_2.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_unspecified_size_of_global_2.cpp:648:30: error: expected '}' at end of input 648 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_unspecified_size_of_global_2.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_unspecified_size_of_global_2' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_unspecified_size_of_global_2.cpp -o ./_CFFI_test_unspecified_size_of_global_2.o ______________________ test_unspecified_size_of_global_3 _______________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_unspecified_size_of_global_3.cpp', '-o', './_CFFI_test_unspecified_size_of_global_3.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_unspecified_size_of_global_3.o' src = '_CFFI_test_unspecified_size_of_global_3.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_unspecified_size_of_global_3.o' src = '_CFFI_test_unspecified_size_of_global_3.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_unspecified_size_of_global_3(): ffi = FFI() ffi.cdef("extern int glob[][...];") > lib = verify(ffi, "test_unspecified_size_of_global_3", "int glob[10][5];") testing/cffi1/test_recompiler.py:594: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_unspecified_size_of_global_3.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_unspecified_size_of_global_3.cpp:648:30: error: expected '}' at end of input 648 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_unspecified_size_of_global_3.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_unspecified_size_of_global_3' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_unspecified_size_of_global_3.cpp -o ./_CFFI_test_unspecified_size_of_global_3.o ______________________ test_unspecified_size_of_global_4 _______________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_unspecified_size_of_global_4.cpp', '-o', './_CFFI_test_unspecified_size_of_global_4.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_unspecified_size_of_global_4.o' src = '_CFFI_test_unspecified_size_of_global_4.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_unspecified_size_of_global_4.o' src = '_CFFI_test_unspecified_size_of_global_4.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_unspecified_size_of_global_4(): ffi = FFI() ffi.cdef("extern int glob[...][...];") > lib = verify(ffi, "test_unspecified_size_of_global_4", "int glob[10][5];") testing/cffi1/test_recompiler.py:600: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_unspecified_size_of_global_4.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_unspecified_size_of_global_4.cpp:649:30: error: expected '}' at end of input 649 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_unspecified_size_of_global_4.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_unspecified_size_of_global_4' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_unspecified_size_of_global_4.cpp -o ./_CFFI_test_unspecified_size_of_global_4.o ________________________________ test_include_1 ________________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_include_1_parent.cpp', '-o', './_CFFI_test_include_1_parent.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_include_1_parent.o', src = '_CFFI_test_include_1_parent.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_include_1_parent.o', src = '_CFFI_test_include_1_parent.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_include_1(): ffi1 = FFI() ffi1.cdef("typedef double foo_t;") > verify(ffi1, "test_include_1_parent", "typedef double foo_t;") testing/cffi1/test_recompiler.py:606: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_include_1_parent.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_include_1_parent.cpp:640:30: error: expected '}' at end of input 640 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_include_1_parent.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_include_1_parent' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_include_1_parent.cpp -o ./_CFFI_test_include_1_parent.o _______________________________ test_include_1b ________________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_include_1b_parent.cpp', '-o', './_CFFI_test_include_1b_parent.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_include_1b_parent.o' src = '_CFFI_test_include_1b_parent.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_include_1b_parent.o' src = '_CFFI_test_include_1b_parent.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_include_1b(): ffi1 = FFI() ffi1.cdef("int foo1(int);") > lib1 = verify(ffi1, "test_include_1b_parent", "int foo1(int x) { return x + 10; }") testing/cffi1/test_recompiler.py:617: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_include_1b_parent.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_include_1b_parent.cpp:672:30: error: expected '}' at end of input 672 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_include_1b_parent.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_include_1b_parent' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_include_1b_parent.cpp -o ./_CFFI_test_include_1b_parent.o ________________________________ test_include_2 ________________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_include_2_parent.cpp', '-o', './_CFFI_test_include_2_parent.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_include_2_parent.o', src = '_CFFI_test_include_2_parent.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_include_2_parent.o', src = '_CFFI_test_include_2_parent.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_include_2(): ffi1 = FFI() ffi1.cdef("struct foo_s { int x, y; };") > verify(ffi1, "test_include_2_parent", "struct foo_s { int x, y; };") testing/cffi1/test_recompiler.py:630: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_include_2_parent.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_include_2_parent.cpp:661:30: error: expected '}' at end of input 661 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_include_2_parent.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_include_2_parent' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_include_2_parent.cpp -o ./_CFFI_test_include_2_parent.o ________________________________ test_include_3 ________________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_include_3_parent.cpp', '-o', './_CFFI_test_include_3_parent.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_include_3_parent.o', src = '_CFFI_test_include_3_parent.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_include_3_parent.o', src = '_CFFI_test_include_3_parent.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_include_3(): ffi1 = FFI() ffi1.cdef("typedef short sshort_t;") > verify(ffi1, "test_include_3_parent", "typedef short sshort_t;") testing/cffi1/test_recompiler.py:647: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_include_3_parent.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_include_3_parent.cpp:640:30: error: expected '}' at end of input 640 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_include_3_parent.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_include_3_parent' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_include_3_parent.cpp -o ./_CFFI_test_include_3_parent.o ________________________________ test_include_4 ________________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_include_4_parent.cpp', '-o', './_CFFI_test_include_4_parent.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_include_4_parent.o', src = '_CFFI_test_include_4_parent.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_include_4_parent.o', src = '_CFFI_test_include_4_parent.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_include_4(): ffi1 = FFI() ffi1.cdef("typedef struct { int x; } mystruct_t;") > verify(ffi1, "test_include_4_parent", "typedef struct { int x; } mystruct_t;") testing/cffi1/test_recompiler.py:661: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_include_4_parent.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_include_4_parent.cpp:661:30: error: expected '}' at end of input 661 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_include_4_parent.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_include_4_parent' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_include_4_parent.cpp -o ./_CFFI_test_include_4_parent.o ________________________________ test_include_5 ________________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_include_5_parent.cpp', '-o', './_CFFI_test_include_5_parent.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_include_5_parent.o', src = '_CFFI_test_include_5_parent.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_include_5_parent.o', src = '_CFFI_test_include_5_parent.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_include_5(): ffi1 = FFI() ffi1.cdef("typedef struct { int x[2]; int y; } *mystruct_p;") > verify(ffi1, "test_include_5_parent", "typedef struct { int x[2]; int y; } *mystruct_p;") testing/cffi1/test_recompiler.py:678: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_include_5_parent.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_include_5_parent.cpp:658:30: error: expected '}' at end of input 658 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_include_5_parent.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_include_5_parent' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_include_5_parent.cpp -o ./_CFFI_test_include_5_parent.o ________________________________ test_include_6 ________________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_include_6_parent.cpp', '-o', './_CFFI_test_include_6_parent.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_include_6_parent.o', src = '_CFFI_test_include_6_parent.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_include_6_parent.o', src = '_CFFI_test_include_6_parent.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_include_6(): ffi1 = FFI() ffi1.cdef("typedef ... mystruct_t;") > verify(ffi1, "test_include_6_parent", "typedef struct _mystruct_s mystruct_t;") testing/cffi1/test_recompiler.py:699: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_include_6_parent.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_include_6_parent.cpp:645:30: error: expected '}' at end of input 645 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_include_6_parent.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_include_6_parent' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_include_6_parent.cpp -o ./_CFFI_test_include_6_parent.o ________________________________ test_include_7 ________________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_include_7_parent.cpp', '-o', './_CFFI_test_include_7_parent.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_include_7_parent.o', src = '_CFFI_test_include_7_parent.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_include_7_parent.o', src = '_CFFI_test_include_7_parent.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_include_7(): ffi1 = FFI() ffi1.cdef("typedef ... mystruct_t;\n" "int ff7b(mystruct_t *);") > verify(ffi1, "test_include_7_parent", "typedef struct { int x; } mystruct_t;\n" "int ff7b(mystruct_t *p) { return p->x; }") testing/cffi1/test_recompiler.py:718: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_include_7_parent.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_include_7_parent.cpp:692:30: error: expected '}' at end of input 692 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_include_7_parent.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_include_7_parent' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_include_7_parent.cpp -o ./_CFFI_test_include_7_parent.o ________________________________ test_include_8 ________________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_include_8_parent.cpp', '-o', './_CFFI_test_include_8_parent.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_include_8_parent.o', src = '_CFFI_test_include_8_parent.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_include_8_parent.o', src = '_CFFI_test_include_8_parent.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_include_8(): ffi1 = FFI() ffi1.cdef("struct foo_s;") > verify(ffi1, "test_include_8_parent", "struct foo_s;") testing/cffi1/test_recompiler.py:735: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_include_8_parent.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_include_8_parent.cpp:641:30: error: expected '}' at end of input 641 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_include_8_parent.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_include_8_parent' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_include_8_parent.cpp -o ./_CFFI_test_include_8_parent.o ________________________ test_incomplete_struct_as_arg _________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_incomplete_struct_as_arg.cpp', '-o', './_CFFI_test_incomplete_struct_as_arg.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_incomplete_struct_as_arg.o' src = '_CFFI_test_incomplete_struct_as_arg.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_incomplete_struct_as_arg.o' src = '_CFFI_test_incomplete_struct_as_arg.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_incomplete_struct_as_arg(): ffi = FFI() ffi.cdef("struct foo_s { int x; ...; }; int f(int, struct foo_s);") > lib = verify(ffi, "test_incomplete_struct_as_arg", "struct foo_s { int a, x, z; };\n" "int f(int b, struct foo_s s) { return s.x * b; }") testing/cffi1/test_recompiler.py:768: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_incomplete_struct_as_arg.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_incomplete_struct_as_arg.cpp:708:30: error: expected '}' at end of input 708 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_incomplete_struct_as_arg.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_incomplete_struct_as_arg' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_incomplete_struct_as_arg.cpp -o ./_CFFI_test_incomplete_struct_as_arg.o _______________________ test_incomplete_struct_as_result _______________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_incomplete_struct_as_result.cpp', '-o', './_CFFI_test_incomplete_struct_as_result.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_incomplete_struct_as_result.o' src = '_CFFI_test_incomplete_struct_as_result.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_incomplete_struct_as_result.o' src = '_CFFI_test_incomplete_struct_as_result.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_incomplete_struct_as_result(): ffi = FFI() ffi.cdef("struct foo_s { int x; ...; }; struct foo_s f(int);") > lib = verify(ffi, "test_incomplete_struct_as_result", "struct foo_s { int a, x, z; };\n" "struct foo_s f(int x) { struct foo_s r; r.x = x * 2; return r; }") testing/cffi1/test_recompiler.py:781: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_incomplete_struct_as_result.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_incomplete_struct_as_result.cpp:697:30: error: expected '}' at end of input 697 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_incomplete_struct_as_result.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_incomplete_struct_as_result' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_incomplete_struct_as_result.cpp -o ./_CFFI_test_incomplete_struct_as_result.o ________________________ test_incomplete_struct_as_both ________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_incomplete_struct_as_both.cpp', '-o', './_CFFI_test_incomplete_struct_as_both.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_incomplete_struct_as_both.o' src = '_CFFI_test_incomplete_struct_as_both.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_incomplete_struct_as_both.o' src = '_CFFI_test_incomplete_struct_as_both.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_incomplete_struct_as_both(): ffi = FFI() ffi.cdef("struct foo_s { int x; ...; }; struct bar_s { int y; ...; };\n" "struct foo_s f(int, struct bar_s);") > lib = verify(ffi, "test_incomplete_struct_as_both", "struct foo_s { int a, x, z; };\n" "struct bar_s { int b, c, y, d; };\n" "struct foo_s f(int x, struct bar_s b) {\n" " struct foo_s r; r.x = x * b.y; return r;\n" "}") testing/cffi1/test_recompiler.py:792: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_incomplete_struct_as_both.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_incomplete_struct_as_both.cpp:724:30: error: expected '}' at end of input 724 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_incomplete_struct_as_both.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_incomplete_struct_as_both' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_incomplete_struct_as_both.cpp -o ./_CFFI_test_incomplete_struct_as_both.o _________________________ test_name_of_unnamed_struct __________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_name_of_unnamed_struct.cpp', '-o', './_CFFI_test_name_of_unnamed_struct.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_name_of_unnamed_struct.o' src = '_CFFI_test_name_of_unnamed_struct.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_name_of_unnamed_struct.o' src = '_CFFI_test_name_of_unnamed_struct.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_name_of_unnamed_struct(): ffi = FFI() ffi.cdef("typedef struct { int x; } foo_t;\n" "typedef struct { int y; } *bar_p;\n" "typedef struct { int y; } **baz_pp;\n") > verify(ffi, "test_name_of_unnamed_struct", "typedef struct { int x; } foo_t;\n" "typedef struct { int y; } *bar_p;\n" "typedef struct { int y; } **baz_pp;\n") testing/cffi1/test_recompiler.py:811: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_name_of_unnamed_struct.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_name_of_unnamed_struct.cpp:681:30: error: expected '}' at end of input 681 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_name_of_unnamed_struct.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_name_of_unnamed_struct' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_name_of_unnamed_struct.cpp -o ./_CFFI_test_name_of_unnamed_struct.o __________________________ test_address_of_global_var __________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_address_of_global_var.cpp', '-o', './_CFFI_test_address_of_global_var.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_address_of_global_var.o' src = '_CFFI_test_address_of_global_var.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_address_of_global_var.o' src = '_CFFI_test_address_of_global_var.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_address_of_global_var(): ffi = FFI() ffi.cdef(""" extern long bottom, bottoms[2]; long FetchRectBottom(void); long FetchRectBottoms1(void); #define FOOBAR 42 """) > lib = verify(ffi, "test_address_of_global_var", """ long bottom, bottoms[2]; long FetchRectBottom(void) { return bottom; } long FetchRectBottoms1(void) { return bottoms[1]; } #define FOOBAR 42 """) testing/cffi1/test_recompiler.py:827: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_address_of_global_var.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_address_of_global_var.cpp:724:30: error: expected '}' at end of input 724 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_address_of_global_var.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_address_of_global_var' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_address_of_global_var.cpp -o ./_CFFI_test_address_of_global_var.o _____________________________ test_defines__CFFI_ ______________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_defines__CFFI_.cpp', '-o', './_CFFI_test_defines__CFFI_.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_defines__CFFI_.o', src = '_CFFI_test_defines__CFFI_.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_defines__CFFI_.o', src = '_CFFI_test_defines__CFFI_.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_defines__CFFI_(): # Check that we define the macro _CFFI_ automatically. # It should be done before including Python.h, so that PyPy's Python.h # can check for it. ffi = FFI() ffi.cdef(""" #define CORRECT 1 """) > lib = verify(ffi, "test_defines__CFFI_", """ #ifdef _CFFI_ # define CORRECT 1 #endif """) testing/cffi1/test_recompiler.py:862: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_defines__CFFI_.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_defines__CFFI_.cpp:653:30: error: expected '}' at end of input 653 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_defines__CFFI_.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_defines__CFFI_' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_defines__CFFI_.cpp -o ./_CFFI_test_defines__CFFI_.o _______________________________ test_unpack_args _______________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_unpack_args.cpp', '-o', './_CFFI_test_unpack_args.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_unpack_args.o', src = '_CFFI_test_unpack_args.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_unpack_args.o', src = '_CFFI_test_unpack_args.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_unpack_args(): ffi = FFI() ffi.cdef("void foo0(void); void foo1(int); void foo2(int, int);") > lib = verify(ffi, "test_unpack_args", """ void foo0(void) { } void foo1(int x) { } void foo2(int x, int y) { } """) testing/cffi1/test_recompiler.py:872: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_unpack_args.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_unpack_args.cpp:745:30: error: expected '}' at end of input 745 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_unpack_args.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_unpack_args' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_unpack_args.cpp -o ./_CFFI_test_unpack_args.o ___________________________ test_address_of_function ___________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_addressof_function.cpp', '-o', './_CFFI_test_addressof_function.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_addressof_function.o' src = '_CFFI_test_addressof_function.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_addressof_function.o' src = '_CFFI_test_addressof_function.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_address_of_function(): ffi = FFI() ffi.cdef("long myfunc(long x);") > lib = verify(ffi, "test_addressof_function", """ char myfunc(char x) { return (char)(x + 42); } """, ignore_warnings=True) testing/cffi1/test_recompiler.py:909: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_addressof_function.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_addressof_function.cpp:674:30: error: expected '}' at end of input 674 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_addressof_function.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_addressof_function' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_addressof_function.cpp -o ./_CFFI_test_addressof_function.o _____________________ test_address_of_function_with_struct _____________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_addressof_function_with_struct.cpp', '-o', './_CFFI_test_addressof_function_with_struct.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_addressof_function_with_struct.o' src = '_CFFI_test_addressof_function_with_struct.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_addressof_function_with_struct.o' src = '_CFFI_test_addressof_function_with_struct.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_address_of_function_with_struct(): ffi = FFI() ffi.cdef("struct foo_s { int x; }; long myfunc(struct foo_s);") > lib = verify(ffi, "test_addressof_function_with_struct", """ struct foo_s { int x; }; char myfunc(struct foo_s input) { return (char)(input.x + 42); } """) testing/cffi1/test_recompiler.py:925: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_addressof_function_with_struct.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_addressof_function_with_struct.cpp:701:30: error: expected '}' at end of input 701 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_addressof_function_with_struct.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_addressof_function_with_struct' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_addressof_function_with_struct.cpp -o ./_CFFI_test_addressof_function_with_struct.o ________________________________ test_issue198 _________________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_issue198.cpp', '-o', './_CFFI_test_issue198.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_issue198.o', src = '_CFFI_test_issue198.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_issue198.o', src = '_CFFI_test_issue198.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_issue198(): ffi = FFI() ffi.cdef(""" typedef struct{...;} opaque_t; const opaque_t CONSTANT; int toint(opaque_t); """) > lib = verify(ffi, 'test_issue198', """ typedef int opaque_t; #define CONSTANT ((opaque_t)42) static int toint(opaque_t o) { return o; } """) testing/cffi1/test_recompiler.py:945: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_issue198.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_issue198.cpp:704:30: error: expected '}' at end of input 704 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_issue198.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_issue198' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_issue198.cpp -o ./_CFFI_test_issue198.o ___________________ test_constant_is_not_a_compiler_constant ___________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_constant_is_not_a_compiler_constant.cpp', '-o', './_CFFI_test_constant_is_not_a_compiler_constant.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_constant_is_not_a_compiler_constant.o' src = '_CFFI_test_constant_is_not_a_compiler_constant.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_constant_is_not_a_compiler_constant.o' src = '_CFFI_test_constant_is_not_a_compiler_constant.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_constant_is_not_a_compiler_constant(): ffi = FFI() ffi.cdef("static const float almost_forty_two;") > lib = verify(ffi, 'test_constant_is_not_a_compiler_constant', """ static float f(void) { return 42.25; } #define almost_forty_two (f()) """) testing/cffi1/test_recompiler.py:959: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_constant_is_not_a_compiler_constant.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_constant_is_not_a_compiler_constant.cpp:648:30: error: expected '}' at end of input 648 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_constant_is_not_a_compiler_constant.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_constant_is_not_a_compiler_constant' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_constant_is_not_a_compiler_constant.cpp -o ./_CFFI_test_constant_is_not_a_compiler_constant.o ________________________ test_constant_of_unknown_size _________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_constant_of_unknown_size.cpp', '-o', './_CFFI_test_constant_of_unknown_size.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_constant_of_unknown_size.o' src = '_CFFI_test_constant_of_unknown_size.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_constant_of_unknown_size.o' src = '_CFFI_test_constant_of_unknown_size.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_constant_of_unknown_size(): ffi = FFI() ffi.cdef(""" typedef ... opaque_t; const opaque_t CONSTANT; """) > lib = verify(ffi, 'test_constant_of_unknown_size', "typedef int opaque_t;" "const int CONSTANT = 42;") testing/cffi1/test_recompiler.py:971: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_constant_of_unknown_size.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_constant_of_unknown_size.cpp:654:30: error: expected '}' at end of input 654 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_constant_of_unknown_size.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_constant_of_unknown_size' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_constant_of_unknown_size.cpp -o ./_CFFI_test_constant_of_unknown_size.o ________________________ test_variable_of_unknown_size _________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_variable_of_unknown_size.cpp', '-o', './_CFFI_test_variable_of_unknown_size.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_variable_of_unknown_size.o' src = '_CFFI_test_variable_of_unknown_size.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_variable_of_unknown_size.o' src = '_CFFI_test_variable_of_unknown_size.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_variable_of_unknown_size(): ffi = FFI() ffi.cdef(""" typedef ... opaque_t; extern opaque_t globvar; """) > lib = verify(ffi, 'test_variable_of_unknown_size', """ typedef char opaque_t[6]; opaque_t globvar = "hello"; """) testing/cffi1/test_recompiler.py:984: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_variable_of_unknown_size.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_variable_of_unknown_size.cpp:657:30: error: expected '}' at end of input 657 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_variable_of_unknown_size.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_variable_of_unknown_size' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_variable_of_unknown_size.cpp -o ./_CFFI_test_variable_of_unknown_size.o ________________ test_constant_of_value_unknown_to_the_compiler ________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_constant_of_value_unknown_to_the_compiler.cpp', '-o', './_CFFI_test_constant_of_value_unknown_to_the_compiler.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_constant_of_value_unknown_to_the_compiler.o' src = '_CFFI_test_constant_of_value_unknown_to_the_compiler.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_constant_of_value_unknown_to_the_compiler.o' src = '_CFFI_test_constant_of_value_unknown_to_the_compiler.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_constant_of_value_unknown_to_the_compiler(): extra_c_source = udir.join( 'extra_test_constant_of_value_unknown_to_the_compiler.c') extra_c_source.write('const int external_foo = 42;\n') ffi = FFI() ffi.cdef("const int external_foo;") > lib = verify(ffi, 'test_constant_of_value_unknown_to_the_compiler', """ extern const int external_foo; """, sources=[str(extra_c_source)]) testing/cffi1/test_recompiler.py:1006: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_constant_of_value_unknown_to_the_compiler.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_constant_of_value_unknown_to_the_compiler.cpp:649:30: error: expected '}' at end of input 649 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_constant_of_value_unknown_to_the_compiler.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_constant_of_value_unknown_to_the_compiler' extension INFO root:dir_util.py:58 creating tmp/ffi-1 INFO root:spawn.py:60 i686-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c /tmp/ffi-1/extra_test_constant_of_value_unknown_to_the_compiler.c -o ./tmp/ffi-1/extra_test_constant_of_value_unknown_to_the_compiler.o INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_constant_of_value_unknown_to_the_compiler.cpp -o ./_CFFI_test_constant_of_value_unknown_to_the_compiler.o _______________________ test_dotdot_in_source_file_names _______________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_dotdot_in_source_file_names.cpp', '-o', './_CFFI_test_dotdot_in_source_file_names.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_dotdot_in_source_file_names.o' src = '_CFFI_test_dotdot_in_source_file_names.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_dotdot_in_source_file_names.o' src = '_CFFI_test_dotdot_in_source_file_names.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_dotdot_in_source_file_names(): extra_c_source = udir.join( 'extra_test_dotdot_in_source_file_names.c') extra_c_source.write('const int external_foo = 42;\n') ffi = FFI() ffi.cdef("const int external_foo;") > lib = verify(ffi, 'test_dotdot_in_source_file_names', """ extern const int external_foo; """, sources=[os.path.join(os.path.dirname(str(extra_c_source)), 'foobar', '..', os.path.basename(str(extra_c_source)))]) testing/cffi1/test_recompiler.py:1017: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_dotdot_in_source_file_names.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_dotdot_in_source_file_names.cpp:649:30: error: expected '}' at end of input 649 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_dotdot_in_source_file_names.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_dotdot_in_source_file_names' extension INFO root:spawn.py:60 i686-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c /tmp/ffi-1/extra_test_dotdot_in_source_file_names.c -o ./tmp/ffi-1/extra_test_dotdot_in_source_file_names.o INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_dotdot_in_source_file_names.cpp -o ./_CFFI_test_dotdot_in_source_file_names.o ______________________ test_call_with_incomplete_structs _______________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_call_with_incomplete_structs.cpp', '-o', './_CFFI_test_call_with_incomplete_structs.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_call_with_incomplete_structs.o' src = '_CFFI_test_call_with_incomplete_structs.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_call_with_incomplete_structs.o' src = '_CFFI_test_call_with_incomplete_structs.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_call_with_incomplete_structs(): ffi = FFI() ffi.cdef("typedef struct {...;} foo_t; " "extern foo_t myglob; " "foo_t increment(foo_t s); " "double getx(foo_t s);") > lib = verify(ffi, 'test_call_with_incomplete_structs', """ typedef double foo_t; double myglob = 42.5; double getx(double x) { return x; } double increment(double x) { return x + 1; } """) testing/cffi1/test_recompiler.py:1030: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_call_with_incomplete_structs.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_call_with_incomplete_structs.cpp:741:30: error: expected '}' at end of input 741 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_call_with_incomplete_structs.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_call_with_incomplete_structs' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_call_with_incomplete_structs.cpp -o ./_CFFI_test_call_with_incomplete_structs.o _______________________ test_struct_array_guess_length_2 _______________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_struct_array_guess_length_2.cpp', '-o', './_CFFI_test_struct_array_guess_length_2.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_struct_array_guess_length_2.o' src = '_CFFI_test_struct_array_guess_length_2.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_struct_array_guess_length_2.o' src = '_CFFI_test_struct_array_guess_length_2.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_struct_array_guess_length_2(): ffi = FFI() ffi.cdef("struct foo_s { int a[...][...]; };") > lib = verify(ffi, 'test_struct_array_guess_length_2', "struct foo_s { int x; int a[5][8]; int y; };") testing/cffi1/test_recompiler.py:1042: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_struct_array_guess_length_2.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_struct_array_guess_length_2.cpp:661:30: error: expected '}' at end of input 661 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_struct_array_guess_length_2.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_struct_array_guess_length_2' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_struct_array_guess_length_2.cpp -o ./_CFFI_test_struct_array_guess_length_2.o _______________________ test_struct_array_guess_length_3 _______________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_struct_array_guess_length_3.cpp', '-o', './_CFFI_test_struct_array_guess_length_3.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_struct_array_guess_length_3.o' src = '_CFFI_test_struct_array_guess_length_3.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_struct_array_guess_length_3.o' src = '_CFFI_test_struct_array_guess_length_3.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_struct_array_guess_length_3(): ffi = FFI() ffi.cdef("struct foo_s { int a[][...]; };") > lib = verify(ffi, 'test_struct_array_guess_length_3', "struct foo_s { int x; int a[5][7]; int y; };") testing/cffi1/test_recompiler.py:1059: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_struct_array_guess_length_3.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_struct_array_guess_length_3.cpp:660:30: error: expected '}' at end of input 660 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_struct_array_guess_length_3.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_struct_array_guess_length_3' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_struct_array_guess_length_3.cpp -o ./_CFFI_test_struct_array_guess_length_3.o ___________________________ test_global_var_array_2 ____________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_global_var_array_2.cpp', '-o', './_CFFI_test_global_var_array_2.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_global_var_array_2.o' src = '_CFFI_test_global_var_array_2.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_global_var_array_2.o' src = '_CFFI_test_global_var_array_2.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_global_var_array_2(): ffi = FFI() ffi.cdef("extern int a[...][...];") > lib = verify(ffi, 'test_global_var_array_2', 'int a[10][8];') testing/cffi1/test_recompiler.py:1072: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_global_var_array_2.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_global_var_array_2.cpp:649:30: error: expected '}' at end of input 649 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_global_var_array_2.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_global_var_array_2' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_global_var_array_2.cpp -o ./_CFFI_test_global_var_array_2.o ___________________________ test_global_var_array_3 ____________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_global_var_array_3.cpp', '-o', './_CFFI_test_global_var_array_3.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_global_var_array_3.o' src = '_CFFI_test_global_var_array_3.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_global_var_array_3.o' src = '_CFFI_test_global_var_array_3.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_global_var_array_3(): ffi = FFI() ffi.cdef("extern int a[][...];") > lib = verify(ffi, 'test_global_var_array_3', 'int a[10][8];') testing/cffi1/test_recompiler.py:1085: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_global_var_array_3.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_global_var_array_3.cpp:648:30: error: expected '}' at end of input 648 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_global_var_array_3.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_global_var_array_3' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_global_var_array_3.cpp -o ./_CFFI_test_global_var_array_3.o ___________________________ test_global_var_array_4 ____________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_global_var_array_4.cpp', '-o', './_CFFI_test_global_var_array_4.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_global_var_array_4.o' src = '_CFFI_test_global_var_array_4.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_global_var_array_4.o' src = '_CFFI_test_global_var_array_4.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_global_var_array_4(): ffi = FFI() ffi.cdef("extern int a[10][...];") > lib = verify(ffi, 'test_global_var_array_4', 'int a[10][8];') testing/cffi1/test_recompiler.py:1096: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_global_var_array_4.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_global_var_array_4.cpp:649:30: error: expected '}' at end of input 649 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_global_var_array_4.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_global_var_array_4' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_global_var_array_4.cpp -o ./_CFFI_test_global_var_array_4.o ____________________________ test_some_integer_type ____________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_some_integer_type.cpp', '-o', './_CFFI_test_some_integer_type.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_some_integer_type.o' src = '_CFFI_test_some_integer_type.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_some_integer_type.o' src = '_CFFI_test_some_integer_type.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_some_integer_type(): ffi = FFI() ffi.cdef(""" typedef int... foo_t; typedef unsigned long... bar_t; typedef struct { foo_t a, b; } mystruct_t; foo_t foobar(bar_t, mystruct_t); static const bar_t mu = -20; static const foo_t nu = 20; """) > lib = verify(ffi, 'test_some_integer_type', """ typedef unsigned long long foo_t; typedef short bar_t; typedef struct { foo_t a, b; } mystruct_t; static foo_t foobar(bar_t x, mystruct_t s) { return (foo_t)x + s.a + s.b; } static const bar_t mu = -20; static const foo_t nu = 20; """) testing/cffi1/test_recompiler.py:1116: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_some_integer_type.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_some_integer_type.cpp:751:30: error: expected '}' at end of input 751 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_some_integer_type.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_some_integer_type' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_some_integer_type.cpp -o ./_CFFI_test_some_integer_type.o _____________________________ test_some_float_type _____________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_some_float_type.cpp', '-o', './_CFFI_test_some_float_type.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_some_float_type.o', src = '_CFFI_test_some_float_type.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_some_float_type.o', src = '_CFFI_test_some_float_type.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_some_float_type(): ffi = FFI() ffi.cdef(""" typedef double... foo_t; typedef float... bar_t; foo_t sum(foo_t[]); bar_t neg(bar_t); """) > lib = verify(ffi, 'test_some_float_type', """ typedef float foo_t; static foo_t sum(foo_t x[]) { return x[0] + x[1]; } typedef double bar_t; static double neg(double x) { return -x; } """) testing/cffi1/test_recompiler.py:1149: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_some_float_type.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_some_float_type.cpp:729:30: error: expected '}' at end of input 729 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_some_float_type.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_some_float_type' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_some_float_type.cpp -o ./_CFFI_test_some_float_type.o __________________________ test_some_float_invalid_2 ___________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_some_float_invalid_2.cpp', '-o', './_CFFI_test_some_float_invalid_2.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_some_float_invalid_2.o' src = '_CFFI_test_some_float_invalid_2.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_some_float_invalid_2.o' src = '_CFFI_test_some_float_invalid_2.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_some_float_invalid_2(): ffi = FFI() ffi.cdef("typedef double... foo_t; foo_t neg(foo_t);") > lib = verify(ffi, 'test_some_float_invalid_2', """ typedef unsigned long foo_t; foo_t neg(foo_t x) { return -x; } """) testing/cffi1/test_recompiler.py:1170: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_some_float_invalid_2.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_some_float_invalid_2.cpp:681:30: error: expected '}' at end of input 681 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_some_float_invalid_2.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_some_float_invalid_2' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_some_float_invalid_2.cpp -o ./_CFFI_test_some_float_invalid_2.o __________________________ test_some_float_invalid_3 ___________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_some_float_invalid_3.cpp', '-o', './_CFFI_test_some_float_invalid_3.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_some_float_invalid_3.o' src = '_CFFI_test_some_float_invalid_3.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_some_float_invalid_3.o' src = '_CFFI_test_some_float_invalid_3.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_some_float_invalid_3(): ffi = FFI() ffi.cdef("typedef double... foo_t; foo_t neg(foo_t);") > lib = verify(ffi, 'test_some_float_invalid_3', """ typedef long double foo_t; foo_t neg(foo_t x) { return -x; } """, ignore_warnings=True) testing/cffi1/test_recompiler.py:1181: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_some_float_invalid_3.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_some_float_invalid_3.cpp:681:30: error: expected '}' at end of input 681 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_some_float_invalid_3.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_some_float_invalid_3' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_some_float_invalid_3.cpp -o ./_CFFI_test_some_float_invalid_3.o ________________________________ test_issue200 _________________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_issue200.cpp', '-o', './_CFFI_test_issue200.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_issue200.o', src = '_CFFI_test_issue200.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_issue200.o', src = '_CFFI_test_issue200.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_issue200(): ffi = FFI() ffi.cdef(""" typedef void (function_t)(void*); void function(void *); """) > lib = verify(ffi, 'test_issue200', """ static void function(void *p) { (void)p; } """) testing/cffi1/test_recompiler.py:1199: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_issue200.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_issue200.cpp:685:30: error: expected '}' at end of input 685 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_issue200.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_issue200' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_issue200.cpp -o ./_CFFI_test_issue200.o __________________________ test_alignment_of_longlong __________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_alignment_of_longlong.cpp', '-o', './_CFFI_test_alignment_of_longlong.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_alignment_of_longlong.o' src = '_CFFI_test_alignment_of_longlong.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_alignment_of_longlong.o' src = '_CFFI_test_alignment_of_longlong.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_alignment_of_longlong(): ffi = FFI() x1 = ffi.alignof('unsigned long long') assert x1 in [4, 8] ffi.cdef("struct foo_s { unsigned long long x; };") > lib = verify(ffi, 'test_alignment_of_longlong', "struct foo_s { unsigned long long x; };") testing/cffi1/test_recompiler.py:1211: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_alignment_of_longlong.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_alignment_of_longlong.cpp:657:30: error: expected '}' at end of input 657 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_alignment_of_longlong.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_alignment_of_longlong' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_alignment_of_longlong.cpp -o ./_CFFI_test_alignment_of_longlong.o _____________________________ test_import_from_lib _____________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_import_from_lib.cpp', '-o', './_CFFI_test_import_from_lib.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_import_from_lib.o', src = '_CFFI_test_import_from_lib.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_import_from_lib.o', src = '_CFFI_test_import_from_lib.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_import_from_lib(): ffi = FFI() ffi.cdef("int mybar(int); static int myvar;\n#define MYFOO ...") > lib = verify(ffi, 'test_import_from_lib', "#define MYFOO 42\n" "static int mybar(int x) { return x + 1; }\n" "static int myvar = -5;") testing/cffi1/test_recompiler.py:1219: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_import_from_lib.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_import_from_lib.cpp:688:30: error: expected '}' at end of input 688 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_import_from_lib.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_import_from_lib' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_import_from_lib.cpp -o ./_CFFI_test_import_from_lib.o ___________________________ test_macro_var_callback ____________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_macro_var_callback.cpp', '-o', './_CFFI_test_macro_var_callback.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_macro_var_callback.o' src = '_CFFI_test_macro_var_callback.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_macro_var_callback.o' src = '_CFFI_test_macro_var_callback.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_macro_var_callback(): ffi = FFI() ffi.cdef("extern int my_value; extern int *(*get_my_value)(void);") > lib = verify(ffi, 'test_macro_var_callback', "int *(*get_my_value)(void);\n" "#define my_value (*get_my_value())") testing/cffi1/test_recompiler.py:1235: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_macro_var_callback.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_macro_var_callback.cpp:656:30: error: expected '}' at end of input 656 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_macro_var_callback.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_macro_var_callback' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_macro_var_callback.cpp -o ./_CFFI_test_macro_var_callback.o ______________________________ test_const_fields _______________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_const_fields.cpp', '-o', './_CFFI_test_const_fields.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_const_fields.o', src = '_CFFI_test_const_fields.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_const_fields.o', src = '_CFFI_test_const_fields.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_const_fields(): ffi = FFI() ffi.cdef("""struct foo_s { const int a; void *const b; };""") > lib = verify(ffi, 'test_const_fields', """ struct foo_s { const int a; void *const b; };""") testing/cffi1/test_recompiler.py:1284: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_const_fields.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_const_fields.cpp:664:30: error: expected '}' at end of input 664 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_const_fields.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_const_fields' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_const_fields.cpp -o ./_CFFI_test_const_fields.o _____________________________ test_restrict_fields _____________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_restrict_fields.cpp', '-o', './_CFFI_test_restrict_fields.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_restrict_fields.o', src = '_CFFI_test_restrict_fields.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_restrict_fields.o', src = '_CFFI_test_restrict_fields.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_restrict_fields(): ffi = FFI() ffi.cdef("""struct foo_s { void * restrict b; };""") > lib = verify(ffi, 'test_restrict_fields', """ struct foo_s { void * __restrict b; };""") testing/cffi1/test_recompiler.py:1295: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_restrict_fields.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_restrict_fields.cpp:659:30: error: expected '}' at end of input 659 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_restrict_fields.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_restrict_fields' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_restrict_fields.cpp -o ./_CFFI_test_restrict_fields.o _____________________________ test_volatile_fields _____________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_volatile_fields.cpp', '-o', './_CFFI_test_volatile_fields.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_volatile_fields.o', src = '_CFFI_test_volatile_fields.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_volatile_fields.o', src = '_CFFI_test_volatile_fields.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_volatile_fields(): ffi = FFI() ffi.cdef("""struct foo_s { void * volatile b; };""") > lib = verify(ffi, 'test_volatile_fields', """ struct foo_s { void * volatile b; };""") testing/cffi1/test_recompiler.py:1304: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_volatile_fields.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_volatile_fields.cpp:659:30: error: expected '}' at end of input 659 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_volatile_fields.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_volatile_fields' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_volatile_fields.cpp -o ./_CFFI_test_volatile_fields.o ___________________________ test_const_array_fields ____________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_const_array_fields.cpp', '-o', './_CFFI_test_const_array_fields.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_const_array_fields.o' src = '_CFFI_test_const_array_fields.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_const_array_fields.o' src = '_CFFI_test_const_array_fields.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_const_array_fields(): ffi = FFI() ffi.cdef("""struct foo_s { const int a[4]; };""") > lib = verify(ffi, 'test_const_array_fields', """ struct foo_s { const int a[4]; };""") testing/cffi1/test_recompiler.py:1313: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_const_array_fields.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_const_array_fields.cpp:660:30: error: expected '}' at end of input 660 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_const_array_fields.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_const_array_fields' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_const_array_fields.cpp -o ./_CFFI_test_const_array_fields.o ______________________ test_const_array_fields_varlength _______________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_const_array_fields_varlength.cpp', '-o', './_CFFI_test_const_array_fields_varlength.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_const_array_fields_varlength.o' src = '_CFFI_test_const_array_fields_varlength.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_const_array_fields_varlength.o' src = '_CFFI_test_const_array_fields_varlength.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_const_array_fields_varlength(): ffi = FFI() ffi.cdef("""struct foo_s { const int a[]; ...; };""") > lib = verify(ffi, 'test_const_array_fields_varlength', """ struct foo_s { const int a[4]; };""") testing/cffi1/test_recompiler.py:1322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_const_array_fields_varlength.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_const_array_fields_varlength.cpp:659:30: error: expected '}' at end of input 659 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_const_array_fields_varlength.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_const_array_fields_varlength' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_const_array_fields_varlength.cpp -o ./_CFFI_test_const_array_fields_varlength.o ____________________ test_const_array_fields_unknownlength _____________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_const_array_fields_unknownlength.cpp', '-o', './_CFFI_test_const_array_fields_unknownlength.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_const_array_fields_unknownlength.o' src = '_CFFI_test_const_array_fields_unknownlength.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_const_array_fields_unknownlength.o' src = '_CFFI_test_const_array_fields_unknownlength.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_const_array_fields_unknownlength(): ffi = FFI() ffi.cdef("""struct foo_s { const int a[...]; ...; };""") > lib = verify(ffi, 'test_const_array_fields_unknownlength', """ struct foo_s { const int a[4]; };""") testing/cffi1/test_recompiler.py:1331: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_const_array_fields_unknownlength.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_const_array_fields_unknownlength.cpp:660:30: error: expected '}' at end of input 660 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_const_array_fields_unknownlength.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_const_array_fields_unknownlength' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_const_array_fields_unknownlength.cpp -o ./_CFFI_test_const_array_fields_unknownlength.o ___________________________ test_const_function_args ___________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_const_function_args.cpp', '-o', './_CFFI_test_const_function_args.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_const_function_args.o' src = '_CFFI_test_const_function_args.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_const_function_args.o' src = '_CFFI_test_const_function_args.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_const_function_args(): ffi = FFI() ffi.cdef("""int foobar(const int a, const int *b, const int c[]);""") > lib = verify(ffi, 'test_const_function_args', """ int foobar(const int a, const int *b, const int c[]) { return a + *b + *c; } """) testing/cffi1/test_recompiler.py:1340: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_const_function_args.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_const_function_args.cpp:707:30: error: expected '}' at end of input 707 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_const_function_args.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_const_function_args' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_const_function_args.cpp -o ./_CFFI_test_const_function_args.o ________________________ test_const_function_type_args _________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_const_function_type_args.cpp', '-o', './_CFFI_test_const_function_type_args.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_const_function_type_args.o' src = '_CFFI_test_const_function_type_args.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_const_function_type_args.o' src = '_CFFI_test_const_function_type_args.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_const_function_type_args(): ffi = FFI() ffi.cdef("""extern int(*foobar)(const int a,const int*b,const int c[]);""") > lib = verify(ffi, 'test_const_function_type_args', """ int (*foobar)(const int a, const int *b, const int c[]); """) testing/cffi1/test_recompiler.py:1350: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_const_function_type_args.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_const_function_type_args.cpp:652:30: error: expected '}' at end of input 652 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_const_function_type_args.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_const_function_type_args' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_const_function_type_args.cpp -o ./_CFFI_test_const_function_type_args.o _____________________________ test_const_constant ______________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_const_constant.cpp', '-o', './_CFFI_test_const_constant.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_const_constant.o', src = '_CFFI_test_const_constant.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_const_constant.o', src = '_CFFI_test_const_constant.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_const_constant(): ffi = FFI() ffi.cdef("""struct foo_s { int x,y; }; const struct foo_s myfoo;""") > lib = verify(ffi, 'test_const_constant', """ struct foo_s { int x,y; }; const struct foo_s myfoo = { 40, 2 }; """) testing/cffi1/test_recompiler.py:1361: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_const_constant.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_const_constant.cpp:672:30: error: expected '}' at end of input 672 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_const_constant.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_const_constant' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_const_constant.cpp -o ./_CFFI_test_const_constant.o ____________________________ test_const_via_typedef ____________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_const_via_typedef.cpp', '-o', './_CFFI_test_const_via_typedef.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_const_via_typedef.o' src = '_CFFI_test_const_via_typedef.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_const_via_typedef.o' src = '_CFFI_test_const_via_typedef.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_const_via_typedef(): ffi = FFI() ffi.cdef("""typedef const int const_t; const_t aaa;""") > lib = verify(ffi, 'test_const_via_typedef', """ typedef const int const_t; #define aaa 42 """) testing/cffi1/test_recompiler.py:1370: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_const_via_typedef.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_const_via_typedef.cpp:654:30: error: expected '}' at end of input 654 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_const_via_typedef.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_const_via_typedef' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_const_via_typedef.cpp -o ./_CFFI_test_const_via_typedef.o _______________________ test_win32_calling_convention_0 ________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_win32_calling_convention_0.cpp', '-o', './_CFFI_test_win32_calling_convention_0.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_win32_calling_convention_0.o' src = '_CFFI_test_win32_calling_convention_0.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_win32_calling_convention_0.o' src = '_CFFI_test_win32_calling_convention_0.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_win32_calling_convention_0(): ffi = FFI() ffi.cdef(""" int call1(int(__cdecl *cb)(int)); int (*const call2)(int(__stdcall *cb)(int)); """) > lib = verify(ffi, 'test_win32_calling_convention_0', r""" #ifndef _MSC_VER # define __stdcall /* nothing */ #endif int call1(int(*cb)(int)) { int i, result = 0; //printf("call1: cb = %p\n", cb); for (i = 0; i < 1000; i++) result += cb(i); //printf("result = %d\n", result); return result; } int call2(int(__stdcall *cb)(int)) { int i, result = 0; //printf("call2: cb = %p\n", cb); for (i = 0; i < 1000; i++) result += cb(-i); //printf("result = %d\n", result); return result; } """) testing/cffi1/test_recompiler.py:1384: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_win32_calling_convention_0.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_win32_calling_convention_0.cpp:708:30: error: expected '}' at end of input 708 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_win32_calling_convention_0.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_win32_calling_convention_0' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_win32_calling_convention_0.cpp -o ./_CFFI_test_win32_calling_convention_0.o _______________________ test_win32_calling_convention_1 ________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_win32_calling_convention_1.cpp', '-o', './_CFFI_test_win32_calling_convention_1.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_win32_calling_convention_1.o' src = '_CFFI_test_win32_calling_convention_1.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_win32_calling_convention_1.o' src = '_CFFI_test_win32_calling_convention_1.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_win32_calling_convention_1(): ffi = FFI() ffi.cdef(""" int __cdecl call1(int(__cdecl *cb)(int)); int __stdcall call2(int(__stdcall *cb)(int)); int (__cdecl *const cb1)(int); int (__stdcall *const cb2)(int); """) > lib = verify(ffi, 'test_win32_calling_convention_1', r""" #ifndef _MSC_VER # define __cdecl # define __stdcall #endif int __cdecl cb1(int x) { return x * 2; } int __stdcall cb2(int x) { return x * 3; } int __cdecl call1(int(__cdecl *cb)(int)) { int i, result = 0; //printf("here1\n"); //printf("cb = %p, cb1 = %p\n", cb, (void *)cb1); for (i = 0; i < 1000; i++) result += cb(i); //printf("result = %d\n", result); return result; } int __stdcall call2(int(__stdcall *cb)(int)) { int i, result = 0; //printf("here1\n"); //printf("cb = %p, cb2 = %p\n", cb, (void *)cb2); for (i = 0; i < 1000; i++) result += cb(-i); //printf("result = %d\n", result); return result; } """) testing/cffi1/test_recompiler.py:1434: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_win32_calling_convention_1.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_win32_calling_convention_1.cpp:750:30: error: expected '}' at end of input 750 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_win32_calling_convention_1.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_win32_calling_convention_1' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_win32_calling_convention_1.cpp -o ./_CFFI_test_win32_calling_convention_1.o _______________________ test_win32_calling_convention_2 ________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_win32_calling_convention_2.cpp', '-o', './_CFFI_test_win32_calling_convention_2.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_win32_calling_convention_2.o' src = '_CFFI_test_win32_calling_convention_2.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_win32_calling_convention_2.o' src = '_CFFI_test_win32_calling_convention_2.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_win32_calling_convention_2(): # any mistake in the declaration of plain function (including the # precise argument types and, here, the calling convention) are # automatically corrected. But this does not apply to the 'cb' # function pointer argument. ffi = FFI() ffi.cdef(""" int __stdcall call1(int(__cdecl *cb)(int)); int __cdecl call2(int(__stdcall *cb)(int)); int (__cdecl *const cb1)(int); int (__stdcall *const cb2)(int); """) > lib = verify(ffi, 'test_win32_calling_convention_2', """ #ifndef _MSC_VER # define __cdecl # define __stdcall #endif int __cdecl call1(int(__cdecl *cb)(int)) { int i, result = 0; for (i = 0; i < 1000; i++) result += cb(i); return result; } int __stdcall call2(int(__stdcall *cb)(int)) { int i, result = 0; for (i = 0; i < 1000; i++) result += cb(-i); return result; } int __cdecl cb1(int x) { return x * 2; } int __stdcall cb2(int x) { return x * 3; } """) testing/cffi1/test_recompiler.py:1483: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_win32_calling_convention_2.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_win32_calling_convention_2.cpp:743:30: error: expected '}' at end of input 743 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_win32_calling_convention_2.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_win32_calling_convention_2' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_win32_calling_convention_2.cpp -o ./_CFFI_test_win32_calling_convention_2.o _______________________ test_win32_calling_convention_3 ________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_win32_calling_convention_3.cpp', '-o', './_CFFI_test_win32_calling_convention_3.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_win32_calling_convention_3.o' src = '_CFFI_test_win32_calling_convention_3.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_win32_calling_convention_3.o' src = '_CFFI_test_win32_calling_convention_3.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_win32_calling_convention_3(): ffi = FFI() ffi.cdef(""" struct point { int x, y; }; int (*const cb1)(struct point); int (__stdcall *const cb2)(struct point); struct point __stdcall call1(int(*cb)(struct point)); struct point call2(int(__stdcall *cb)(struct point)); """) > lib = verify(ffi, 'test_win32_calling_convention_3', r""" #ifndef _MSC_VER # define __cdecl # define __stdcall #endif struct point { int x, y; }; int cb1(struct point pt) { return pt.x + 10 * pt.y; } int __stdcall cb2(struct point pt) { return pt.x + 100 * pt.y; } struct point __stdcall call1(int(__cdecl *cb)(struct point)) { int i; struct point result = { 0, 0 }; //printf("here1\n"); //printf("cb = %p, cb1 = %p\n", cb, (void *)cb1); for (i = 0; i < 1000; i++) { struct point p = { i, -i }; int r = cb(p); result.x += r; result.y -= r; } return result; } struct point __cdecl call2(int(__stdcall *cb)(struct point)) { int i; struct point result = { 0, 0 }; for (i = 0; i < 1000; i++) { struct point p = { -i, i }; int r = cb(p); result.x += r; result.y -= r; } return result; } """) testing/cffi1/test_recompiler.py:1526: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_win32_calling_convention_3.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_win32_calling_convention_3.cpp:787:30: error: expected '}' at end of input 787 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_win32_calling_convention_3.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_win32_calling_convention_3' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_win32_calling_convention_3.cpp -o ./_CFFI_test_win32_calling_convention_3.o _____________________________ test_extern_python_1 _____________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_extern_python_1.cpp', '-o', './_CFFI_test_extern_python_1.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_extern_python_1.o', src = '_CFFI_test_extern_python_1.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_extern_python_1.o', src = '_CFFI_test_extern_python_1.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_extern_python_1(): import warnings ffi = FFI() with warnings.catch_warnings(record=True) as log: ffi.cdef(""" extern "Python" { int bar(int, int); void baz(int, int); int bok(void); void boz(void); } """) assert len(log) == 0, "got a warning: %r" % (log,) > lib = verify(ffi, 'test_extern_python_1', """ static void baz(int, int); /* forward */ """) testing/cffi1/test_recompiler.py:1588: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_extern_python_1.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_extern_python_1.cpp:710:30: error: expected '}' at end of input 710 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_extern_python_1.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_extern_python_1' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_extern_python_1.cpp -o ./_CFFI_test_extern_python_1.o ________________________ test_extern_python_bogus_name _________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_extern_python_bogus_name.cpp', '-o', './_CFFI_test_extern_python_bogus_name.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_extern_python_bogus_name.o' src = '_CFFI_test_extern_python_bogus_name.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_extern_python_bogus_name.o' src = '_CFFI_test_extern_python_bogus_name.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_extern_python_bogus_name(): ffi = FFI() ffi.cdef("extern int abc;") > lib = verify(ffi, 'test_extern_python_bogus_name', "int abc;") testing/cffi1/test_recompiler.py:1640: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_extern_python_bogus_name.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_extern_python_bogus_name.cpp:645:30: error: expected '}' at end of input 645 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_extern_python_bogus_name.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_extern_python_bogus_name' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_extern_python_bogus_name.cpp -o ./_CFFI_test_extern_python_bogus_name.o _____________________ test_extern_python_bogus_result_type _____________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_extern_python_bogus_result_type.cpp', '-o', './_CFFI_test_extern_python_bogus_result_type.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_extern_python_bogus_result_type.o' src = '_CFFI_test_extern_python_bogus_result_type.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_extern_python_bogus_result_type.o' src = '_CFFI_test_extern_python_bogus_result_type.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_extern_python_bogus_result_type(): ffi = FFI() ffi.cdef("""extern "Python" void bar(int);""") > lib = verify(ffi, 'test_extern_python_bogus_result_type', "") testing/cffi1/test_recompiler.py:1664: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_extern_python_bogus_result_type.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_extern_python_bogus_result_type.cpp:658:30: error: expected '}' at end of input 658 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_extern_python_bogus_result_type.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_extern_python_bogus_result_type' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_extern_python_bogus_result_type.cpp -o ./_CFFI_test_extern_python_bogus_result_type.o _________________________ test_extern_python_redefine __________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_extern_python_redefine.cpp', '-o', './_CFFI_test_extern_python_redefine.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_extern_python_redefine.o' src = '_CFFI_test_extern_python_redefine.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_extern_python_redefine.o' src = '_CFFI_test_extern_python_redefine.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_extern_python_redefine(): ffi = FFI() ffi.cdef("""extern "Python" int bar(int);""") > lib = verify(ffi, 'test_extern_python_redefine', "") testing/cffi1/test_recompiler.py:1681: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_extern_python_redefine.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_extern_python_redefine.cpp:658:30: error: expected '}' at end of input 658 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_extern_python_redefine.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_extern_python_redefine' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_extern_python_redefine.cpp -o ./_CFFI_test_extern_python_redefine.o __________________________ test_extern_python_struct ___________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_extern_python_struct.cpp', '-o', './_CFFI_test_extern_python_struct.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_extern_python_struct.o' src = '_CFFI_test_extern_python_struct.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_extern_python_struct.o' src = '_CFFI_test_extern_python_struct.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_extern_python_struct(): ffi = FFI() ffi.cdef(""" struct foo_s { int a, b, c; }; extern "Python" int bar(int, struct foo_s, int); extern "Python" { struct foo_s baz(int, int); struct foo_s bok(void); } """) > lib = verify(ffi, 'test_extern_python_struct', "struct foo_s { int a, b, c; };") testing/cffi1/test_recompiler.py:1701: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_extern_python_struct.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_extern_python_struct.cpp:724:30: error: expected '}' at end of input 724 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_extern_python_struct.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_extern_python_struct' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_extern_python_struct.cpp -o ./_CFFI_test_extern_python_struct.o ________________________ test_extern_python_long_double ________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_extern_python_long_double.cpp', '-o', './_CFFI_test_extern_python_long_double.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_extern_python_long_double.o' src = '_CFFI_test_extern_python_long_double.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_extern_python_long_double.o' src = '_CFFI_test_extern_python_long_double.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_extern_python_long_double(): ffi = FFI() ffi.cdef(""" extern "Python" int bar(int, long double, int); extern "Python" long double baz(int, int); extern "Python" long double bok(void); """) > lib = verify(ffi, 'test_extern_python_long_double', "") testing/cffi1/test_recompiler.py:1731: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_extern_python_long_double.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_extern_python_long_double.cpp:696:30: error: expected '}' at end of input 696 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_extern_python_long_double.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_extern_python_long_double' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_extern_python_long_double.cpp -o ./_CFFI_test_extern_python_long_double.o _________________________ test_extern_python_signature _________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_extern_python_signature.cpp', '-o', './_CFFI_test_extern_python_signature.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_extern_python_signature.o' src = '_CFFI_test_extern_python_signature.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_extern_python_signature.o' src = '_CFFI_test_extern_python_signature.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_extern_python_signature(): ffi = FFI() > lib = verify(ffi, 'test_extern_python_signature', "") testing/cffi1/test_recompiler.py:1757: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_extern_python_signature.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_extern_python_signature.cpp:636:30: error: expected '}' at end of input 636 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_extern_python_signature.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_extern_python_signature' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_extern_python_signature.cpp -o ./_CFFI_test_extern_python_signature.o __________________________ test_extern_python_errors ___________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_extern_python_errors.cpp', '-o', './_CFFI_test_extern_python_errors.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_extern_python_errors.o' src = '_CFFI_test_extern_python_errors.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_extern_python_errors.o' src = '_CFFI_test_extern_python_errors.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_extern_python_errors(): ffi = FFI() ffi.cdef(""" extern "Python" int bar(int); """) > lib = verify(ffi, 'test_extern_python_errors', "") testing/cffi1/test_recompiler.py:1766: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_extern_python_errors.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_extern_python_errors.cpp:658:30: error: expected '}' at end of input 658 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_extern_python_errors.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_extern_python_errors' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_extern_python_errors.cpp -o ./_CFFI_test_extern_python_errors.o __________________________ test_extern_python_stdcall __________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_extern_python_stdcall.cpp', '-o', './_CFFI_test_extern_python_stdcall.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_extern_python_stdcall.o' src = '_CFFI_test_extern_python_stdcall.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_extern_python_stdcall.o' src = '_CFFI_test_extern_python_stdcall.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_extern_python_stdcall(): ffi = FFI() ffi.cdef(""" extern "Python" int __stdcall foo(int); extern "Python" int WINAPI bar(int); static int (__stdcall * mycb1)(int); static int indirect_call(int); """) > lib = verify(ffi, 'test_extern_python_stdcall', """ #ifndef _MSC_VER # define __stdcall #endif static int (__stdcall * mycb1)(int); static int indirect_call(int x) { return mycb1(x); } """) testing/cffi1/test_recompiler.py:1804: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_extern_python_stdcall.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_extern_python_stdcall.cpp:719:30: error: expected '}' at end of input 719 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_extern_python_stdcall.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_extern_python_stdcall' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_extern_python_stdcall.cpp -o ./_CFFI_test_extern_python_stdcall.o __________________________ test_extern_python_plus_c ___________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_extern_python_plus_c.cpp', '-o', './_CFFI_test_extern_python_plus_c.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_extern_python_plus_c.o' src = '_CFFI_test_extern_python_plus_c.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_extern_python_plus_c.o' src = '_CFFI_test_extern_python_plus_c.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_extern_python_plus_c(): ffi = FFI() ffi.cdef(""" extern "Python+C" int foo(int); extern "C +\tPython" int bar(int); int call_me(int); """) > lib = verify(ffi, 'test_extern_python_plus_c', """ int foo(int); #ifdef __GNUC__ __attribute__((visibility("hidden"))) #endif int bar(int); static int call_me(int x) { return foo(x) - bar(x); } """) testing/cffi1/test_recompiler.py:1833: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_extern_python_plus_c.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_extern_python_plus_c.cpp:712:30: error: expected '}' at end of input 712 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_extern_python_plus_c.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_extern_python_plus_c' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_extern_python_plus_c.cpp -o ./_CFFI_test_extern_python_plus_c.o ___________________________ test_introspect_function ___________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_introspect_function.cpp', '-o', './_CFFI_test_introspect_function.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_introspect_function.o' src = '_CFFI_test_introspect_function.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_introspect_function.o' src = '_CFFI_test_introspect_function.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_introspect_function(): ffi = FFI() ffi.cdef("float f1(double);") > lib = verify(ffi, 'test_introspect_function', """ float f1(double x) { return (float)x; } """) testing/cffi1/test_recompiler.py:1858: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_introspect_function.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_introspect_function.cpp:675:30: error: expected '}' at end of input 675 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_introspect_function.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_introspect_function' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_introspect_function.cpp -o ./_CFFI_test_introspect_function.o __________________________ test_introspect_global_var __________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_introspect_global_var.cpp', '-o', './_CFFI_test_introspect_global_var.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_introspect_global_var.o' src = '_CFFI_test_introspect_global_var.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_introspect_global_var.o' src = '_CFFI_test_introspect_global_var.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_introspect_global_var(): ffi = FFI() ffi.cdef("extern float g1;") > lib = verify(ffi, 'test_introspect_global_var', """ float g1; """) testing/cffi1/test_recompiler.py:1871: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_introspect_global_var.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_introspect_global_var.cpp:647:30: error: expected '}' at end of input 647 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_introspect_global_var.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_introspect_global_var' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_introspect_global_var.cpp -o ./_CFFI_test_introspect_global_var.o _______________________ test_introspect_global_var_array _______________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_introspect_global_var_array.cpp', '-o', './_CFFI_test_introspect_global_var_array.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_introspect_global_var_array.o' src = '_CFFI_test_introspect_global_var_array.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_introspect_global_var_array.o' src = '_CFFI_test_introspect_global_var_array.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_introspect_global_var_array(): ffi = FFI() ffi.cdef("extern float g1[100];") > lib = verify(ffi, 'test_introspect_global_var_array', """ float g1[100]; """) testing/cffi1/test_recompiler.py:1882: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_introspect_global_var_array.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_introspect_global_var_array.cpp:649:30: error: expected '}' at end of input 649 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_introspect_global_var_array.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_introspect_global_var_array' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_introspect_global_var_array.cpp -o ./_CFFI_test_introspect_global_var_array.o ________________________ test_introspect_integer_const _________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_introspect_integer_const.cpp', '-o', './_CFFI_test_introspect_integer_const.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_introspect_integer_const.o' src = '_CFFI_test_introspect_integer_const.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_introspect_integer_const.o' src = '_CFFI_test_introspect_integer_const.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_introspect_integer_const(): ffi = FFI() ffi.cdef("#define FOO 42") > lib = verify(ffi, 'test_introspect_integer_const', """ #define FOO 42 """) testing/cffi1/test_recompiler.py:1895: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_introspect_integer_const.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_introspect_integer_const.cpp:651:30: error: expected '}' at end of input 651 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_introspect_integer_const.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_introspect_integer_const' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_introspect_integer_const.cpp -o ./_CFFI_test_introspect_integer_const.o ___________________________ test_introspect_typedef ____________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_introspect_typedef.cpp', '-o', './_CFFI_test_introspect_typedef.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_introspect_typedef.o' src = '_CFFI_test_introspect_typedef.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_introspect_typedef.o' src = '_CFFI_test_introspect_typedef.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_introspect_typedef(): ffi = FFI() ffi.cdef("typedef int foo_t;") > lib = verify(ffi, 'test_introspect_typedef', """ typedef int foo_t; """) testing/cffi1/test_recompiler.py:1904: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_introspect_typedef.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_introspect_typedef.cpp:642:30: error: expected '}' at end of input 642 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_introspect_typedef.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_introspect_typedef' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_introspect_typedef.cpp -o ./_CFFI_test_introspect_typedef.o _______________________ test_introspect_typedef_multiple _______________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_introspect_typedef_multiple.cpp', '-o', './_CFFI_test_introspect_typedef_multiple.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_introspect_typedef_multiple.o' src = '_CFFI_test_introspect_typedef_multiple.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_introspect_typedef_multiple.o' src = '_CFFI_test_introspect_typedef_multiple.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_introspect_typedef_multiple(): ffi = FFI() ffi.cdef("typedef signed char a_t, c_t, g_t, b_t;") > lib = verify(ffi, 'test_introspect_typedef_multiple', """ typedef signed char a_t, c_t, g_t, b_t; """) testing/cffi1/test_recompiler.py:1914: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_introspect_typedef_multiple.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_introspect_typedef_multiple.cpp:645:30: error: expected '}' at end of input 645 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_introspect_typedef_multiple.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_introspect_typedef_multiple' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_introspect_typedef_multiple.cpp -o ./_CFFI_test_introspect_typedef_multiple.o ____________________________ test_introspect_struct ____________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_introspect_struct.cpp', '-o', './_CFFI_test_introspect_struct.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_introspect_struct.o' src = '_CFFI_test_introspect_struct.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_introspect_struct.o' src = '_CFFI_test_introspect_struct.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_introspect_struct(): ffi = FFI() ffi.cdef("struct foo_s { int a; };") > lib = verify(ffi, 'test_introspect_struct', """ struct foo_s { int a; }; """) testing/cffi1/test_recompiler.py:1922: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_introspect_struct.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_introspect_struct.cpp:659:30: error: expected '}' at end of input 659 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_introspect_struct.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_introspect_struct' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_introspect_struct.cpp -o ./_CFFI_test_introspect_struct.o ____________________________ test_introspect_union _____________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_introspect_union.cpp', '-o', './_CFFI_test_introspect_union.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_introspect_union.o', src = '_CFFI_test_introspect_union.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_introspect_union.o', src = '_CFFI_test_introspect_union.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_introspect_union(): ffi = FFI() ffi.cdef("union foo_s { int a; };") > lib = verify(ffi, 'test_introspect_union', """ union foo_s { int a; }; """) testing/cffi1/test_recompiler.py:1932: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_introspect_union.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_introspect_union.cpp:659:30: error: expected '}' at end of input 659 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_introspect_union.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_introspect_union' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_introspect_union.cpp -o ./_CFFI_test_introspect_union.o ______________________ test_introspect_struct_and_typedef ______________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_introspect_struct_and_typedef.cpp', '-o', './_CFFI_test_introspect_struct_and_typedef.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_introspect_struct_and_typedef.o' src = '_CFFI_test_introspect_struct_and_typedef.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_introspect_struct_and_typedef.o' src = '_CFFI_test_introspect_struct_and_typedef.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_introspect_struct_and_typedef(): ffi = FFI() ffi.cdef("typedef struct { int a; } foo_t;") > lib = verify(ffi, 'test_introspect_struct_and_typedef', """ typedef struct { int a; } foo_t; """) testing/cffi1/test_recompiler.py:1942: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_introspect_struct_and_typedef.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_introspect_struct_and_typedef.cpp:663:30: error: expected '}' at end of input 663 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_introspect_struct_and_typedef.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_introspect_struct_and_typedef' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_introspect_struct_and_typedef.cpp -o ./_CFFI_test_introspect_struct_and_typedef.o ________________________ test_introspect_included_type _________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_introspect_included_type_parent.cpp', '-o', './_CFFI_test_introspect_included_type_parent.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_introspect_included_type_parent.o' src = '_CFFI_test_introspect_included_type_parent.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_introspect_included_type_parent.o' src = '_CFFI_test_introspect_included_type_parent.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_introspect_included_type(): SOURCE = """ typedef signed char schar_t; struct sint_t { int x; }; """ ffi1 = FFI() ffi1.cdef(SOURCE) ffi2 = FFI() ffi2.include(ffi1) > verify(ffi1, "test_introspect_included_type_parent", SOURCE) testing/cffi1/test_recompiler.py:1958: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_introspect_included_type_parent.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_introspect_included_type_parent.cpp:665:30: error: expected '}' at end of input 665 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_introspect_included_type_parent.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_introspect_included_type_parent' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_introspect_included_type_parent.cpp -o ./_CFFI_test_introspect_included_type_parent.o ____________________________ test_introspect_order _____________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_introspect_order.cpp', '-o', './_CFFI_test_introspect_order.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_introspect_order.o', src = '_CFFI_test_introspect_order.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_introspect_order.o', src = '_CFFI_test_introspect_order.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_introspect_order(): ffi = FFI() ffi.cdef("union CFFIaaa { int a; }; typedef struct CFFIccc { int a; } CFFIb;") ffi.cdef("union CFFIg { int a; }; typedef struct CFFIcc { int a; } CFFIbbb;") ffi.cdef("union CFFIaa { int a; }; typedef struct CFFIa { int a; } CFFIbb;") > verify(ffi, "test_introspect_order", """ union CFFIaaa { int a; }; typedef struct CFFIccc { int a; } CFFIb; union CFFIg { int a; }; typedef struct CFFIcc { int a; } CFFIbbb; union CFFIaa { int a; }; typedef struct CFFIa { int a; } CFFIbb; """) testing/cffi1/test_recompiler.py:1968: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_introspect_order.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_introspect_order.cpp:742:30: error: expected '}' at end of input 742 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_introspect_order.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_introspect_order' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_introspect_order.cpp -o ./_CFFI_test_introspect_order.o _______________________________ test_bool_in_cpp _______________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_bool_in_cpp.cpp', '-o', './_CFFI_test_bool_in_cpp.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_bool_in_cpp.o', src = '_CFFI_test_bool_in_cpp.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_bool_in_cpp.o', src = '_CFFI_test_bool_in_cpp.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_bool_in_cpp(): # this works when compiled as C, but in cffi < 1.7 it fails as C++ ffi = FFI() ffi.cdef("bool f(void);") > lib = verify(ffi, "test_bool_in_cpp", "char f(void) { return 2; }") testing/cffi1/test_recompiler.py:1981: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_bool_in_cpp.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_bool_in_cpp.cpp:668:30: error: expected '}' at end of input 668 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_bool_in_cpp.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_bool_in_cpp' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_bool_in_cpp.cpp -o ./_CFFI_test_bool_in_cpp.o ______________________________ test_bool_in_cpp_2 ______________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_bool_bug_cpp.cpp', '-o', './_CFFI_test_bool_bug_cpp.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_bool_bug_cpp.o', src = '_CFFI_test_bool_bug_cpp.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_bool_bug_cpp.o', src = '_CFFI_test_bool_bug_cpp.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_bool_in_cpp_2(): ffi = FFI() ffi.cdef('int add(int a, int b);') > lib = verify(ffi, "test_bool_bug_cpp", ''' typedef bool _Bool; /* there is a Windows header with this line */ int add(int a, int b) { return a + b; }''', source_extension='.cpp') testing/cffi1/test_recompiler.py:1987: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_bool_bug_cpp.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_bool_bug_cpp.cpp:688:30: error: expected '}' at end of input 688 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_bool_bug_cpp.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_bool_bug_cpp' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_bool_bug_cpp.cpp -o ./_CFFI_test_bool_bug_cpp.o _________________________ test_function_returns_union __________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_function_returns_union.cpp', '-o', './_CFFI_test_function_returns_union.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_function_returns_union.o' src = '_CFFI_test_function_returns_union.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_function_returns_union.o' src = '_CFFI_test_function_returns_union.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_function_returns_union(): ffi = FFI() ffi.cdef("union u1 { int a, b; }; union u1 f1(int);") > lib = verify(ffi, "test_function_returns_union", """ union u1 { int a, b; }; static union u1 f1(int x) { union u1 u; u.b = x; return u; } """) testing/cffi1/test_recompiler.py:2031: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_function_returns_union.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_function_returns_union.cpp:703:30: error: expected '}' at end of input 703 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_function_returns_union.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_function_returns_union' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_function_returns_union.cpp -o ./_CFFI_test_function_returns_union.o _____________________ test_function_returns_partial_struct _____________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_function_returns_partial_struct.cpp', '-o', './_CFFI_test_function_returns_partial_struct.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_function_returns_partial_struct.o' src = '_CFFI_test_function_returns_partial_struct.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_function_returns_partial_struct.o' src = '_CFFI_test_function_returns_partial_struct.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_function_returns_partial_struct(): ffi = FFI() ffi.cdef("struct aaa { int a; ...; }; struct aaa f1(int);") > lib = verify(ffi, "test_function_returns_partial_struct", """ struct aaa { int b, a, c; }; static struct aaa f1(int x) { struct aaa s = {0}; s.a = x; return s; } """) testing/cffi1/test_recompiler.py:2040: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_function_returns_partial_struct.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_function_returns_partial_struct.cpp:699:30: error: expected '}' at end of input 699 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_function_returns_partial_struct.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_function_returns_partial_struct' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_function_returns_partial_struct.cpp -o ./_CFFI_test_function_returns_partial_struct.o _________________________ test_typedef_array_dotdotdot _________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_typedef_array_dotdotdot.cpp', '-o', './_CFFI_test_typedef_array_dotdotdot.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_typedef_array_dotdotdot.o' src = '_CFFI_test_typedef_array_dotdotdot.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_typedef_array_dotdotdot.o' src = '_CFFI_test_typedef_array_dotdotdot.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_typedef_array_dotdotdot(): ffi = FFI() ffi.cdef(""" typedef int foo_t[...], bar_t[...]; extern int gv[...]; typedef int mat_t[...][...]; typedef int vmat_t[][...]; """) > lib = verify(ffi, "test_typedef_array_dotdotdot", """ typedef int foo_t[50], bar_t[50]; int gv[23]; typedef int mat_t[6][7]; typedef int vmat_t[][8]; """) testing/cffi1/test_recompiler.py:2143: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_typedef_array_dotdotdot.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_typedef_array_dotdotdot.cpp:670:30: error: expected '}' at end of input 670 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_typedef_array_dotdotdot.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_typedef_array_dotdotdot' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_typedef_array_dotdotdot.cpp -o ./_CFFI_test_typedef_array_dotdotdot.o ______________________ test_typedef_array_dotdotdot_usage ______________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_typedef_array_dotdotdot_usage.cpp', '-o', './_CFFI_test_typedef_array_dotdotdot_usage.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_typedef_array_dotdotdot_usage.o' src = '_CFFI_test_typedef_array_dotdotdot_usage.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_typedef_array_dotdotdot_usage.o' src = '_CFFI_test_typedef_array_dotdotdot_usage.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_typedef_array_dotdotdot_usage(): ffi = FFI() ffi.cdef(""" typedef int foo_t[...]; typedef int mat_t[...][...]; struct s { foo_t a; foo_t *b; foo_t **c; }; int myfunc(foo_t a, foo_t *b, foo_t **c); struct sm { mat_t a; mat_t *b; mat_t **c; }; int myfuncm(mat_t a, mat_t *b, mat_t **c); """) > lib = verify(ffi, "test_typedef_array_dotdotdot_usage", """ typedef int foo_t[50]; typedef int mat_t[6][7]; struct s { foo_t a; foo_t *b; foo_t **c; }; static int myfunc(foo_t a, foo_t *b, foo_t **c) { return (**c)[49]; } struct sm { mat_t a; mat_t *b; mat_t **c; }; static int myfuncm(mat_t a, mat_t *b, mat_t **c) { return (**c)[5][6]; } """) testing/cffi1/test_recompiler.py:2171: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_typedef_array_dotdotdot_usage.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_typedef_array_dotdotdot_usage.cpp:849:30: error: expected '}' at end of input 849 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_typedef_array_dotdotdot_usage.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_typedef_array_dotdotdot_usage' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_typedef_array_dotdotdot_usage.cpp -o ./_CFFI_test_typedef_array_dotdotdot_usage.o _______________________ test_call_with_custom_field_pos ________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_call_with_custom_field_pos.cpp', '-o', './_CFFI_test_call_with_custom_field_pos.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_call_with_custom_field_pos.o' src = '_CFFI_test_call_with_custom_field_pos.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_call_with_custom_field_pos.o' src = '_CFFI_test_call_with_custom_field_pos.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_call_with_custom_field_pos(): ffi = FFI() ffi.cdef(""" struct foo { int x; ...; }; struct foo f(void); struct foo g(int, ...); """) > lib = verify(ffi, "test_call_with_custom_field_pos", """ struct foo { int y, x; }; struct foo f(void) { struct foo s = { 40, 200 }; return s; } struct foo g(int a, ...) { return f(); } """) testing/cffi1/test_recompiler.py:2202: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_call_with_custom_field_pos.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_call_with_custom_field_pos.cpp:708:30: error: expected '}' at end of input 708 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_call_with_custom_field_pos.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_call_with_custom_field_pos' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_call_with_custom_field_pos.cpp -o ./_CFFI_test_call_with_custom_field_pos.o ____________________ test_call_with_nested_anonymous_struct ____________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_call_with_nested_anonymous_struct.cpp', '-o', './_CFFI_test_call_with_nested_anonymous_struct.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_call_with_nested_anonymous_struct.o' src = '_CFFI_test_call_with_nested_anonymous_struct.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_call_with_nested_anonymous_struct.o' src = '_CFFI_test_call_with_nested_anonymous_struct.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_call_with_nested_anonymous_struct(): if sys.platform == 'win32': pytest.skip("needs a GCC extension") ffi = FFI() ffi.cdef(""" struct foo { int a; union { int b, c; }; }; struct foo f(void); struct foo g(int, ...); """) > lib = verify(ffi, "test_call_with_nested_anonymous_struct", """ struct foo { int a; union { int b, c; }; }; struct foo f(void) { struct foo s; s.a = 40; s.b = 200; return s; } struct foo g(int a, ...) { return f(); } """) testing/cffi1/test_recompiler.py:2230: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_call_with_nested_anonymous_struct.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_call_with_nested_anonymous_struct.cpp:718:30: error: expected '}' at end of input 718 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_call_with_nested_anonymous_struct.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_call_with_nested_anonymous_struct' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_call_with_nested_anonymous_struct.cpp -o ./_CFFI_test_call_with_nested_anonymous_struct.o ___________________________ test_call_with_bitfield ____________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_call_with_bitfield.cpp', '-o', './_CFFI_test_call_with_bitfield.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_call_with_bitfield.o' src = '_CFFI_test_call_with_bitfield.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_call_with_bitfield.o' src = '_CFFI_test_call_with_bitfield.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_call_with_bitfield(): ffi = FFI() ffi.cdef(""" struct foo { int x:5; }; struct foo f(void); struct foo g(int, ...); """) > lib = verify(ffi, "test_call_with_bitfield", """ struct foo { int x:5; }; struct foo f(void) { struct foo s = { 11 }; return s; } struct foo g(int a, ...) { return f(); } """) testing/cffi1/test_recompiler.py:2258: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_call_with_bitfield.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_call_with_bitfield.cpp:708:30: error: expected '}' at end of input 708 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_call_with_bitfield.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_call_with_bitfield' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_call_with_bitfield.cpp -o ./_CFFI_test_call_with_bitfield.o _______________________ test_call_with_zero_length_field _______________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_call_with_zero_length_field.cpp', '-o', './_CFFI_test_call_with_zero_length_field.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_call_with_zero_length_field.o' src = '_CFFI_test_call_with_zero_length_field.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_call_with_zero_length_field.o' src = '_CFFI_test_call_with_zero_length_field.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_call_with_zero_length_field(): if sys.platform == 'win32': pytest.skip("zero-length field not supported by MSVC") ffi = FFI() ffi.cdef(""" struct foo { int a; int x[0]; }; struct foo f(void); struct foo g(int, ...); """) > lib = verify(ffi, "test_call_with_zero_length_field", """ struct foo { int a; int x[0]; }; struct foo f(void) { struct foo s = { 42 }; return s; } struct foo g(int a, ...) { return f(); } """) testing/cffi1/test_recompiler.py:2284: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_call_with_zero_length_field.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_call_with_zero_length_field.cpp:714:30: error: expected '}' at end of input 714 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_call_with_zero_length_field.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_call_with_zero_length_field' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_call_with_zero_length_field.cpp -o ./_CFFI_test_call_with_zero_length_field.o _____________________________ test_call_with_union _____________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_call_with_union.cpp', '-o', './_CFFI_test_call_with_union.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_call_with_union.o', src = '_CFFI_test_call_with_union.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_call_with_union.o', src = '_CFFI_test_call_with_union.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_call_with_union(): ffi = FFI() ffi.cdef(""" union foo { int a; char b; }; union foo f(void); union foo g(int, ...); """) > lib = verify(ffi, "test_call_with_union", """ union foo { int a; char b; }; union foo f(void) { union foo s = { 42 }; return s; } union foo g(int a, ...) { return f(); } """) testing/cffi1/test_recompiler.py:2308: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_call_with_union.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_call_with_union.cpp:713:30: error: expected '}' at end of input 713 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_call_with_union.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_call_with_union' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_call_with_union.cpp -o ./_CFFI_test_call_with_union.o _________________________ test_call_with_packed_struct _________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_call_with_packed_struct.cpp', '-o', './_CFFI_test_call_with_packed_struct.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_call_with_packed_struct.o' src = '_CFFI_test_call_with_packed_struct.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_call_with_packed_struct.o' src = '_CFFI_test_call_with_packed_struct.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_call_with_packed_struct(): if sys.platform == 'win32': pytest.skip("needs a GCC extension") ffi = FFI() ffi.cdef(""" struct foo { char y; int x; }; struct foo f(void); struct foo g(int, ...); """, packed=True) > lib = verify(ffi, "test_call_with_packed_struct", """ struct foo { char y; int x; } __attribute__((packed)); struct foo f(void) { struct foo s = { 40, 200 }; return s; } struct foo g(int a, ...) { struct foo s = { 41, 201 }; return s; } """) testing/cffi1/test_recompiler.py:2333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_call_with_packed_struct.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_call_with_packed_struct.cpp:716:30: error: expected '}' at end of input 716 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_call_with_packed_struct.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_call_with_packed_struct' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_call_with_packed_struct.cpp -o ./_CFFI_test_call_with_packed_struct.o __________________________ test_gcc_visibility_hidden __________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_gcc_visibility_hidden.cpp', '-o', './_CFFI_test_gcc_visibility_hidden.o', '-fvisibility=hidden']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_gcc_visibility_hidden.o' src = '_CFFI_test_gcc_visibility_hidden.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = ['-fvisibility=hidden'] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_gcc_visibility_hidden.o' src = '_CFFI_test_gcc_visibility_hidden.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = ['-fvisibility=hidden'] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_gcc_visibility_hidden(): if sys.platform == 'win32': pytest.skip("test for gcc/clang") ffi = FFI() ffi.cdef(""" int f(int); """) > lib = verify(ffi, "test_gcc_visibility_hidden", """ int f(int a) { return a + 40; } """, extra_compile_args=['-fvisibility=hidden']) testing/cffi1/test_recompiler.py:2367: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_gcc_visibility_hidden.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_gcc_visibility_hidden.cpp:674:30: error: expected '}' at end of input 674 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_gcc_visibility_hidden.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_gcc_visibility_hidden' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_gcc_visibility_hidden.cpp -o ./_CFFI_test_gcc_visibility_hidden.o -fvisibility=hidden _______________________ test_override_default_definition _______________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_override_default_definition.cpp', '-o', './_CFFI_test_override_default_definition.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_override_default_definition.o' src = '_CFFI_test_override_default_definition.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_override_default_definition.o' src = '_CFFI_test_override_default_definition.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_override_default_definition(): ffi = FFI() ffi.cdef("typedef long int16_t, char16_t;") > lib = verify(ffi, "test_override_default_definition", "") testing/cffi1/test_recompiler.py:2375: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_override_default_definition.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_override_default_definition.cpp:641:30: error: expected '}' at end of input 641 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_override_default_definition.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_override_default_definition' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_override_default_definition.cpp -o ./_CFFI_test_override_default_definition.o ___________________________ test_char16_char32_type ____________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_char16_char32_type.cpp', '-o', './_CFFI_test_char16_char32_type.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_char16_char32_type.o' src = '_CFFI_test_char16_char32_type.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_char16_char32_type.o' src = '_CFFI_test_char16_char32_type.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: no_cpp = False def test_char16_char32_type(no_cpp=False): if no_cpp is False and sys.platform == "win32": pytest.skip("aaaaaaa why do modern MSVC compilers still define " "a very old __cplusplus value") ffi = FFI() ffi.cdef(""" char16_t foo_2bytes(char16_t); char32_t foo_4bytes(char32_t); """) > lib = verify(ffi, "test_char16_char32_type" + no_cpp * "_nocpp", """ #if !defined(__cplusplus) || (!defined(_LIBCPP_VERSION) && __cplusplus < 201103L) typedef uint_least16_t char16_t; typedef uint_least32_t char32_t; #endif char16_t foo_2bytes(char16_t a) { return (char16_t)(a + 42); } char32_t foo_4bytes(char32_t a) { return (char32_t)(a + 42); } """, no_cpp=no_cpp) testing/cffi1/test_recompiler.py:2387: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_char16_char32_type.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_char16_char32_type.cpp:714:30: error: expected '}' at end of input 714 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_char16_char32_type.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_char16_char32_type' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_char16_char32_type.cpp -o ./_CFFI_test_char16_char32_type.o _______________________________ test_loader_spec _______________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_loader_spec.cpp', '-o', './_CFFI_test_loader_spec.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_loader_spec.o', src = '_CFFI_test_loader_spec.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_loader_spec.o', src = '_CFFI_test_loader_spec.cpp' ext = '.cpp', cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'] extra_postargs = [], pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_loader_spec(): ffi = FFI() > lib = verify(ffi, "test_loader_spec", "") testing/cffi1/test_recompiler.py:2408: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_loader_spec.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_loader_spec.cpp:636:30: error: expected '}' at end of input 636 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_loader_spec.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_loader_spec' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_loader_spec.cpp -o ./_CFFI_test_loader_spec.o __________________________ test_realize_struct_error ___________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_realize_struct_error.cpp', '-o', './_CFFI_test_realize_struct_error.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_realize_struct_error.o' src = '_CFFI_test_realize_struct_error.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_realize_struct_error.o' src = '_CFFI_test_realize_struct_error.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_realize_struct_error(): ffi = FFI() ffi.cdef("""typedef ... foo_t; struct foo_s { void (*x)(foo_t); };""") > lib = verify(ffi, "test_realize_struct_error", """ typedef int foo_t; struct foo_s { void (*x)(foo_t); }; """) testing/cffi1/test_recompiler.py:2419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_realize_struct_error.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_realize_struct_error.cpp:669:30: error: expected '}' at end of input 669 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_realize_struct_error.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_realize_struct_error' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_realize_struct_error.cpp -o ./_CFFI_test_realize_struct_error.o ___________________________ test_from_buffer_struct ____________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_from_buffer_struct_p.cpp', '-o', './_CFFI_test_from_buffer_struct_p.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_from_buffer_struct_p.o' src = '_CFFI_test_from_buffer_struct_p.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_from_buffer_struct_p.o' src = '_CFFI_test_from_buffer_struct_p.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_from_buffer_struct(): ffi = FFI() ffi.cdef("""struct foo_s { int a, b; };""") > lib = verify(ffi, "test_from_buffer_struct_p", """ struct foo_s { int a, b; }; """) testing/cffi1/test_recompiler.py:2427: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_from_buffer_struct_p.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_from_buffer_struct_p.cpp:663:30: error: expected '}' at end of input 663 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_from_buffer_struct_p.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_from_buffer_struct_p' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_from_buffer_struct_p.cpp -o ./_CFFI_test_from_buffer_struct_p.o ___________________________ test_unnamed_bitfield_1 ____________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_unnamed_bitfield_1.cpp', '-o', './_CFFI_test_unnamed_bitfield_1.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_unnamed_bitfield_1.o' src = '_CFFI_test_unnamed_bitfield_1.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_unnamed_bitfield_1.o' src = '_CFFI_test_unnamed_bitfield_1.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_unnamed_bitfield_1(): ffi = FFI() ffi.cdef("""struct A { char : 1; };""") > lib = verify(ffi, "test_unnamed_bitfield_1", """ struct A { char : 1; }; """) testing/cffi1/test_recompiler.py:2448: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_unnamed_bitfield_1.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_unnamed_bitfield_1.cpp:658:30: error: expected '}' at end of input 658 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_unnamed_bitfield_1.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_unnamed_bitfield_1' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_unnamed_bitfield_1.cpp -o ./_CFFI_test_unnamed_bitfield_1.o ___________________________ test_unnamed_bitfield_2 ____________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_unnamed_bitfield_2.cpp', '-o', './_CFFI_test_unnamed_bitfield_2.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_unnamed_bitfield_2.o' src = '_CFFI_test_unnamed_bitfield_2.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_unnamed_bitfield_2.o' src = '_CFFI_test_unnamed_bitfield_2.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_unnamed_bitfield_2(): ffi = FFI() ffi.cdef("""struct A { short c : 1; short : 1; short d : 1; short : 1; };""") > lib = verify(ffi, "test_unnamed_bitfield_2", """ struct A { short c : 1; short : 1; short d : 1; short : 1; }; """) testing/cffi1/test_recompiler.py:2461: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_unnamed_bitfield_2.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_unnamed_bitfield_2.cpp:671:30: error: expected '}' at end of input 671 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_unnamed_bitfield_2.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_unnamed_bitfield_2' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_unnamed_bitfield_2.cpp -o ./_CFFI_test_unnamed_bitfield_2.o ___________________________ test_unnamed_bitfield_3 ____________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_unnamed_bitfield_3.cpp', '-o', './_CFFI_test_unnamed_bitfield_3.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_unnamed_bitfield_3.o' src = '_CFFI_test_unnamed_bitfield_3.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_unnamed_bitfield_3.o' src = '_CFFI_test_unnamed_bitfield_3.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_unnamed_bitfield_3(): ffi = FFI() ffi.cdef("""struct A { struct { char : 1; char : 1; } b; };""") > lib = verify(ffi, "test_unnamed_bitfield_3", """ struct A { struct { char : 1; char : 1; } b; }; """) testing/cffi1/test_recompiler.py:2472: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_unnamed_bitfield_3.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_unnamed_bitfield_3.cpp:668:30: error: expected '}' at end of input 668 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_unnamed_bitfield_3.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_unnamed_bitfield_3' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_unnamed_bitfield_3.cpp -o ./_CFFI_test_unnamed_bitfield_3.o ___________________________ test_unnamed_bitfield_4 ____________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_unnamed_bitfield_4.cpp', '-o', './_CFFI_test_unnamed_bitfield_4.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_unnamed_bitfield_4.o' src = '_CFFI_test_unnamed_bitfield_4.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_unnamed_bitfield_4.o' src = '_CFFI_test_unnamed_bitfield_4.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_unnamed_bitfield_4(): ffi = FFI() ffi.cdef("""struct A { struct { unsigned c : 1; unsigned : 1; unsigned d : 1; unsigned : 1; } a; }; struct B { struct A a; };""") > lib = verify(ffi, "test_unnamed_bitfield_4", """ struct A { struct { unsigned c : 1; unsigned : 1; unsigned d : 1; unsigned : 1; } a; }; struct B { struct A a; }; """) testing/cffi1/test_recompiler.py:2487: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_unnamed_bitfield_4.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_unnamed_bitfield_4.cpp:692:30: error: expected '}' at end of input 692 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_unnamed_bitfield_4.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_unnamed_bitfield_4' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_unnamed_bitfield_4.cpp -o ./_CFFI_test_unnamed_bitfield_4.o ________________ test_struct_with_func_with_struct_pointer_arg _________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_struct_with_func_with_struct_pointer_arg.cpp', '-o', './_CFFI_test_struct_with_func_with_struct_pointer_arg.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_struct_with_func_with_struct_pointer_arg.o' src = '_CFFI_test_struct_with_func_with_struct_pointer_arg.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_struct_with_func_with_struct_pointer_arg.o' src = '_CFFI_test_struct_with_func_with_struct_pointer_arg.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_struct_with_func_with_struct_pointer_arg(): ffi = FFI() ffi.cdef("""struct BinaryTree { int (* CompareKey)(struct BinaryTree *tree); };""") > lib = verify(ffi, "test_struct_with_func_with_struct_pointer_arg", """ struct BinaryTree { int (* CompareKey)(struct BinaryTree *tree); }; """) testing/cffi1/test_recompiler.py:2503: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_struct_with_func_with_struct_pointer_arg.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_struct_with_func_with_struct_pointer_arg.cpp:665:30: error: expected '}' at end of input 665 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_struct_with_func_with_struct_pointer_arg.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_struct_with_func_with_struct_pointer_arg' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_struct_with_func_with_struct_pointer_arg.cpp -o ./_CFFI_test_struct_with_func_with_struct_pointer_arg.o ____________________ test_struct_with_func_with_struct_arg _____________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_struct_with_func_with_struct_arg.cpp', '-o', './_CFFI_test_struct_with_func_with_struct_arg.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_struct_with_func_with_struct_arg.o' src = '_CFFI_test_struct_with_func_with_struct_arg.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_struct_with_func_with_struct_arg.o' src = '_CFFI_test_struct_with_func_with_struct_arg.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_struct_with_func_with_struct_arg(): ffi = FFI() ffi.cdef("""struct BinaryTree { int (* CompareKey)(struct BinaryTree tree); };""") > lib = verify(ffi, "test_struct_with_func_with_struct_arg", """ struct BinaryTree { int (* CompareKey)(struct BinaryTree tree); }; """) testing/cffi1/test_recompiler.py:2515: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_struct_with_func_with_struct_arg.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_struct_with_func_with_struct_arg.cpp:664:30: error: expected '}' at end of input 664 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_struct_with_func_with_struct_arg.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_struct_with_func_with_struct_arg' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_struct_with_func_with_struct_arg.cpp -o ./_CFFI_test_struct_with_func_with_struct_arg.o ___________________________ test_passing_large_list ____________________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_passing_large_list.cpp', '-o', './_CFFI_test_passing_large_list.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_passing_large_list.o' src = '_CFFI_test_passing_large_list.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_passing_large_list.o' src = '_CFFI_test_passing_large_list.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_passing_large_list(): ffi = FFI() ffi.cdef("""void passing_large_list(long[]);""") > lib = verify(ffi, "test_passing_large_list", """ static void passing_large_list(long a[]) { } """) testing/cffi1/test_recompiler.py:2525: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_passing_large_list.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_passing_large_list.cpp:682:30: error: expected '}' at end of input 682 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_passing_large_list.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_passing_large_list' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_passing_large_list.cpp -o ./_CFFI_test_passing_large_list.o _______________ test_convert_api_mode_builtin_function_to_cdata ________________ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: > subprocess.check_call(cmd, env=_inject_macos_ver(env)) /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...],) kwargs = {'env': None}, retcode = 1 cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-Wdate-time', '-D_FORTIFY_SOURCE=2', '-fPIC', '-UNDEBUG', '-I/usr/include/python3.12', '-c', '_CFFI_test_convert_api_mode_builtin_function_to_cdata.cpp', '-o', './_CFFI_test_convert_api_mode_builtin_function_to_cdata.o']' returned non-zero exit status 1. /usr/lib/python3.12/subprocess.py:413: CalledProcessError The above exception was the direct cause of the following exception: self = obj = './_CFFI_test_convert_api_mode_builtin_function_to_cdata.o' src = '_CFFI_test_convert_api_mode_builtin_function_to_cdata.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': > self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:1045: in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/i686-linux-gnu-g++', '-g', '-O2', '-ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=.', '-fstack-protector-strong', '-Wformat', ...] search_path = True, verbose = False, dry_run = False, env = None def spawn(cmd, search_path=True, verbose=False, dry_run=False, env=None): """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. """ log.info(subprocess.list2cmdline(cmd)) if dry_run: return if search_path: executable = shutil.which(cmd[0]) if executable is not None: cmd[0] = executable try: subprocess.check_call(cmd, env=_inject_macos_ver(env)) except OSError as exc: raise DistutilsExecError( f"command {_debug(cmd)!r} failed: {exc.args[-1]}" ) from exc except subprocess.CalledProcessError as err: > raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err E distutils.errors.DistutilsExecError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py:76: DistutilsExecError During handling of the above exception, another exception occurred: tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) > dist.run_command('build_ext') src/cffi/ffiplatform.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/setuptools/dist.py:991: in run_command super().run_command(command) /usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:973: in run_command cmd_obj.run() /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:98: in run _build_ext.run(self) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:359: in run self.build_extensions() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:476: in build_extensions self._build_extensions_serial() /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:502: in _build_extensions_serial self.build_extension(ext) /usr/lib/python3/dist-packages/setuptools/command/build_ext.py:263: in build_extension _build_ext.build_extension(self, ext) /usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py:557: in build_extension objects = self.compiler.compile( /usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py:606: in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = obj = './_CFFI_test_convert_api_mode_builtin_function_to_cdata.o' src = '_CFFI_test_convert_api_mode_builtin_function_to_cdata.cpp', ext = '.cpp' cc_args = ['-UNDEBUG', '-I/usr/include/python3.12', '-c'], extra_postargs = [] pp_opts = ['-UNDEBUG', '-I/usr/include/python3.12'] def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) try: if self.detect_language(src) == 'c++': self.spawn( compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs ) else: self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: > raise CompileError(msg) E distutils.errors.CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 /usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py:202: CompileError During handling of the above exception, another exception occurred: def test_convert_api_mode_builtin_function_to_cdata(): ffi = FFI() ffi.cdef( """struct s { int x; }; struct s add1(struct s); struct s add2(struct s); int mycall(struct s(*)(struct s)); int mycall2(void *);""") > lib = verify(ffi, "test_convert_api_mode_builtin_function_to_cdata", """ struct s { int x; }; static struct s add1(struct s a) { struct s r; r.x = a.x + 1; return r; } static struct s add2(struct s a) { struct s r; r.x = a.x + 2; return r; } static int mycall(struct s(*cb)(struct s)) { struct s a; a.x = 100; return cb(a).x; } static int mycall2(void *cb) { struct s a; a.x = 200; return ((struct s(*)(struct s))cb)(a).x; } """) testing/cffi1/test_recompiler.py:2538: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/cffi1/test_recompiler.py:44: in verify return _verify(ffi, module_name, source, *args, **kwds) testing/support.py:81: in _verify outputfilename = recompile(ffi, module_name, preamble, *args, **kwds) src/cffi/recompiler.py:1581: in recompile outputfilename = ffiplatform.compile('.', ext, src/cffi/ffiplatform.py:20: in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmpdir = '.' ext = compiler_verbose = 1, debug = 0 def _build(tmpdir, ext, compiler_verbose=0, debug=None): # XXX compact but horrible :-( from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity dist = Distribution({'ext_modules': [ext]}) dist.parse_config_files() options = dist.get_option_dict('build_ext') if debug is None: debug = sys.flags.debug options['debug'] = ('ffiplatform', debug) options['force'] = ('ffiplatform', True) options['build_lib'] = ('ffiplatform', tmpdir) options['build_temp'] = ('ffiplatform', tmpdir) # try: old_level = set_threshold(0) or 0 try: set_verbosity(compiler_verbose) dist.run_command('build_ext') cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() finally: set_threshold(old_level) except (CompileError, LinkError) as e: > raise VerificationError('%s: %s' % (e.__class__.__name__, e)) E cffi.VerificationError: CompileError: command '/usr/bin/i686-linux-gnu-g++' failed with exit code 1 src/cffi/ffiplatform.py:54: VerificationError ----------------------------- Captured stdout call ----------------------------- generating /tmp/ffi-1/_CFFI_test_convert_api_mode_builtin_function_to_cdata.cpp setting the current directory to '/tmp/ffi-1' ----------------------------- Captured stderr call ----------------------------- _CFFI_test_convert_api_mode_builtin_function_to_cdata.cpp:821:30: error: expected '}' at end of input 821 | # pragma GCC visibility pop | ^ In file included from /usr/include/python3.12/Python.h:107, from _CFFI_test_convert_api_mode_builtin_function_to_cdata.cpp:57: /usr/include/python3.12/tracemalloc.h:4:12: note: to match this '{' 4 | extern "C" { | ^ ------------------------------ Captured log call ------------------------------- INFO root:dist.py:970 running build_ext INFO root:build_ext.py:530 building '_CFFI_test_convert_api_mode_builtin_function_to_cdata' extension INFO root:spawn.py:60 i686-linux-gnu-g++ -g -O2 -ffile-prefix-map=/build/reproducible-path/python-cffi-1.17.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -UNDEBUG -I/usr/include/python3.12 -c _CFFI_test_convert_api_mode_builtin_function_to_cdata.cpp -o ./_CFFI_test_convert_api_mode_builtin_function_to_cdata.o =============================== warnings summary =============================== src/c/test_c.py::test_callback_return_type /usr/lib/python3/dist-packages/_pytest/unraisableexception.py:85: PytestUnraisableExceptionWarning: Exception ignored from cffi callback .cb at 0xf6917168>, trying to convert the result back to C: None Traceback (most recent call last): File "/build/reproducible-path/python-cffi-1.17.1/src/c/test_c.py", line 1453, in test_callback_return_type assert f(max) == 42 ^^^^^^ OverflowError: int too big to convert warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) src/c/test_c.py::test_callback_returning_wchar_t /usr/lib/python3/dist-packages/_pytest/unraisableexception.py:85: PytestUnraisableExceptionWarning: Exception ignored from cffi callback .cb at 0xf6917208>: None Traceback (most recent call last): File "/build/reproducible-path/python-cffi-1.17.1/src/c/test_c.py", line 1748, in cb raise ValueError ValueError warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) src/c/test_c.py::test_cast_with_functionptr /build/reproducible-path/python-cffi-1.17.1/src/c/test_c.py:2166: UserWarning: implicit cast from 'char *' to a different pointer type: will be forbidden in the future (check that the types are as you expect; use an explicit ffi.cast() if they are correct) newp(BStructPtr, [cast(BCharP, 0)]) testing/cffi0/test_ffi_backend.py::TestFFI::test_callback_crash /usr/lib/python3/dist-packages/_pytest/unraisableexception.py:85: PytestUnraisableExceptionWarning: Exception ignored from cffi callback .cb at 0xf5ea4c58>: None Traceback (most recent call last): File "/build/reproducible-path/python-cffi-1.17.1/testing/cffi0/backend_tests.py", line 848, in cb raise Exception Exception warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) testing/cffi0/test_ffi_backend.py::TestFFI::test_callback_decorator /usr/lib/python3/dist-packages/_pytest/unraisableexception.py:85: PytestUnraisableExceptionWarning: Exception ignored from cffi callback .cb at 0xf5ea4d98>, trying to convert the result back to C: None Traceback (most recent call last): File "/build/reproducible-path/python-cffi-1.17.1/testing/cffi0/backend_tests.py", line 1390, in test_callback_decorator assert cb((1 << (sz*8-1)) - 1, -10) == 42 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ OverflowError: integer 2147483657 does not fit 'long' warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) testing/cffi0/test_parsing.py::test_missing_newline_bug /build/reproducible-path/python-cffi-1.17.1/src/c/../cffi/cparser.py:436: UserWarning: #pragma in cdef() are entirely ignored. They should be removed for now, otherwise your code might behave differently in a future version of CFFI if #pragma support gets added. Note that '#pragma pack' needs to be replaced with the 'packed' keyword argument to cdef(). warnings.warn( testing/cffi1/test_ffi_obj.py::test_ffi_callback /usr/lib/python3/dist-packages/_pytest/unraisableexception.py:85: PytestUnraisableExceptionWarning: Exception ignored from cffi callback . at 0xf50d5ed8>: None Traceback (most recent call last): File "/build/reproducible-path/python-cffi-1.17.1/testing/cffi1/test_ffi_obj.py", line 130, in assert ffi.callback("int(int)", lambda x: x + "", error=-66)(10) == -66 ~~^~~~ TypeError: unsupported operand type(s) for +: 'int' and 'str' warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) testing/cffi1/test_ffi_obj.py::test_ffi_callback_decorator /usr/lib/python3/dist-packages/_pytest/unraisableexception.py:85: PytestUnraisableExceptionWarning: Exception ignored from cffi callback . at 0xf50d5ed8>: None Traceback (most recent call last): File "/build/reproducible-path/python-cffi-1.17.1/testing/cffi1/test_ffi_obj.py", line 136, in assert deco(lambda x: x + "")(10) == -66 ~~^~~~ TypeError: unsupported operand type(s) for +: 'int' and 'str' warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) testing/cffi1/test_new_ffi_1.py::TestNewFFI1::test_callback_crash /usr/lib/python3/dist-packages/_pytest/unraisableexception.py:85: PytestUnraisableExceptionWarning: Exception ignored from cffi callback .cb at 0xf50d5ed8>: None Traceback (most recent call last): File "/build/reproducible-path/python-cffi-1.17.1/testing/cffi1/test_new_ffi_1.py", line 863, in cb raise Exception Exception warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) testing/cffi1/test_new_ffi_1.py::TestNewFFI1::test_callback_decorator /usr/lib/python3/dist-packages/_pytest/unraisableexception.py:85: PytestUnraisableExceptionWarning: Exception ignored from cffi callback .cb at 0xf5333258>, trying to convert the result back to C: None Traceback (most recent call last): File "/build/reproducible-path/python-cffi-1.17.1/testing/cffi1/test_new_ffi_1.py", line 1341, in test_callback_decorator assert cb((1 << (sz*8-1)) - 1, -10) == 42 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ OverflowError: integer 2147483657 does not fit 'long' warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info ============================ FAILED testing/cffi1/test_recompiler.py::test_math_sin - cffi.VerificationErr... FAILED testing/cffi1/test_recompiler.py::test_repr_lib - cffi.VerificationErr... FAILED testing/cffi1/test_recompiler.py::test_funcarg_ptr - cffi.Verification... FAILED testing/cffi1/test_recompiler.py::test_funcres_ptr - cffi.Verification... FAILED testing/cffi1/test_recompiler.py::test_global_var_array - cffi.Verific... FAILED testing/cffi1/test_recompiler.py::test_verify_typedef - cffi.Verificat... FAILED testing/cffi1/test_recompiler.py::test_verify_typedef_dotdotdot - cffi... FAILED testing/cffi1/test_recompiler.py::test_verify_typedef_star_dotdotdot FAILED testing/cffi1/test_recompiler.py::test_global_var_int - cffi.Verificat... FAILED testing/cffi1/test_recompiler.py::test_macro - cffi.VerificationError:... FAILED testing/cffi1/test_recompiler.py::test_macro_check_value - cffi.Verifi... FAILED testing/cffi1/test_recompiler.py::test_constant - cffi.VerificationErr... FAILED testing/cffi1/test_recompiler.py::test_check_value_of_static_const - c... FAILED testing/cffi1/test_recompiler.py::test_constant_nonint - cffi.Verifica... FAILED testing/cffi1/test_recompiler.py::test_constant_ptr - cffi.Verificatio... FAILED testing/cffi1/test_recompiler.py::test_dir - cffi.VerificationError: C... FAILED testing/cffi1/test_recompiler.py::test_verify_opaque_struct - cffi.Ver... FAILED testing/cffi1/test_recompiler.py::test_verify_opaque_union - cffi.Veri... FAILED testing/cffi1/test_recompiler.py::test_verify_struct - cffi.Verificati... FAILED testing/cffi1/test_recompiler.py::test_verify_exact_field_offset - cff... FAILED testing/cffi1/test_recompiler.py::test_type_caching - cffi.Verificatio... FAILED testing/cffi1/test_recompiler.py::test_verify_enum - cffi.Verification... FAILED testing/cffi1/test_recompiler.py::test_dotdotdot_length_of_array_field FAILED testing/cffi1/test_recompiler.py::test_dotdotdot_global_array - cffi.V... FAILED testing/cffi1/test_recompiler.py::test_open_array_in_struct - cffi.Ver... FAILED testing/cffi1/test_recompiler.py::test_math_sin_type - cffi.Verificati... FAILED testing/cffi1/test_recompiler.py::test_verify_anonymous_struct_with_typedef FAILED testing/cffi1/test_recompiler.py::test_verify_anonymous_struct_with_star_typedef FAILED testing/cffi1/test_recompiler.py::test_verify_anonymous_enum_with_typedef FAILED testing/cffi1/test_recompiler.py::test_unique_types - cffi.Verificatio... FAILED testing/cffi1/test_recompiler.py::test_unspecified_size_of_global_1 - ... FAILED testing/cffi1/test_recompiler.py::test_unspecified_size_of_global_2 - ... FAILED testing/cffi1/test_recompiler.py::test_unspecified_size_of_global_3 - ... FAILED testing/cffi1/test_recompiler.py::test_unspecified_size_of_global_4 - ... FAILED testing/cffi1/test_recompiler.py::test_include_1 - cffi.VerificationEr... FAILED testing/cffi1/test_recompiler.py::test_include_1b - cffi.VerificationE... FAILED testing/cffi1/test_recompiler.py::test_include_2 - cffi.VerificationEr... FAILED testing/cffi1/test_recompiler.py::test_include_3 - cffi.VerificationEr... FAILED testing/cffi1/test_recompiler.py::test_include_4 - cffi.VerificationEr... FAILED testing/cffi1/test_recompiler.py::test_include_5 - cffi.VerificationEr... FAILED testing/cffi1/test_recompiler.py::test_include_6 - cffi.VerificationEr... FAILED testing/cffi1/test_recompiler.py::test_include_7 - cffi.VerificationEr... FAILED testing/cffi1/test_recompiler.py::test_include_8 - cffi.VerificationEr... FAILED testing/cffi1/test_recompiler.py::test_incomplete_struct_as_arg - cffi... FAILED testing/cffi1/test_recompiler.py::test_incomplete_struct_as_result - c... FAILED testing/cffi1/test_recompiler.py::test_incomplete_struct_as_both - cff... FAILED testing/cffi1/test_recompiler.py::test_name_of_unnamed_struct - cffi.V... FAILED testing/cffi1/test_recompiler.py::test_address_of_global_var - cffi.Ve... FAILED testing/cffi1/test_recompiler.py::test_defines__CFFI_ - cffi.Verificat... FAILED testing/cffi1/test_recompiler.py::test_unpack_args - cffi.Verification... FAILED testing/cffi1/test_recompiler.py::test_address_of_function - cffi.Veri... FAILED testing/cffi1/test_recompiler.py::test_address_of_function_with_struct FAILED testing/cffi1/test_recompiler.py::test_issue198 - cffi.VerificationErr... FAILED testing/cffi1/test_recompiler.py::test_constant_is_not_a_compiler_constant FAILED testing/cffi1/test_recompiler.py::test_constant_of_unknown_size - cffi... FAILED testing/cffi1/test_recompiler.py::test_variable_of_unknown_size - cffi... FAILED testing/cffi1/test_recompiler.py::test_constant_of_value_unknown_to_the_compiler FAILED testing/cffi1/test_recompiler.py::test_dotdot_in_source_file_names - c... FAILED testing/cffi1/test_recompiler.py::test_call_with_incomplete_structs - ... FAILED testing/cffi1/test_recompiler.py::test_struct_array_guess_length_2 - c... FAILED testing/cffi1/test_recompiler.py::test_struct_array_guess_length_3 - c... FAILED testing/cffi1/test_recompiler.py::test_global_var_array_2 - cffi.Verif... FAILED testing/cffi1/test_recompiler.py::test_global_var_array_3 - cffi.Verif... FAILED testing/cffi1/test_recompiler.py::test_global_var_array_4 - cffi.Verif... FAILED testing/cffi1/test_recompiler.py::test_some_integer_type - cffi.Verifi... FAILED testing/cffi1/test_recompiler.py::test_some_float_type - cffi.Verifica... FAILED testing/cffi1/test_recompiler.py::test_some_float_invalid_2 - cffi.Ver... FAILED testing/cffi1/test_recompiler.py::test_some_float_invalid_3 - cffi.Ver... FAILED testing/cffi1/test_recompiler.py::test_issue200 - cffi.VerificationErr... FAILED testing/cffi1/test_recompiler.py::test_alignment_of_longlong - cffi.Ve... FAILED testing/cffi1/test_recompiler.py::test_import_from_lib - cffi.Verifica... FAILED testing/cffi1/test_recompiler.py::test_macro_var_callback - cffi.Verif... FAILED testing/cffi1/test_recompiler.py::test_const_fields - cffi.Verificatio... FAILED testing/cffi1/test_recompiler.py::test_restrict_fields - cffi.Verifica... FAILED testing/cffi1/test_recompiler.py::test_volatile_fields - cffi.Verifica... FAILED testing/cffi1/test_recompiler.py::test_const_array_fields - cffi.Verif... FAILED testing/cffi1/test_recompiler.py::test_const_array_fields_varlength - ... FAILED testing/cffi1/test_recompiler.py::test_const_array_fields_unknownlength FAILED testing/cffi1/test_recompiler.py::test_const_function_args - cffi.Veri... FAILED testing/cffi1/test_recompiler.py::test_const_function_type_args - cffi... FAILED testing/cffi1/test_recompiler.py::test_const_constant - cffi.Verificat... FAILED testing/cffi1/test_recompiler.py::test_const_via_typedef - cffi.Verifi... FAILED testing/cffi1/test_recompiler.py::test_win32_calling_convention_0 - cf... FAILED testing/cffi1/test_recompiler.py::test_win32_calling_convention_1 - cf... FAILED testing/cffi1/test_recompiler.py::test_win32_calling_convention_2 - cf... FAILED testing/cffi1/test_recompiler.py::test_win32_calling_convention_3 - cf... FAILED testing/cffi1/test_recompiler.py::test_extern_python_1 - cffi.Verifica... FAILED testing/cffi1/test_recompiler.py::test_extern_python_bogus_name - cffi... FAILED testing/cffi1/test_recompiler.py::test_extern_python_bogus_result_type FAILED testing/cffi1/test_recompiler.py::test_extern_python_redefine - cffi.V... FAILED testing/cffi1/test_recompiler.py::test_extern_python_struct - cffi.Ver... FAILED testing/cffi1/test_recompiler.py::test_extern_python_long_double - cff... FAILED testing/cffi1/test_recompiler.py::test_extern_python_signature - cffi.... FAILED testing/cffi1/test_recompiler.py::test_extern_python_errors - cffi.Ver... FAILED testing/cffi1/test_recompiler.py::test_extern_python_stdcall - cffi.Ve... FAILED testing/cffi1/test_recompiler.py::test_extern_python_plus_c - cffi.Ver... FAILED testing/cffi1/test_recompiler.py::test_introspect_function - cffi.Veri... FAILED testing/cffi1/test_recompiler.py::test_introspect_global_var - cffi.Ve... FAILED testing/cffi1/test_recompiler.py::test_introspect_global_var_array - c... FAILED testing/cffi1/test_recompiler.py::test_introspect_integer_const - cffi... FAILED testing/cffi1/test_recompiler.py::test_introspect_typedef - cffi.Verif... FAILED testing/cffi1/test_recompiler.py::test_introspect_typedef_multiple - c... FAILED testing/cffi1/test_recompiler.py::test_introspect_struct - cffi.Verifi... FAILED testing/cffi1/test_recompiler.py::test_introspect_union - cffi.Verific... FAILED testing/cffi1/test_recompiler.py::test_introspect_struct_and_typedef FAILED testing/cffi1/test_recompiler.py::test_introspect_included_type - cffi... FAILED testing/cffi1/test_recompiler.py::test_introspect_order - cffi.Verific... FAILED testing/cffi1/test_recompiler.py::test_bool_in_cpp - cffi.Verification... FAILED testing/cffi1/test_recompiler.py::test_bool_in_cpp_2 - cffi.Verificati... FAILED testing/cffi1/test_recompiler.py::test_function_returns_union - cffi.V... FAILED testing/cffi1/test_recompiler.py::test_function_returns_partial_struct FAILED testing/cffi1/test_recompiler.py::test_typedef_array_dotdotdot - cffi.... FAILED testing/cffi1/test_recompiler.py::test_typedef_array_dotdotdot_usage FAILED testing/cffi1/test_recompiler.py::test_call_with_custom_field_pos - cf... FAILED testing/cffi1/test_recompiler.py::test_call_with_nested_anonymous_struct FAILED testing/cffi1/test_recompiler.py::test_call_with_bitfield - cffi.Verif... FAILED testing/cffi1/test_recompiler.py::test_call_with_zero_length_field - c... FAILED testing/cffi1/test_recompiler.py::test_call_with_union - cffi.Verifica... FAILED testing/cffi1/test_recompiler.py::test_call_with_packed_struct - cffi.... FAILED testing/cffi1/test_recompiler.py::test_gcc_visibility_hidden - cffi.Ve... FAILED testing/cffi1/test_recompiler.py::test_override_default_definition - c... FAILED testing/cffi1/test_recompiler.py::test_char16_char32_type - cffi.Verif... FAILED testing/cffi1/test_recompiler.py::test_loader_spec - cffi.Verification... FAILED testing/cffi1/test_recompiler.py::test_realize_struct_error - cffi.Ver... FAILED testing/cffi1/test_recompiler.py::test_from_buffer_struct - cffi.Verif... FAILED testing/cffi1/test_recompiler.py::test_unnamed_bitfield_1 - cffi.Verif... FAILED testing/cffi1/test_recompiler.py::test_unnamed_bitfield_2 - cffi.Verif... FAILED testing/cffi1/test_recompiler.py::test_unnamed_bitfield_3 - cffi.Verif... FAILED testing/cffi1/test_recompiler.py::test_unnamed_bitfield_4 - cffi.Verif... FAILED testing/cffi1/test_recompiler.py::test_struct_with_func_with_struct_pointer_arg FAILED testing/cffi1/test_recompiler.py::test_struct_with_func_with_struct_arg FAILED testing/cffi1/test_recompiler.py::test_passing_large_list - cffi.Verif... FAILED testing/cffi1/test_recompiler.py::test_convert_api_mode_builtin_function_to_cdata = 133 failed, 1822 passed, 94 skipped, 4 xfailed, 10 warnings in 1405.48s (0:23:25) = E: pybuild pybuild:389: test: plugin custom failed with: exit code=1: python3.12 -m pytest src/c/ testing/ dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p "3.13 3.12" returned exit code 13 make[1]: *** [debian/rules:17: override_dh_auto_test] Error 25 make[1]: Leaving directory '/build/reproducible-path/python-cffi-1.17.1' make: *** [debian/rules:9: binary] Error 2 dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2 I: copying local configuration E: Failed autobuilding of package I: unmounting dev/ptmx filesystem I: unmounting dev/pts filesystem I: unmounting dev/shm filesystem I: unmounting proc filesystem I: unmounting sys filesystem I: cleaning the build env I: removing directory /srv/workspace/pbuilder/47369 and its subdirectories Fri Dec 13 12:16:58 UTC 2024 W: No second build log, what happened?