-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
Description
Description
Installing opusfile and running pkgconf --static --libs opusurl
provides incorrect ordering of libraries
cddeg@ccom-laptop UCRT64 /c/Users/cddeg
$ pkgconf.exe --version
1.8.0
cddeg@ccom-laptop UCRT64 /c/Users/cddeg
$ pkgconf --static --libs opusurl
-LC:/msys64/ucrt64/lib -lopusurl -lopusfile -LC:/msys64/ucrt64/lib -logg -lopus -lm -lssp -LC:/msys64/ucrt64/lib -lssl -LC:/msys64/ucrt64/lib -lws2_32 -lgdi32 -lcrypt32 -lcrypto -lws2_32 -lgdi32 -lcrypt32
cddeg@ccom-laptop UCRT64 /c/Users/cddeg
$ pacman -Su
:: Starting core system upgrade...
there is nothing to do
:: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...
Packages (1) mingw-w64-ucrt-x86_64-pkgconf-1.9.3-1
Total Installed Size: 0.49 MiB
Net Upgrade Size: 0.01 MiB
:: Proceed with installation? [Y/n] y
(1/1) checking keys in keyring [#######################################] 100%
(1/1) checking package integrity [#######################################] 100%
(1/1) loading package files [#######################################] 100%
(1/1) checking for file conflicts [#######################################] 100%
(1/1) checking available disk space [#######################################] 100%
:: Processing package changes...
(1/1) upgrading mingw-w64-ucrt-x86_64-pkgconf [#######################################] 100%
cddeg@ccom-laptop UCRT64 /c/Users/cddeg
$ pkgconf.exe --version
1.9.3
cddeg@ccom-laptop UCRT64 /c/Users/cddeg
$ pkgconf --static --libs opusurl
-LC:/msys64/ucrt64/lib -lssl -LC:/msys64/ucrt64/lib -lcrypto -lws2_32 -lgdi32 -lcrypt32 -lopusurl -lopusfile -LC:/msys64/ucrt64/lib -logg -lopus -lm -lssp
for reference, on a linux install
$ pkgconf --static --libs opusurl
-lopusurl -lopusfile -lm -logg -lopus -lm -lssl -ldl -pthread -lcrypto -ldl -pthread
haven't tested other environments
Verification
- I have verified that my MSYS2 is up-to-date before submitting the report (see https://www.msys2.org/docs/updating/)
Windows Version
Microsoft Windows [Version 10.0.22621.608]
MINGW environments affected
- MINGW64
- MINGW32
- UCRT64
- CLANG64
- CLANG32
- CLANGARM64
Expected behavior
probably something similar to linux output with opusfile first then its dependencies
Actual behavior
opusfile somehow comes near the middle
Repro steps
- install pkgconf and opusfile for the subsystem
- run
pkgconf --static --libs opusurl
and check the output - create file with:
#include <stdint.h>
#include <opus/opusfile.h>
int main() { return (intptr_t)opus_server_info_init; }
- run
gcc -static $(pkgconf --static --cflags opusurl) temp.c $(pkgconf --static --libs opusurl)
tested with both 1.8.0 and 1.9.3, and 1.8.0 works but not 1.9.3
Also, linux version is 1.8.0, so it seems they haven't updated it there (https://archlinux.org/packages/core/x86_64/pkgconf/)
Are you willing to submit a PR?
Yes
Biswa96