Search code examples
windowsunixmingwgimppkg-config

"Package was not found in the pkg-config search path". But actually is there


I'm using MinSYS2 and I've installed this package: https://packages.msys2.org/package/mingw-w64-i686-gimp?repo=mingw32

pacman -S mingw32/mingw-w64-i686-gimp

Now if I run gimptool-2.0 --cflags --libs it returns:

Package gimpui-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gimpui-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gimpui-2.0' found
No output from 'pkg-config --cflags gimpui-2.0'

The weird thing is that the gimpui-2.0.pc is actually in the system, in folder \mingw32\lib\pkgconfig. This folder is correctly part of the PKG_CONFIG_PATH variable:

$ echo $PKG_CONFIG_PATH
/mingw32/lib/pkgconfig:/mingw32/share/pkgconfig

The contents of gimpui-2.0.pc:

prefix=/mingw32
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: GIMP UI
Description: GIMP User Interface Library
Version: 2.10.10
Requires: gimp-2.0 >= 2.10 gtk+-2.0 >= 2.24.32
Libs: -L${libdir} -lgimpui-2.0 -lgimpwidgets-2.0 -lgimpmodule-2.0
Cflags: -I${includedir}/gimp-2.0

How to solve?


Solution

  • I've solved by installing the toolchain: https://packages.msys2.org/group/mingw-w64-i686-toolchain