Re: [Tracker] Meson build instructions for Tracker



Hi!,

On Thu, Mar 30, 2017 at 11:54 PM, Sam Thursfield <ssssam gmail com> wrote:
Hello
I've been working on build instructions for Tracker using Meson.
They are now pretty much ready for use!

You can find them in the branch wip/sam/meson:
https://git.gnome.org/browse/tracker/commit/?h=wip/sam/meson

To use, you need to install Meson, which can either be done from Pip
(pip3 install --user meson), from a distro package (but beware that it
might be old), or you can run it right from Git
(git://github.com/mesonbuild/meson).

Then you do something like this:

    mkdir build
    cd build
    meson ..
    ninja-build

FWIW, the meson step fails here because I lack the gee library, which
we don't need anymore :), those bits can be removed from the root dir
and utils/tracker-resdump meson.build files.


You can run the test suite:

    ninja-build test

Hmm, amusingly "ninja test" fails on some tests in weird ways here. I
must investigate further, but won't make this hold the merge.


And `ninja-build install` to install of course.

Meson accepts standard arguments like --prefix, but to change the
Tracker-specific options you need to run mesonconf. Run it in the build
directory with no arguments to see all the available options, and pass
`-D option=value` to set something.

I've compared an install of this with an equivalent Autotools build. So
I'm confident there aren't major regressions, but it does require more
testing. Help with that is appreciated!

As long as autotools config is preserved so far, I think this can be
merged soon so it gets more coverage through jhbuild/whatnot. At a
later point we can definitely consider going meson-only :).


Here are a few remaining issues:

      * There's no `make dist` equivalent. We can use `git archive` to
        produce tarballs, but these won't have the .c files generated by
        valac. That said, shipping the generated .c files does make the
        Vala preprocessor useless so it would be good if we can stop,
        but that could break things for downstreams unexpectedly.

I agree that shipping generated files is a bad idea, there's very
little scenarios where I can see this helping (perhaps embedded?), and
at that point I don't think additionally compiling vala is a big leap.

I agree with Michael in that reproducible builds are a vala problem
and we just tape over it. Introducing issues here is not quite ideal,
but there's also chances we 1) don't hit the code paths that might
result in flipped C code lines, or 2) we expose new places where this
happens, so I'd say it's more beneficial in the long term to just do
it.


      * The Firefox, Thunderbird, Evolution and Nautilus plugins don't
        have Meson build rules. I'm not sure if any of these are actually
        still used, we can easily fix that if they are.

Sounds like a good time to kill them all :). They were also gone in my
past effort to divide tracker stuff (which would be nice to try again
after this is merged).


      * Not every single configure flag has an equivalent in meson_options.txt

I see you've mainly killed tracker-extract toggles that had an "auto"
fallback, makes sense.


Meson is still kinda beta quality but it's under active development, the
maintainers are very helpful and responsive and the build is literally
twice as fast than with Autotools. Plus the output is a lot clearer so all the
compile warnings are there.

If you try this, please let me know any issues and I'll be happy try and triage
and hopefully fix them.

Please let's get this merged ASAP :), I think it looks and works good
enough that we get further coverage.

Thanks,
  Carlos


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]