Sign up

pkg-config problems on Debian Sid

I am building GFontBrowser, a D program now replacing the C++ and Python experiments, that depends on GtkD on Debian Sid with LDC and GtkD provided by Debian packages. I am building using Meson.

Meson assumes that all pkg-config .pc files are using GCC format. Meson knows how to transform these for DMD and LDC. However the packaged GtkD .pc file assumes LDC format options. This means a Meson build fails.

ldc2  -of=gfontbrowser 'gfontbrowser@exe/source_about.d.o' 'gfontbrowser@exe/source_applicationWindow.d.o' 'gfontbrowser@exe/source_configuration.d.o' 'gfontbrowser@exe/source_fontCatalogue.d.o' 'gfontbrowser@exe/source_main.d.o' 'gfontbrowser@exe/source_presentation.d.o' -L=-L-L/usr/lib/x86_64-linux-gnu/ -L=-L-lgtkd-3 -L=-L-ldl -L=-lfontconfig -L=-lfreetype -L=-lpangoft2-1.0 -L=-lpango-1.0 -L=-lgobject-2.0 -L=-lglib-2.0 -L=-lfontconfig -L=-lfreetype  

leading a huge slew of error messages. I believe Meson is likely the future of build relating to GTK and GStreamer, and possibly more widely, so believe that GtkD should enforce outputing GCC options to the .pc file for distribution on Debian.

Re: pkg-config problems on Debian Sid

On 10/14/18 11:18 AM, Russel Winder wrote:

I am building GFontBrowser, a D program now replacing the C++ and Python experiments, that depends on GtkD on Debian Sid with LDC and GtkD provided by Debian packages. I am building using Meson.

Meson assumes that all pkg-config .pc files are using GCC format. Meson knows how to transform these for DMD and LDC. However the packaged GtkD .pc file assumes LDC format options. This means a Meson build fails.

ldc2  -of=gfontbrowser 'gfontbrowser@exe/source_about.d.o' 'gfontbrowser@exe/source_applicationWindow.d.o' 'gfontbrowser@exe/source_configuration.d.o' 'gfontbrowser@exe/source_fontCatalogue.d.o' 'gfontbrowser@exe/source_main.d.o' 'gfontbrowser@exe/source_presentation.d.o' -L=-L-L/usr/lib/x86_64-linux-gnu/ -L=-L-lgtkd-3 -L=-L-ldl -L=-lfontconfig -L=-lfreetype -L=-lpangoft2-1.0 -L=-lpango-1.0 -L=-lgobject-2.0 -L=-lglib-2.0 -L=-lfontconfig -L=-lfreetype

leading a huge slew of error messages. I believe Meson is likely the future of build relating to GTK and GStreamer, and possibly more widely, so believe that GtkD should enforce outputing GCC options to the .pc file for distribution on Debian.

The make file currently adds the prefixes to the pkg config files to
make it easier for tools that don't know about the prefixes used by dmd/ldc.

When i finally stop procrastinating, the plan is to split up GtkD and
start using meson and girtod to build the libraries, like what was
already done for GLib: https://github.com/gtkd-developers/GlibD

In that case with the pkg config file generated by meson it no longer
has the prefixes.

Re: pkg-config problems on Debian Sid

The make file currently adds the prefixes to the pkg config files to
make it easier for tools that don't know about the prefixes used by dmd/ldc.

When i finally stop procrastinating, the plan is to split up GtkD and
start using meson and girtod to build the libraries, like what was
already done for GLib: https://github.com/gtkd-developers/GlibD

Can I suggest that asap is a good time to switch from Make to Meson?

In that case with the pkg config file generated by meson it no longer
has the prefixes.

Indeed.

I am willing and able to put effort where mouth is, and give a hand with evolving the GtkD build to use Meson if you are happy to manage me as a resource.

Re: pkg-config problems on Debian Sid

Just to note that the GStreamer folk seem not to do gir runs for the Rust bindings on each build, they treat running gir to generate code from GIR files as a separate activity with the results stored in the Git repository. This might be because they separate the C side and Rust side bindings of course. However, it is more likely to be because of all the manual tinkering that goes on: the GIR → Rust translation is not totally automatable.