Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Comment 2Richard W.M. Jones
2021-10-07 10:18:09 UTC
https://gitlab.com/redhat/centos-stream/rpms/pkgconf/-/merge_requests/2
Do we have an easy way to test this? I was only able to check
that the patch cherry picks and doesn't break the build but
I don't see an easy test that the issue is fixed.
Also we're going to need QE ACK and presumably they'll want
to ask the same question.
Comment 3Ken Dreyer (Red Hat)
2022-09-09 18:26:48 UTC
I hit this bug when building bundled openssl+libcurl for the Ceph Windows client for RHEL 9. The patch at https://gitlab.com/redhat/centos-stream/rpms/pkgconf/-/merge_requests/2 fixes it for me.
To reproduce the bug, run pkg-config with a package that exists outside mingw's sys-root.
Steps to reproduce:
1. Choose any package that installs libraries, headers, and .pc files. I used openssl.
2. Build and install that package with a --prefix that points outside MinGW's sysroot (/usr/x86_64-w64-mingw32/sys-root/mingw). I used "--prefix /opt/ceph/build.deps/mingw/openssl".
3. Your /opt/ceph/build.deps/mingw/openssl/lib/pkgconfig/libcrypto.pc file should look like this:
prefix=/opt/ceph/build.deps/mingw/openssl
exec_prefix=${prefix}
libdir=${prefix}/lib
includedir=${prefix}/include
enginesdir=${libdir}/engines-1_1
Name: OpenSSL-libcrypto
Description: OpenSSL cryptography library
Version: 1.1.1c
Libs: -L${libdir} -lcrypto
Libs.private: -lws2_32 -lgdi32 -lcrypt32
Cflags: -I${includedir}
4. Now run "pkg-config --cflags" or "--libs" with this .pc file. For example:
PKG_CONFIG_LIBDIR="/opt/ceph/build.deps/mingw/openssl/lib/pkgconfig" /usr/bin/x86_64-w64-mingw32-pkg-config --cflags libcrypto
or
PKG_CONFIG_LIBDIR="/opt/ceph/build.deps/mingw/openssl/lib/pkgconfig" /usr/bin/x86_64-w64-mingw32-pkg-config --libs libcrypto
Actual results:
pkg-config prepends mingw's sys-root to the paths. These directories do not exist.
-I/usr/x86_64-w64-mingw32/sys-root/mingw/opt/ceph/build.deps/mingw/openssl/include
-L/usr/x86_64-w64-mingw32/sys-root/mingw/root/ceph/build.deps/mingw/openssl/lib
(... so my curl build will fail to find openssl for linking.)
Expected results:
pkg-config prints the correct paths:
-I/opt/ceph/build.deps/mingw/openssl/include
-L/root/ceph/build.deps/mingw/openssl/lib -lcrypto
(and curl successfully cross-compiles with mingw.)
Comment 4Richard W.M. Jones
2022-09-20 08:40:42 UTC
Hi, could you consider QE ACK of this bug? It's a simple backport
and has been tested for nearly a year in Fedora. From the QE point
of view it's probably sufficient to ensure that the patch is applied
and that's the only testing needed.
Comment 8Ken Dreyer (Red Hat)
2022-09-30 19:26:25 UTC
To resolve our specific issue in Ceph, we removed our Windows libcurl dependency in https://github.com/ceph/ceph/pull/48148 .
This bug still occurs for any users who are cross-compiling with pkgconfig, but Ceph no longer does that.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory (pkgconf bug fix and enhancement update), and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2023:2468