In the shell environment PKG_CONFIG_PATH equals to /mingw64/lib/pkgconfig:/mingw64/share/pkgconfig. When pkg-config called from other apllication it becomes to E:\msys64\mingw64\lib\pkgconfig;E:\msys64\mingw64\share\pkgconfig.
With second way pkg-config see /usr/lib/pkgconfig/autoopts.pc but don't see /mingw64/lib/pkgconfig/cairo.pc
This causes errors like https://github.com/alexcrichton/pkg-config-rs/issues/12
Do you have MSYS2 installed to E:\msys64?
Yes, I've.
Can you give me some very detailed reproduction steps please, starting from a fresh installation of MSYS2.
I installed msys2-base-x86_64-20150202.tar.xz into D:\msys64. I installed there pkg-config and cairo. Next I get:
Also I can see that fresh installation doesn't convert path:
Fresh installation:
Previous installation:
Those are two different GCCs, MSYS2 GCC (like Cygwin GCC) and MinGW-w64 GCC. Unless I am mistaken, you are running the wrong shell, using msys2_shell.bat instead of mingw64_shell.bat in one instance.
Your are not using the same GCC twice.
The first time, you are using a MSYS2 GCC, as you can see in the target. This one will convert paths and is meant only to compile MSYS2 programs.
The second time, you are using a MINGW GCC, as you can see in the target. This one will not covert paths and is meant to compile native windows program not depending on the msys2 subsystem.
To use the msys2 GCC compiler suite, start the msys2_shell.bat otherwise, use mingw64_shell.bat. The two version of the bat scripts shares a lot of things, but main difference is that they tweak some environment variables for you so the toolchain used by default matches the name of the shell started.
This misunderstanding between the two versions could be why you see less libraries. The introduction page on the wiki aims at helping understanding how everything is packaged: https://sourceforge.net/p/msys2/wiki/MSYS2%20introduction/.
Regards,
Matt
I use mingw64_shell.bat in both cases. I removed gcc and installed mingw-w64-x86_64-gcc, now it shows:
It was fixed by installing mingw-w64-x86_64-pkg-config instead pkg-config, thanks.
Can you please update your original bug report on rust's github with this?