[Mesa-dev] Meson mesademos (Was: [RFC libdrm 0/2] Replace the build system with meson)

Nirbheek Chauhan nirbheek.chauhan at gmail.com
Thu Sep 21 08:56:04 UTC 2017


On Thu, Sep 21, 2017 at 1:53 PM, Jose Fonseca <jfonseca at vmware.com> wrote:
> On 12/04/17 18:57, Nirbheek Chauhan wrote:
>>
>> Hi Jose,
>>
>> On Wed, Apr 12, 2017 at 11:08 PM, Jose Fonseca <jfonseca at vmware.com>
>> wrote:
>>>
>>> One newbie question: what's your workflow to update a wrap patch?  Can we
>>> prototype changes locally without tarballing the patch?
>>>
>>
>> Any changes you make in subproject directories will be kept as-is;
>> Meson only initializes them and will not try to update them (yet), so
>> you can apply your patches to the subproject directory manually for
>> testing.
>>
>> In the future, we want to improve this workflow, of course.
>>
>
> Hi Dylan,
>
> FYI I didn't forget about this.  But I have to say that having to maintain
> and fix these wrap modules seperately from git is simply a huge turn off
> everytime I think about resuming this.
>
> I think it's was a mistake to try to make meson wrap modules for 3rd party
> dependencies.  Especially when these wrap modules involve glue that's not
> tracked in git, so it can't be esasily revved, or shared across the people
> working on this.   If we simply had a way to consumed built binaries like we
> can easily do with cmake, I'm confident it would have been trivial to get
> this going by now.
>
> But as it stands I don't think overcome this wall.  Honestly, I don't want
> have to deal with porting glew/freeglut to meson just to get mesademos with
> meson, and I really shouldn't have to.  I don't want to build the world just
> mesademos.
>

That is not a requirement in general, only a requirement if you want
to use glew/freeglut as a subproject (which requires meson build
files). Meson will be able to find libraries stored anywhere on the
system as long as you either:

a) Set the correct env variables for the compiler library and include
paths[1], or
b) Set the `dirs:` keyword argument to cc.find_library() and set the
right include paths, or
c) Set PKG_CONFIG_PATH if your libraries ship pkg-config files

This is very similar to cmake, fwict. However, if this doesn't work
for you, we'd love to talk about how we can improve things. For
instance, there were these proposals:
https://github.com/mesonbuild/meson/issues/1525 and
https://github.com/mesonbuild/meson/issues/1524, but we didn't get any
feedback on whether they would actually be useful in real-world usage.

Meson is (IMO) unusual in the build systems world in that it's not a
static unchangeable upstream (ala cmake/autotools/scons), but is a
FOSS project that you can interact with, so please talk to us. :)

The main advantage of adding a wrap patch for a project is to speed up
(and make it easy to have) integration builds that build the entire
stack, but the most common usage of Meson is to build against
pre-existing binaries. We could probably make the experience better on
Windows, but we need feedback to do that!

Cheers,
Nirbheek

1. `LIB`/`INCLUDE` with MSVC and `LIBRARY_PATH`/`C_INCLUDE_PATH` for gcc/clang


More information about the mesa-dev mailing list