Bug#1028105: pkg-config:amd64 does not include necessary default search path
On Fri, 6 Jan 2023 20:50:30 -0300 Allan wrote: When I try to check for a package using pkg-config it is not able to find the package even that it is properly installed. Workaround $ env PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/lib/x86_64-linux-gnu/pkgconfig/" pkg-config --modversion gthread-2.0 2.74.4 You didn’t use reportbug to file this bug report, so I cannot verify it from the list of dependencies, but it seems that you have pkgconf-bin:i386 installed on your system instead of pkgconf-bin:amd64. This is what causes pkgconf or pkg-config to default to the i386 flags. A better workaround would be to call pkg-config or pkgconf but annotating the command with the architecture name, in your case x86_64-linux-gnu-pkg-config or x86_64-linux-gnu-pkgconf. -- Cheers, Andrej
Bug#1028105:
I am also having this problem I just wanted to add that on my machine if I use: $ pkg-config --dump-personality Triplet: default DefaultSearchPaths: /usr/lib/pkgconfig /usr/share/pkgconfig SystemIncludePaths: /usr/include SystemLibraryPaths: /lib /lib/i386-linux-gnu /lib/x86_64-linux-gnu /lib/x86_64-linux-gnux32 /lib64 /libx32 /usr/lib /usr/lib/i386-linux-gnu /usr/lib/x86_64-linux-gnu /usr/lib/x86_64-linux-gnux32 /usr/lib64 /usr/libx32 As you can see, Triplet is "default" and there are only two dirs in DefaultSearchPath. There is a file installed on my machine at /usr/share/pkgconfig/personality.d/x86_64-linux-gnu.personality. The contents of this file are as follows: $cat /usr/share/pkgconfig/personality.d/x86_64-linux-gnu.personality Triplet: x86_64-linux-gnu DefaultSearchPaths: /usr/local/lib/x86_64-linux-gnu/pkgconfig:/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig SystemIncludePaths: /usr/include SystemLibraryPaths: /lib:/lib/i386-linux-gnu:/lib/x86_64-linux-gnu:/lib/x86_64-linux-gnux32:/lib32:/libx32:/usr/lib:/usr/lib/i386-linux-gnu:/usr/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnux32:/usr/lib32:/usr/libx32 Note that all the expected information is present. So it seems I have the correct file on my machine but pkg-config isn't "seeing" it for some reason. Pkg-config is version 1.8.1-1 and my architecture is amd64.
Bug#1028105: pkg-config:amd64 does not include necessary default search path
Package: pkg-config:amd64 Version: 1.8.0-12 When I try to check for a package using pkg-config it is not able to find the package even that it is properly installed. Current output $ pkg-config --modversion gthread-2.0 Package gthread-2.0 was not found in the pkg-config search path. Perhaps you should add the directory containing `gthread-2.0.pc' to the PKG_CONFIG_PATH environment variable Package 'gthread-2.0', required by 'virtual:world', not found Workaround $ env PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/lib/x86_64-linux-gnu/pkgconfig/" pkg-config --modversion gthread-2.0 2.74.4 Expected output $ pkg-config --modversion gthread-2.0 2.74.4 The problem is that pkg-config does not know anything about this directory since it is not present in its default search directories $ pkg-config --variable pc_path pkg-config /usr/local/lib/i386-linux-gnu/pkgconfig:/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:/usr/lib/i386-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig I am using Debian GNU/Linux 6.0.12-1 (2022-12-09), kernel 6.0.0-6-amd64 and libc6 2.36-7. Att, Allan Krama Guimarães