When cross-emerging dev-libs/openssl for *-w64-mingw32, libssl.dll.a and libcrypto.dll.a are not installed. On MinGW in general, libfoo.dll.a is needed when building an executable which dynamically links against foo library. A workaround would be to emerge with USE=static-libs, which I suspect is discouraged. Reproducible: Always Steps to Reproduce: 1. USE=-static-libs x86_64-w64-mingw32-emerge dev-libs/openssl Actual Results: $ test -e /usr/x86_64-w64-mingw32/usr/lib/libssl.dll.a -a -e /usr/x86_64-w64-mingw32/usr/lib/libcrypto.dll.a; echo $? 1 Expected Results: $ test -e /usr/x86_64-w64-mingw32/usr/lib/libssl.dll.a -a -e /usr/x86_64-w64-mingw32/usr/lib/libcrypto.dll.a; echo $? 0 x86_64-w64-mingw32-emerge --info: Portage 3.0.19 (python 3.9.5-final-0, embedded, gcc-11.1.0, unavailable, 5.4.72-gentoo x86_64) ================================================================= System uname: Linux-5.4.72-gentoo-x86_64-Intel-R-_Core-TM-2_CPU_U7500_@_1.06GHz-with-glibc2.33 KiB Mem: 1516756 total, 184240 free KiB Swap: 49351676 total, 49163036 free Timestamp of repository gentoo: Mon, 24 May 2021 15:05:31 +0000 sh bash 5.1_p8 ld GNU ld (Gentoo 2.36.1 p3) 2.36.1 Repositories: gentoo location: /var/db/repos/gentoo sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 sync-rsync-verify-max-age: 24 sync-rsync-extra-opts: sync-rsync-verify-jobs: 1 sync-rsync-verify-metamanifest: yes ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="@FREE" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -fomit-frame-pointer" CHOST="x86_64-w64-mingw32" CONFIG_PROTECT="/etc /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/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 -fomit-frame-pointer" DISTDIR="/var/cache/distfiles" FCFLAGS="-Os -pipe" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news nodoc noinfo noman parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-Os -pipe" GENTOO_MIRRORS="http://distfiles.gentoo.org" LDFLAGS="" LINGUAS="en" PKGDIR="/usr/x86_64-w64-mingw32/packages/" PORTAGE_CONFIGROOT="/usr/x86_64-w64-mingw32/" 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="/usr/x86_64-w64-mingw32/tmp/" USE="amd64 kdrive minimal multicall zlib" ELIBC="mingw" INPUT_DEVICES="evdev" KERNEL="Winnt" USERLAND="GNU" VIDEO_CARDS="fbdev" Unset: CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, ENV_UNSET, INSTALL_MASK, LANG, LC_ALL, MAKEOPTS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RUSTFLAGS
I guess the `rm *.a` used in a lot of ebuilds where the build system doesn't behave isn't the best solution.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0ee60b97e7f653fc0cb54ac03809c07ba6c092aa commit 0ee60b97e7f653fc0cb54ac03809c07ba6c092aa Author: Mike Gilbert <floppym@gentoo.org> AuthorDate: 2021-06-07 19:31:13 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2021-06-07 19:31:13 +0000 dev-libs/openssl: be more careful when removing static libs Avoids removing .dll.a files necessary for linking on mingw. Closes: https://bugs.gentoo.org/792318 Signed-off-by: Mike Gilbert <floppym@gentoo.org> dev-libs/openssl/openssl-1.0.2u.ebuild | 16 +++++++++------- dev-libs/openssl/openssl-1.1.1k.ebuild | 16 +++++++++------- 2 files changed, 18 insertions(+), 14 deletions(-)