Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 797259 - [cygwin][prefix][patch] dev-lang/python-3.9.3 build failed
Summary: [cygwin][prefix][patch] dev-lang/python-3.9.3 build failed
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: Other Other
: Normal normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-21 03:53 UTC by Egor Y. Egorov
Modified: 2023-05-25 20:08 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,208.82 KB, text/plain)
2021-06-21 03:54 UTC, Egor Y. Egorov
Details
python-3.9_libffi.patch (python-3.9_libffi.patch,376 bytes, patch)
2021-06-21 04:03 UTC, Egor Y. Egorov
Details | Diff
build.log 2 (build.log,213.53 KB, application/octet-stream)
2021-06-21 04:04 UTC, Egor Y. Egorov
Details
python-3.9_pytype.patch (python-3.9_pytype.patch,857 bytes, patch)
2021-06-21 04:13 UTC, Egor Y. Egorov
Details | Diff
build.log 3 (build.log,585.92 KB, application/octet-stream)
2021-06-21 04:15 UTC, Egor Y. Egorov
Details
python-3.9-soabi.patch (python-3.9-soabi.patch,383 bytes, patch)
2021-06-21 04:16 UTC, Egor Y. Egorov
Details | Diff
python-3.9.3-do_not_remove_dll.patch (for ebuild) (python-3.9.3-do_not_remove_dll.a.patch,382 bytes, patch)
2021-06-21 04:31 UTC, Egor Y. Egorov
Details | Diff
03-python-3.9-eprefix.patch (03-python-3.9-eprefix.patch,2.63 KB, patch)
2021-07-05 11:30 UTC, Egor Y. Egorov
Details | Diff
python-3.9.3-eprefix.patch (for ebuild) (ebuild.patch,715 bytes, patch)
2021-07-05 11:32 UTC, Egor Y. Egorov
Details | Diff
04-python-3.9-cygwin-dll.a.patch (04-python-3.9-cygwin-dll.a.patch,585 bytes, patch)
2021-07-05 11:33 UTC, Egor Y. Egorov
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Egor Y. Egorov 2021-06-21 03:53:18 UTC
dev-lang/python-3.9.3 build failed on my cygwin system


Reproducible: Always

Steps to Reproduce:
emerge -av1 =python-3.9.3

Actual Results:  
build failed with:
/home/e_egorov/gentoo_new/var/tmp/portage/dev-lang/python-3.9.3/work/Python-3.9.3/Modules/_ctypes/_ctypes.c:107:10: fatal error: ffi.h: No such file or directory
 #include <ffi.h>



$ emerge --info
Portage 3.0.18-prefix (python 3.9.3-final-0, prefix/windows/cygwin/x64, gcc-8.3.0, cygwin-crypt-1.4, 3.2.0-340.x86_64 x86_64)
=================================================================
System uname: CYGWIN_NT-10.0-19043-3.2.0-340.x86_64-x86_64-64bit-WindowsPE
Timestamp of repository gentoo_prefix: Mon, 21 Jun 2021 00:57:16 +0000
Head commit of repository gentoo_prefix: a08c8635572f9b5dd90a4a83af02740687731e43
sh bash 5.1_p8
ld GNU ld (Gentoo 2.34 p4) 2.34.0
app-shells/bash:      5.1_p8::gentoo_prefix
dev-lang/perl:        5.34.0::gentoo_prefix
dev-lang/python:      3.9.3::local_prefix
sys-devel/autoconf:   2.69-r5::gentoo_prefix
sys-devel/automake:   1.16.3-r1::gentoo_prefix
sys-devel/binutils:   2.34-r1::gentoo_prefix
sys-devel/gcc:        8.3.0::gentoo_prefix
sys-devel/gcc-config: 1.9.1::gentoo_prefix
sys-devel/libtool:    2.4.6-r6::gentoo_prefix
sys-devel/make:       4.3::gentoo_prefix
Repositories:

gentoo_prefix
    location: /home/e_egorov/gentoo_new/var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.prefix.bitzolder.nl/gentoo-portage-prefix
    priority: -1000
    sync-rsync-verify-metamanifest: no
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-jobs: 1
    sync-rsync-extra-opts:

local_prefix
    location: /home/e_egorov/gentoo_new/var/db/repos/local
    masters: gentoo_prefix
    priority: 0

ACCEPT_KEYWORDS="~x64-cygwin"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-cygwin"
CFLAGS=" -O2 -pipe"
CHOST="x86_64-pc-cygwin"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS=" -O2 -pipe"
DISTDIR="/home/e_egorov/gentoo_new/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS=""
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance case-insensitive-fs config-protect-if-modified distlocks ebuild-locks fixlafiles force-prefix ipc-sandbox merge-sync multilib-strict network-sandbox news nostrip parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sfperms strict unknown-features-warn unmerge-logs unmerge-orphans unprivileged"
FFLAGS=""
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LC_ALL="ru_RU.UTF-8"
LDFLAGS=""
MAKEOPTS="-j5"
PKGDIR="/home/e_egorov/gentoo_new/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/home/e_egorov/gentoo_new/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/home/e_egorov/gentoo_new/var/tmp"
USE="libglvnd ncurses nls prefix prefix-guest readline ssl unicode x64-cygwin zlib" ADA_TARGET="gnat_2018" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="Cygwin" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="Winnt" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-3 php7-4" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_9" PYTHON_TARGETS="python3_9" RUBY_TARGETS="ruby26" USERLAND="GNU" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account" Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RUSTFLAGS
Comment 1 Egor Y. Egorov 2021-06-21 03:54:51 UTC
Created attachment 717267 [details]
build.log

This log without any my patches
Comment 2 Egor Y. Egorov 2021-06-21 04:03:31 UTC
Created attachment 717270 [details, diff]
python-3.9_libffi.patch

Fix finding of libffi
Comment 3 Egor Y. Egorov 2021-06-21 04:04:47 UTC
Created attachment 717273 [details]
build.log 2

build log with python-3.9_libffi.patch

In file included from ./Include/pytime.h:6,
                 from ./Include/Python.h:85,
                 from /home/e_egorov/gentoo_new/var/tmp/portage/dev-lang/python-3.9.3/work/Python-3.9.3/Modules/_xxsubinterpretersmodule.c:5:
/home/e_egorov/gentoo_new/var/tmp/portage/dev-lang/python-3.9.3/work/Python-3.9.3/Modules/_xxsubinterpretersmodule.c:1764:27: error: initializer element is not constant
     PyVarObject_HEAD_INIT(&PyType_Type, 0)
                           ^
Comment 4 Egor Y. Egorov 2021-06-21 04:13:55 UTC
Created attachment 717276 [details, diff]
python-3.9_pytype.patch
Comment 5 Egor Y. Egorov 2021-06-21 04:15:04 UTC
Created attachment 717279 [details]
build.log 3

Traceback (most recent call last):
  File "/home/e_egorov/gentoo_new/var/tmp/portage/dev-lang/python-3.9.3/work/Python-3.9.3/Lib/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/home/e_egorov/gentoo_new/var/tmp/portage/dev-lang/python-3.9.3/work/Python-3.9.3/Lib/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/e_egorov/gentoo_new/var/tmp/portage/dev-lang/python-3.9.3/work/Python-3.9.3/Lib/compileall.py", line 17, in <module>
    import struct
  File "/home/e_egorov/gentoo_new/var/tmp/portage/dev-lang/python-3.9.3/work/Python-3.9.3/Lib/struct.py", line 13, in <module>
    from _struct import *
ModuleNotFoundError: No module named '_struct'
Traceback (most recent call last):
  File "/home/e_egorov/gentoo_new/var/tmp/portage/dev-lang/python-3.9.3/work/Python-3.9.3/Lib/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/home/e_egorov/gentoo_new/var/tmp/portage/dev-lang/python-3.9.3/work/Python-3.9.3/Lib/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/e_egorov/gentoo_new/var/tmp/portage/dev-lang/python-3.9.3/work/Python-3.9.3/Lib/compileall.py", line 17, in <module>
    import struct
  File "/home/e_egorov/gentoo_new/var/tmp/portage/dev-lang/python-3.9.3/work/Python-3.9.3/Lib/struct.py", line 13, in <module>
    from _struct import *
ModuleNotFoundError: No module named '_struct'
Comment 6 Egor Y. Egorov 2021-06-21 04:16:01 UTC
Created attachment 717282 [details, diff]
python-3.9-soabi.patch
Comment 7 Egor Y. Egorov 2021-06-21 04:31:27 UTC
Created attachment 717285 [details, diff]
python-3.9.3-do_not_remove_dll.patch (for ebuild)

This patch allow preserve file libpython3.9.dll.a needed for linking other packages
Comment 8 Egor Y. Egorov 2021-06-21 04:45:37 UTC
See also #797262
Comment 9 Egor Y. Egorov 2021-06-21 04:54:04 UTC
With this patches python built fine on my system
Comment 10 Egor Y. Egorov 2021-07-05 11:30:36 UTC
Created attachment 722026 [details, diff]
03-python-3.9-eprefix.patch

Fix search libraries
Comment 11 Egor Y. Egorov 2021-07-05 11:32:35 UTC
Created attachment 722029 [details, diff]
python-3.9.3-eprefix.patch (for ebuild)
Comment 12 Egor Y. Egorov 2021-07-05 11:33:40 UTC
Created attachment 722032 [details, diff]
04-python-3.9-cygwin-dll.a.patch
Comment 14 Fabian Groffen gentoo-dev 2023-05-25 20:08:47 UTC
support for Cygwin was dropped