FAils to emerge Reproducible: Always Steps to Reproduce: 1. emerge =dev-python/cryptography 2. 3. Actual Results: see build log Expected Results: good emerge ``` dilbert ~ # emerge -pqv '=dev-python/cryptography-37.0.2::gentoo' [ebuild U ] dev-python/cryptography-37.0.2 [37.0.1] USE="-debug -test" PYTHON_TARGETS="python3_9 -pypy3 -python3_8 -python3_10" dilbert ~ # emerge --info '=dev-python/cryptography-37.0.2::gentoo' Portage 3.0.30 (python 3.9.12-final-0, default/linux/amd64/17.1/desktop, gcc-11.3.0, glibc-2.35-r4, 5.17.5-gentoo x86_64) ================================================================= System Settings ================================================================= System uname: Linux-5.17.5-gentoo-x86_64-Intel-R-_Core-TM-_i7-8750H_CPU_@_2.20GHz-with-glibc2.35 KiB Mem: 32722676 total, 7078332 free KiB Swap: 32767996 total, 32760828 free Timestamp of repository gentoo: Wed, 04 May 2022 16:45:01 +0000 Head commit of repository gentoo: 00a63ac169e853fda6e5e91782aad41720f0a766 Head commit of repository brother-overlay: 843fdeb30008cbbe6361ef47a127d3489a0e66a7 sh bash 5.1_p16 ld GNU ld (Gentoo 2.38 p4) 2.38 app-misc/pax-utils: 1.3.4::gentoo app-shells/bash: 5.1_p16::gentoo dev-lang/perl: 5.34.1-r3::gentoo dev-lang/python: 2.7.18_p15::gentoo, 3.9.12::gentoo, 3.10.4::gentoo dev-lang/rust: 1.60.0::gentoo dev-util/cmake: 3.23.1::gentoo dev-util/meson: 0.61.4-r2::gentoo sys-apps/baselayout: 2.8::gentoo sys-apps/openrc: 0.44.10::gentoo sys-apps/sandbox: 2.29::gentoo sys-devel/autoconf: 2.13-r1::gentoo, 2.71-r1::gentoo sys-devel/automake: 1.16.5::gentoo sys-devel/binutils: 2.37_p1-r2::gentoo, 2.38-r2::gentoo sys-devel/binutils-config: 5.4.1::gentoo sys-devel/clang: 12.0.1::gentoo, 13.0.1::gentoo, 14.0.3::gentoo sys-devel/gcc: 11.3.0::gentoo sys-devel/gcc-config: 2.5-r1::gentoo sys-devel/libtool: 2.4.7::gentoo sys-devel/lld: 14.0.3::gentoo sys-devel/llvm: 12.0.1::gentoo, 13.0.1::gentoo, 14.0.3::gentoo sys-devel/make: 4.3::gentoo sys-kernel/linux-headers: 5.17-r1::gentoo (virtual/os-headers) sys-libs/glibc: 2.35-r4::gentoo Repositories: gentoo location: /var/db/repos/gentoo sync-type: rsync sync-uri: rsync://rsync.us.gentoo.org/gentoo-portage priority: -1000 sync-rsync-verify-jobs: 1 sync-rsync-extra-opts: sync-rsync-verify-metamanifest: no sync-rsync-verify-max-age: 24 brother-overlay location: /var/lib/layman/brother-overlay sync-type: git sync-uri: https://github.com/stefan-langenmaier/brother-overlay.git masters: gentoo priority: 50 guru location: /var/lib/layman/guru sync-type: laymansync sync-uri: https://anongit.gentoo.org/git/repo/proj/guru.git masters: gentoo priority: 50 vifino-overlay location: /var/lib/layman/vifino-overlay sync-type: laymansync sync-uri: https://github.com/vifino/vifino-overlay.git masters: gentoo priority: 50 ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="*" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -march=native -fcommon" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /opt/brother/scanner/brscan4/brsanenetdevice4.cfg /usr/lib64/libreoffice/program/sofficerc /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-O2 -pipe -march=native -fcommon" DISTDIR="/var/cache/distfiles" EMERGE_DEFAULT_OPTS="--keep-going --with-bdeps=y --backtrack=15" 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="-O2 -pipe -march=native -fcommon" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live candy clean-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sfperms unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe -march=native -fcommon" GENTOO_MIRRORS="http://gentoo.osuosl.org/" LANG="en_US.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j2" PKGDIR="/var/cache/binpkgs" PORTAGE_CONFIGROOT="/" 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="/var/tmp" SHELL="/bin/bash" USE="X a52 aac acl acpi adns alsa alsa-plugin amd64 appindicator blake2 bluetooth bluray branding bs2b bzip2 cairo calf cdda cdr chromecast cli corefonts cpudetection cron crypt cups curl dav1d dbus dri dri3 drm dts dv dvb dvd dvdr elogind encode equalizer exif extra faac faad fdk ffmpeg ffmpegthumbnailer fingerprint flac fontconfig fontforge fortran gbm gdal gdbm gif gimp gles2 glib gpg gpm gstreamer gtk gtk3 gui harfbuzz hddtemp http2 iconv icu introspection ipp_autosetup ipv6 jpeg keybinder ladspa lastfm lcms libcanberra libglvnd libmpeg2 libmpv libnotify libtirpc lm_sensors lto lv2 lz4 lzo mad matroska md5sum mda-lv2 mng mp3 mp4 mpeg mtp multilib ncurses nfs nfsv41 nls nptl nvenc offensive ogg openal opengl openmp opus pam pango pcap pcre pdf pgo png policykit postproc ppds projectm pulseaudio pvr python qml qt5 readline realtime rtc rtmp rubberband screencast sctp sdl seccomp sftp sna snmp sox spandsp spell split-usr sqlite ssl startup-notification svg theora threads tiff tools truetype twolame udev udisks unicode update_drivedb upnp upower usb uxa v4l vaapi vdpau vdr vim vim-syntax vlc vmaf vorbis vpx wg-quick wxwidgets x264 x265 xa xattr xcb xinerama xml xrandr xv xvid zamaudio zeroconf zlib zstd" ABI_X86="64" ADA_TARGET="gnat_2020" 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" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" 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" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="roccat_savu libinput joystick" KERNEL="linux" L10N="en en-US" 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-4 php8-0" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_9" PYTHON_TARGETS="python3_9" RUBY_TARGETS="ruby26 ruby27 ruby31" SANE_BACKENDS="net" USERLAND="GNU" VIDEO_CARDS="intel i965 nvidia iris nouveau" 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: ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LEX, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS ```
Created attachment 776774 [details] biuld log build log
``` =============================DEBUG ASSISTANCE============================= Traceback (most recent call last): File "/usr/lib/python-exec/python3.9/gpep517", line 4, in <module> sys.exit(main()) File "/usr/lib/python3.9/site-packages/gpep517/__main__.py", line 156, in main return func(args) File "/usr/lib/python3.9/site-packages/gpep517/__main__.py", line 56, in build_wheel wheel_name = backend.build_wheel(args.wheel_dir, args.config_json) File "/usr/lib/python3.9/site-packages/setuptools/build_meta.py", line 244, in build_wheel return self._build_with_temp_dir(['bdist_wheel'], '.whl', File "/usr/lib/python3.9/site-packages/setuptools/build_meta.py", line 229, in _build_with_temp_dir self.run_setup() File "/usr/lib/python3.9/site-packages/setuptools/build_meta.py", line 174, in run_setup exec(compile(code, __file__, 'exec'), locals()) File "setup.py", line 39, in <module> setup( File "/usr/lib/python3.9/site-packages/setuptools/__init__.py", line 87, in setup return distutils.core.setup(**attrs) File "/usr/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 109, in setup _setup_distribution = dist = klass(attrs) File "/usr/lib/python3.9/site-packages/setuptools/dist.py", line 460, in __init__ for ep in metadata.entry_points(group='distutils.setup_keywords'): File "/usr/lib/python3.9/site-packages/importlib_metadata/__init__.py", line 1027, in entry_points return SelectableGroups.load(eps).select(**params) File "/usr/lib/python3.9/site-packages/importlib_metadata/__init__.py", line 477, in load ordered = sorted(eps, key=by_group) File "/usr/lib/python3.9/site-packages/importlib_metadata/__init__.py", line 1024, in <genexpr> eps = itertools.chain.from_iterable( File "/usr/lib/python3.9/site-packages/importlib_metadata/_itertools.py", line 16, in unique_everseen k = key(element) File "/usr/lib/python3.9/site-packages/importlib_metadata/__init__.py", line 959, in _normalized_name return self._name_from_stem(stem) or super()._normalized_name File "/usr/lib/python3.9/site-packages/importlib_metadata/__init__.py", line 628, in _normalized_name return Prepared.normalize(self.name) File "/usr/lib/python3.9/site-packages/importlib_metadata/__init__.py", line 623, in name return self.metadata['Name'] File "/usr/lib/python3.9/site-packages/importlib_metadata/__init__.py", line 612, in metadata or self.read_text('PKG-INFO') File "/usr/lib/python3.9/site-packages/importlib_metadata/__init__.py", line 945, in read_text return self._path.joinpath(filename).read_text(encoding='utf-8') File "/usr/lib/python3.9/site-packages/zipp.py", line 266, in read_text return strm.read() File "/usr/lib/python3.9/zipfile.py", line 910, in read buf += self._read1(self.MAX_N) File "/usr/lib/python3.9/zipfile.py", line 1014, in _read1 self._update_crc(data) File "/usr/lib/python3.9/zipfile.py", line 942, in _update_crc raise BadZipFile("Bad CRC-32 for file %r" % self.name) zipfile.BadZipFile: Bad CRC-32 for file 'EGG-INFO/PKG-INFO' * ERROR: dev-python/cryptography-37.0.2::gentoo failed (compile phase): ```
What's your gpep517 version?
Nevermind, that doesn't seem relevant. Do you have any stray files in your site-packages directory? This looks like you have some ZIP archive (.egg?) there that's broken.
I have the same problem: most dev-python/ packages fail with the same error. I masked out "dev-python/gpep517-4" and the problem went away.
(In reply to Byron Stanoszek from comment #5) > I have the same problem: most dev-python/ packages fail with the same error. > > I masked out "dev-python/gpep517-4" and the problem went away. Please answer the above question.
Nevermind, I know what's wrong. Through patching zipfile classes I'm also overriding compression for when zipfile is used to open existing archives. As a result, zipfile thinks that egg files found in sys.path are uncompressed and hits a CRC mismatch. I'm going to remove gpep517-4.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=30bc86bcb30d019ee99fa79e2c110f9210f50c2f commit 30bc86bcb30d019ee99fa79e2c110f9210f50c2f Author: Michał Górny <mgorny@gentoo.org> AuthorDate: 2022-05-06 18:07:21 +0000 Commit: Michał Górny <mgorny@gentoo.org> CommitDate: 2022-05-06 18:08:45 +0000 dev-python/gpep517: Remove broken v4 This version breaks opening existing zip files (e.g. eggs found in sys.path). Closes: https://bugs.gentoo.org/842627 Signed-off-by: Michał Górny <mgorny@gentoo.org> dev-python/gpep517/Manifest | 1 - dev-python/gpep517/gpep517-4.ebuild | 44 ------------------------------------- 2 files changed, 45 deletions(-)