MINGW-packages icon indicating copy to clipboard operation
MINGW-packages copied to clipboard

[qt5-static] pkgconfig files contain bogus paths

Open davidgiven opened this issue 1 year ago • 0 comments

Description / Steps to reproduce the issue

...producing errors like:

C:/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/13.2.0/../../../../i686-w64-mingw32/bin/ld.exe: cannot find C:/M/B/src/MINGW32/qtbase/lib/libqtpcre2.a: No such file or directory

This is caused by bad data in the pkkconfig files. Install mingw-w64-i686-qt5-static or equivalent, and then do:

$ PKG_CONFIG_PATH=/mingw32/qt5-static/lib/pkgconfig pkg-config.exe Qt5Widgets --libs --static
-LC:/msys64/mingw32/qt5-static/lib -lQt5Widgets C:/M/B/src/MINGW32/qtbase/lib/libQt5Gui.a -ld3d11 -l
dxgi -ldxguid C:/M/B/src/MINGW32/qtbase/lib/libqtlibpng.a C:/M/B/src/MINGW32/qtbase/lib/libqtharfbuz
z.a -lcomdlg32 -loleaut32 -limm32 -lglu32 -lopengl32 -lgdi32 C:/M/B/src/MINGW32/qtbase/lib/libQt5Cor
e.a -lmpr -luserenv -lversion -lz C:/M/B/src/MINGW32/qtbase/lib/libqtpcre2.a -lzstd -lnetapi32 -lws2
_32 -ladvapi32 -lkernel32 -lole32 -lshell32 -luuid -luser32 -lwinmm -luxtheme -ldwmapi -lshell32 -lc
omdlg32 -loleaut32 -limm32 -lwinmm -lws2_32 -lole32 -luuid -ladvapi32 -lglu32 -lopengl32 -lgdi32 -lu
ser32 -lQt5Gui -ld3d11 -ldxgi -ldxguid C:/M/B/src/MINGW32/qtbase/lib/libQt5Core.a -lmpr -luserenv -l
version -lz C:/M/B/src/MINGW32/qtbase/lib/libqtpcre2.a -lzstd -lnetapi32 -lws2_32 -ladvapi32 -lkerne
l32 -lole32 -lshell32 -luuid -luser32 -lwinmm C:/M/B/src/MINGW32/qtbase/lib/libqtlibpng.a C:/M/B/src
/MINGW32/qtbase/lib/libqtharfbuzz.a -lz -lcomdlg32 -loleaut32 -limm32 -lwinmm -lws2_32 -lole32 -luui
d -ladvapi32 -lglu32 -lopengl32 -lgdi32 -luser32 -lQt5Core -lmpr -luserenv -lversion -lz C:/M/B/src/
MINGW32/qtbase/lib/libqtpcre2.a -lzstd -lnetapi32 -lws2_32 -ladvapi32 -lkernel32 -lole32 -lshell32 -
luuid -luser32 -lwinmm

Notice that some of the paths contain C:/M/B. Looking at /mingw32/qt5-static/lib/pkgconfig/Qt5Widgets.pc, I see this paths baked into the Libs.private variable:

Libs.private: C:/M/B/src/MINGW32/qtbase/lib/libQt5Gui.a -ld3d11 -ldxgi -ldxguid C:/M/B/src/MINGW32/qtbase/lib/libqtlibpng.a C:/M/B/src/MINGW32/qtbase/lib/libqtharfbuzz.a -lcomdlg32 -loleaut32 -limm32 -lglu32 -lopengl32 -lgdi32 C:/M/B/src/MINGW32/qtbase/lib/libQt5Core.a -lmpr -luserenv -lversion -lz C:/M/B/src/MINGW32/qtbase/lib/libqtpcre2.a -lzstd -lnetapi32 -lws2_32 -ladvapi32 -lkernel32 -lole32 -lshell32 -luuid -luser32 -lwinmm -luxtheme -ldwmapi -lshell32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lws2_32 -lole32 -luuid -ladvapi32 -lglu32 -lopengl32 -lgdi32 -luser32

Expected behavior

.

Actual behavior

.

Verification

  • [X] I have verified that my MSYS2 is up-to-date before submitting the report (see https://www.msys2.org/docs/updating/)

Windows Version

MINGW32_NT-10.0-19045

MINGW environments affected

  • [ ] MINGW64
  • [X] MINGW32
  • [ ] UCRT64
  • [ ] CLANG64
  • [ ] CLANG32
  • [ ] CLANGARM64

Are you willing to submit a PR?

No response

davidgiven avatar Jan 08 '24 18:01 davidgiven