aruiz/webp-pixbuf-loader

WARNING: pkgconfig variable 'gdk_pixbuf_query_loaders' not defined for dependency gdk-pixbuf-2.0.

Closed this issue · 4 comments

I'm unable to execute meson builddir. I'm running Ubuntu 18.04
I tried the recommendations here, but no success: BestImageViewer/geeqie#590

~/src/webp-pixbuf-loader-master$ meson build
The Meson build system
Version: 0.55.3
Source dir: /home/qohelet/src/webp-pixbuf-loader-master
Build dir: /home/qohelet/src/webp-pixbuf-loader-master/build
Build type: native build
Project name: webp-pixbuf-loader
Project version: undefined
C compiler for the host machine: cc (gcc 7.5.0 "cc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0")
C linker for the host machine: cc ld.bfd 2.30
Host machine cpu family: x86_64
Host machine cpu: x86_64
Found pkg-config: /usr/bin/pkg-config (0.29.1)
Run-time dependency gdk-pixbuf-2.0 found: YES 2.36.11
WARNING: pkgconfig variable 'gdk_pixbuf_query_loaders' not defined for dependency gdk-pixbuf-2.0.
Run-time dependency libwebp found: YES 0.6.1
Program   -32 -64 found: NO

meson.build:10:0: ERROR: Program '  -32 -64' not found
webp-pixbuf-loader-master$ meson setup build -Dgdk_pixbuf_query_loaders_path=/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders
The Meson build system
Version: 0.55.3
Source dir: /home/qohelet/src/webp-pixbuf-loader-master
Build dir: /home/qohelet/src/webp-pixbuf-loader-master/build
Build type: native build
Project name: webp-pixbuf-loader
Project version: undefined
C compiler for the host machine: cc (gcc 7.5.0 "cc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0")
C linker for the host machine: cc ld.bfd 2.30
Host machine cpu family: x86_64
Host machine cpu: x86_64
Found pkg-config: /usr/bin/pkg-config (0.29.1)
Run-time dependency gdk-pixbuf-2.0 found: YES 2.36.11
WARNING: pkgconfig variable 'gdk_pixbuf_query_loaders' not defined for dependency gdk-pixbuf-2.0.
Run-time dependency libwebp found: YES 0.6.1
Program /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders found: YES
Configuring webp-pixbuf.thumbnailer using configuration
Program /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders found: YES (/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders)
Configuring loaders.cache using configuration
Build targets in project: 3

Found ninja-1.8.2 at /usr/bin/ninja

But afterwards the same:

meson builddir
The Meson build system
Version: 0.55.3
Source dir: /home/qohelet/src/webp-pixbuf-loader-master
Build dir: /home/qohelet/src/webp-pixbuf-loader-master/builddir
Build type: native build
Project name: webp-pixbuf-loader
Project version: undefined
C compiler for the host machine: cc (gcc 7.5.0 "cc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0")
C linker for the host machine: cc ld.bfd 2.30
Host machine cpu family: x86_64
Host machine cpu: x86_64
Found pkg-config: /usr/bin/pkg-config (0.29.1)
Run-time dependency gdk-pixbuf-2.0 found: YES 2.36.11
WARNING: pkgconfig variable 'gdk_pixbuf_query_loaders' not defined for dependency gdk-pixbuf-2.0.
Run-time dependency libwebp found: YES 0.6.1
Program   -32 -64 found: NO

meson.build:10:0: ERROR: Program '  -32 -64' not found

wbob commented

you'll need to provide the path of the gdk-pixbuf-query-loaders to mesons build options with -Doption="xyz". See the second line for where it is located in a Debian/Ubuntu system. If you can't find it find /usr -name 'gdk-pixbuf-query-load*' would help:

apt install libgdk-pixbuf2.0-dev webp libwebp-dev
meson builddir -Dgdk_pixbuf_query_loaders_path="/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders"
ninja -C builddir/
sudo ninja -C builddir/ install

I believe the meson build script should be modified so that the path of gdk-pixbuf-query-loaders on Debian and Debian-based distributions will be searched, if the location is not explicitly specified. It is unreasonable to expect each person trying to build the loader to figure it out for themselves.

I'm not a meson expert so I don't know how this works, but with CMake you can add search paths for libraries you're looking for, in addition to the defaults. I'm guessing meson supports something like that as well.

aruiz commented

I believe the meson build script should be modified so that the path of gdk-pixbuf-query-loaders on Debian and Debian-based distributions will be searched, if the location is not explicitly specified. It is unreasonable to expect each person trying to build the loader to figure it out for themselves.

I'm not a meson expert so I don't know how this works, but with CMake you can add search paths for libraries you're looking for, in addition to the defaults. I'm guessing meson supports something like that as well.

The debian package for gdk-pixbuf has a bug, the query loaders binary is not in the path reported by its pkg-config.

root@foobar:~/webp-pixbuf-loader# pkg-config gdk-pixbuf-2.0 --variable=gdk_pixbuf_query_loaders 
/usr/bin/gdk-pixbuf-query-loaders
root@foobar:~/webp-pixbuf-loader# ls /usr/bin/gdk-pixbuf-query-loaders
ls: cannot access '/usr/bin/gdk-pixbuf-query-loaders': No such file or directory
root@foobar:~/webp-pixbuf-loader# ls /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders 
/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders

I looked into harcoding default paths but unfortunately they are arch dependant so that's just too much hassle for a single distro.

The right solution here is to file a bug against the Debian package and get this fixed.

@aruiz : I just sent the maintainers an email and field something using Debian's reportbug. Let's cross our fingers and hope it helps.