Build system change GTK's master branch

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Build system change GTK's master branch

Emmanuele Bassi
Hi all;

executive summary: the master branch of GTK+ now builds with Meson,
and the Autotools build system files have been dropped.

The documentation has been updated to reflect the new build system —
as well as, in some cases, the past 10 years of development.

The change means that GTK+ master now has a build-time dependency on:

  - Python 3.x
  - Meson - http://mesonbuild.com
  - Ninja (though Meson also supports Visual Studio out of the box)

Building GTK+ is now a matter of calling:

  $ meson $builddir $srcdir
  $ ninja -C $builddir
  $ sudo ninja -C $builddir install

(where $builddir is the build directory you want to use, and $srcdir
is the directory with the GTK+ sources)

The main change is that now GTK+ takes about ⅓ of the time to build
compared to the Autotools build, with likely bigger wins on older/less
powerful hardware; the Visual Studio support on Windows should be at
least a couple of orders of magnitude easier (shout out to Fan
Chun-wei for having spent so, so many hours ensuring that we could
even build on Windows with Visual Studio and MSVC); and maintaining
the build system should be equally easier for everyone on any platform
we currently support.

Of course no migration is going to be perfect at the first try, even
though we have been building GTK+ master using Meson on the GNOME
continuous integration pipeline for a while, now. Please, report any
issue you may find.

Additionally, the following dependencies of GTK+ have added a Meson
build side-by-side with Autotools:

  - GLib
  - Pango
  - GdkPixbuf
  - ATK
  - libepoxy

There are no plans for using Meson exclusively, or even side-by-side
with Autotools, on the 2.24 and 3.22 branches — at least for the
foreseeable future.

Ciao,
 Emmanuele.

--
https://www.bassi.io
[@] ebassi [@gmail.com]
_______________________________________________
gtk-devel-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-devel-list
Reply | Threaded
Open this post in threaded view
|

Re: Build system change GTK's master branch

Gtk+ - Dev - General mailing list
Hi,

Thanks to Emmanuele for giving me the credit here :)

Emmanuele Bassi 於 2017/8/15 上午 05:46 寫道:

> The change means that GTK+ master now has a build-time dependency on:
>
>    - Python 3.x
>    - Meson - http://mesonbuild.com
>    - Ninja (though Meson also supports Visual Studio out of the box)
>
> Building GTK+ is now a matter of calling:
>
>    $ meson $builddir $srcdir
>    $ ninja -C $builddir
>    $ sudo ninja -C $builddir install

I should also mention that there are a few bugs underway to make the
Meson build experience on Windows/Visual Studio better/working for the
stack, which includes:
GLib: 783270 and 784995
ATK: 785802
Pango: 783274
GDK-Pixbuf: 785767
GTK+-4.x/3.9x: 785210 (Meson), 773299 (sources)

Any comments in those bugs are really appreciated, and thanks to all who
have given pointers there, including Emmanuele, Bastien, Alejandro and
Ignacio (and to those who I may have missed, sorry!)

Note that with the patches applied the Meson/Visual Studio builds are at
least on par with the Visual Studio project builds, and GTK+-3.22.x
builds (and I am quite confident as a result, 2.24.x builds as well),
against the Meson/MSVC builds of the depedencies should be working
equally well with the Visual Studio project builds.  Do note that
though, for Ninja builds at least, --buildtype=debutoptimized will
roughly correspond to the 'Release' configs in the MSVC projects (since
we want the .pdb files), and the default buildtype (debug) will roughly
correspond to the 'Debug' build configs in the MSVC projects.  It is
highly recommended that Visual Studio project builds of items that uses
the Meson/MSVC builds of these aforementioned items be re-built.

Please also note that there is a PR on Meson to fix introspection builds
of GTK+ on Windows[1] due to the 8192-character-per-command limit on
Windows, and Visual Studio 2008 support is not quite there for projects
that still support it (i.e. for Python 2.7.x support, as that is built
with Visual Studio 2008 for Windows), as we need to embed SxS manifests
with 2008 builds.

With blessings, and cheers!

[1]: https://github.com/mesonbuild/meson/pull/2125
_______________________________________________
gtk-devel-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-devel-list
Reply | Threaded
Open this post in threaded view
|

Re: Build system change GTK's master branch

Emmanuele Bassi
On 15 August 2017 at 04:09, Chun-wei Fan (范君維) <[hidden email]> wrote:
> Hi,
>
> Thanks to Emmanuele for giving me the credit here :)

Absolutely well earned.

> Emmanuele Bassi 於 2017/8/15 上午 05:46 寫道:
>>
>> The change means that GTK+ master now has a build-time dependency on:
>>
>>    - Python 3.x
>>    - Meson - http://mesonbuild.com
>>    - Ninja (though Meson also supports Visual Studio out of the box)
>>
>> Building GTK+ is now a matter of calling:
>>
>>    $ meson $builddir $srcdir
>>    $ ninja -C $builddir
>>    $ sudo ninja -C $builddir install
>
>
> I should also mention that there are a few bugs underway to make the Meson
> build experience on Windows/Visual Studio better/working for the stack,
> which includes:
> GLib: 783270 and 784995
> ATK: 785802
> Pango: 783274
> GDK-Pixbuf: 785767
> GTK+-4.x/3.9x: 785210 (Meson), 773299 (sources)
>
> Any comments in those bugs are really appreciated, and thanks to all who
> have given pointers there, including Emmanuele, Bastien, Alejandro and
> Ignacio (and to those who I may have missed, sorry!)

I'll make sure to review those bugs, thanks.

> Please also note that there is a PR on Meson to fix introspection builds of
> GTK+ on Windows[1] due to the 8192-character-per-command limit on Windows,

We should modify the introspection scanner to allow taking a list of files.

If the Python setup/teardown cost weren't so high, I'd even look into
running g-ir-scanner on individual files, generate intermediate
introspection data, and then have a "link" phase to generate the XML;
that would also immensely help with incremental builds.

> and Visual Studio 2008 support is not quite there for projects that still
> support it (i.e. for Python 2.7.x support, as that is built with Visual
> Studio 2008 for Windows), as we need to embed SxS manifests with 2008
> builds.

Supporting Visual Studio pre-2015 is going to be hard; various modules
are trying to standardise on a C99 pipeline, and I'd rather move away
from nearly ten year old development environments if that involves
work on our side.

Ciao,
 Emmanuele.

--
https://www.bassi.io
[@] ebassi [@gmail.com]
_______________________________________________
gtk-devel-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-devel-list
Reply | Threaded
Open this post in threaded view
|

Re: Build system change GTK's master branch

Gtk+ - Dev - General mailing list
Hi Emmanuele,


Emmanuele Bassi 於 2017/8/19 上午 01:07 寫道:
> Absolutely well earned.

:)
>> I'll make sure to review those bugs, thanks.

Thanks very much, and I should also mention the same to Nirbheek and
Tim-Philip as well, sorry for missing them!
>> Please also note that there is a PR on Meson to fix introspection builds of
>> GTK+ on Windows[1] due to the 8192-character-per-command limit on Windows,
> We should modify the introspection scanner to allow taking a list of files.

There is actually a --filelist option that was done when I did the
initial Windows support (no distutils stuff for that, since that was
before it :))  The thing is that Meson needs to use it.
> Supporting Visual Studio pre-2015 is going to be hard; various modules
> are trying to standardise on a C99 pipeline, and I'd rather move away
> from nearly ten year old development environments if that involves
> work on our side.
Thanks, I agree, too-2008 was venerable and light by today's standards,
but I think it is time to move forward.

The "2008" part was also to let people using the stack to be aware of
the present status, so the following lines are also for people to note :)

I actually understood from Nirbheek in the GLib bug a few days back that
due to CI concerns that it's going to be out-of-scope to support Visual
Studio 2008, so I think it's also time to let it go.

For my side for the GTK+/Meson stack, what I think will be done for
Visual Studio is to follow the lines of development: whether they
officially bump (declare) to C99.  If so, I will try to ensure support
2013/2015+, if not, I will try to ensure 2010+ (this would be like for
GDK-Pixbuf and Pango, (and even perhaps GLib for this cycle, since I was
still able to build it with 2010 without code changes as recent as 1 or
2 days ago, as we are getting close to 2.54) for now at least as they
are in stable cycles right now).  For the non-C99 modules that still
have the 2008 projects, I will still try to support them, and they will
be the way to build those modules on 2008.  I am thinking about that the
Visual Studio 201x projects be dropped from those modules built with
Meson+Visual Studio that build and run well enough though, in the next
cycle or so.

With blessings, and cheers!


_______________________________________________
gtk-devel-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-devel-list