Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 792318 - dev-libs/openssl: lib*.dll.a missing when cross-compiled for x86_64-w64-mingw32
Summary: dev-libs/openssl: lib*.dll.a missing when cross-compiled for x86_64-w64-mingw32
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-26 20:44 UTC by Tee KOBAYASHI
Modified: 2021-06-07 19:33 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tee KOBAYASHI 2021-05-26 20:44:31 UTC
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
Comment 1 Ionen Wolkens gentoo-dev 2021-05-27 15:31:16 UTC
I guess the `rm *.a` used in a lot of ebuilds where the build system doesn't behave isn't the best solution.
Comment 2 Larry the Git Cow gentoo-dev 2021-06-07 19:33:02 UTC
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(-)