meson: In dependencies requires gobject-introspection but meson dont can find it
Im getting this error line: gobject-introspection dependency was not found, gir cannot be generated. But i have gobject-introspection in my pkg-config list.
pkg-config --libs gobject-introspection-1.0
-L/usr/local/Cellar/gobject-introspection/1.52.1_1/lib -L/usr/local/Cellar/glib/2.52.3/lib -L/usr/local/opt/gettext/lib -lgirepository-1.0 -lgobject-2.0 -lglib-2.0 -lintl -Wl,-framework -Wl,CoreFoundation
Target OS build - Mac OS Sierra
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 25 (10 by maintainers)
@ljmf00 I have tried to run the same command it complains about (see the exit code
-> 1
)So i tried
brew reinstall libffi
which reminded me of
so then i tried to
export PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig"
This fixed the issue, at least on my mac
this is the same error with my situation in os: ubuntu 16.04.5
gobject-introspection dependency was not found, gir cannot be generated.
and when i check meson-logs/meson-log.txt. it shows:
Determining dependency 'gobject-introspection-1.0' with pkg-config executable '/usr/bin/pkg-config' Meson encountered an error in file atk/meson.build, line 143, column 8: gobject-introspection dependency was not found, gir cannot be generated
i try to install libgirepository1.0-dev:
sudo apt-get install libgirepository1.0-dev
it works.
@niedzielski Debian Sid needed
libgirepository1.0-dev
.Program(s) [‘g-ir-scanner’] not found in Ubuntu 18.04 i try to install libgirepository1.0-dev: sudo apt-get install libgirepository1.0-dev
it works.
Instead better sudo apt-get install gobject-introspection
@ljmf00 in my case pkg-config
--libs
was able to find gobject-introspection-1.0 just fine but--cflags
failed with that error, which is the same as not finding it Infact i got the very same error you have with meson. It could be a different case but i think its worth doublecheckingI am using high sierra 10.13.6
@tcitworld thanks, that fixes the build on Ubuntu 17.10 too.