Issue 8913 - Add meson build system to lmdb
Summary: Add meson build system to lmdb
Status: UNCONFIRMED
Alias: None
Product: LMDB
Classification: Unclassified
Component: liblmdb (show other issues)
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-09-05 14:07 UTC by nacho.resa@gmail.com
Modified: 2020-03-13 17:38 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description nacho.resa@gmail.com 2018-09-05 14:07:14 UTC
Full_Name: Ignacio Casal Quinteiro
Version: 
OS: 
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (54.239.6.177)


Meson is the new thing out there, maybe projects are already using it and allows
embedding in other projects apart from being fast, efficient and easier to
maintain than a Makefile.

On the following patch you can find a working meson build system which builds
lmdb:
https://github.com/wingtk/lmdb/commit/24b1b1ce2055b6a612603700bdcfc7ba3859fbfb
Comment 1 Howard Chu 2018-09-05 16:21:22 UTC
nacho.resa@gmail.com wrote:
> Full_Name: Ignacio Casal Quinteiro
> Version: 
> OS: 
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (54.239.6.177)
> 
> 
> Meson is the new thing out there,

No.


-- 
  -- Howard Chu
  CTO, Symas Corp.           http://www.symas.com
  Director, Highland Sun     http://highlandsun.com/hyc/
  Chief Architect, OpenLDAP  http://www.openldap.org/project/

Comment 2 nacho.resa@gmail.com 2018-09-05 16:31:52 UTC
yeah... knowing my previous tries with lmdb I did not have much hope...

On Wed, Sep 5, 2018 at 6:21 PM Howard Chu <hyc@symas.com> wrote:

> nacho.resa@gmail.com wrote:
> > Full_Name: Ignacio Casal Quinteiro
> > Version:
> > OS:
> > URL: ftp://ftp.openldap.org/incoming/
> > Submission from: (NULL) (54.239.6.177)
> >
> >
> > Meson is the new thing out there,
>
> No.
>
>
> --
>   -- Howard Chu
>   CTO, Symas Corp.           http://www.symas.com
>   Director, Highland Sun     http://highlandsun.com/hyc/
>   Chief Architect, OpenLDAP  http://www.openldap.org/project/
>


-- 
Ignacio Casal Quinteiro
Comment 3 nacho.resa@gmail.com 2018-09-05 16:46:06 UTC
FWIW any chance to reconsider having both build systems?
with meson it is easy to build on windows. Plus I'd like you
to see at these numbers:

time make:
real    0m5.629s
user    0m5.197s
sys    0m0.399s

time meson build
real    0m0.452s
user    0m0.335s
sys    0m0.131s

time ninja -C build
real    0m0.992s
user    0m1.812s
sys    0m0.362s

You can see that configuring and building with meson is faster than just
using make

On Wed, Sep 5, 2018 at 6:31 PM Ignacio Casal Quinteiro <nacho.resa@gmail.com>
wrote:

> yeah... knowing my previous tries with lmdb I did not have much hope...
>
> On Wed, Sep 5, 2018 at 6:21 PM Howard Chu <hyc@symas.com> wrote:
>
>> nacho.resa@gmail.com wrote:
>> > Full_Name: Ignacio Casal Quinteiro
>> > Version:
>> > OS:
>> > URL: ftp://ftp.openldap.org/incoming/
>> > Submission from: (NULL) (54.239.6.177)
>> >
>> >
>> > Meson is the new thing out there,
>>
>> No.
>>
>>
>> --
>>   -- Howard Chu
>>   CTO, Symas Corp.           http://www.symas.com
>>   Director, Highland Sun     http://highlandsun.com/hyc/
>>   Chief Architect, OpenLDAP  http://www.openldap.org/project/
>>
>
>
> --
> Ignacio Casal Quinteiro
>


-- 
Ignacio Casal Quinteiro
Comment 4 Howard Chu 2018-09-05 17:15:14 UTC
Ignacio Casal Quinteiro wrote:
> FWIW any chance to reconsider having both build systems?

I have no desire to support multiple build systems. The Project does not support
any tools that we don't use ourselves.

The files you add significantly increase the line count, and don't even contain any comments.
In contrast, the current Makefile is mostly comments.

> with meson it is easy to build on windows. Plus I'd like you
> to see at these numbers:
> 
> time make:
> real    0m5.629s
> user    0m5.197s
> sys    0m0.399s
> 
> time meson build
> real    0m0.452s
> user    0m0.335s
> sys    0m0.131s
> 
> time ninja -C build
> real    0m0.992s
> user    0m1.812s
> sys    0m0.362s
> 
> You can see that configuring and building with meson is faster than just using make

On my system the majority of build time is in gcc itself. The proportion of time that
make itself uses is trivial. I would guess the only reason you're seeing a speedup is
because meson parallelizes the build. You would get the same effect using "make -jXX".

> 
> On Wed, Sep 5, 2018 at 6:31 PM Ignacio Casal Quinteiro <nacho.resa@gmail.com <mailto:nacho.resa@gmail.com>> wrote:
> 
>     yeah... knowing my previous tries with lmdb I did not have much hope...
> 
>     On Wed, Sep 5, 2018 at 6:21 PM Howard Chu <hyc@symas.com <mailto:hyc@symas.com>> wrote:
> 
>         nacho.resa@gmail.com <mailto:nacho.resa@gmail.com> wrote:
>         > Full_Name: Ignacio Casal Quinteiro
>         > Version:
>         > OS:
>         > URL: ftp://ftp.openldap.org/incoming/
>         > Submission from: (NULL) (54.239.6.177)
>         >
>         >
>         > Meson is the new thing out there,
> 
>         No.

-- 
  -- Howard Chu
  CTO, Symas Corp.           http://www.symas.com
  Director, Highland Sun     http://highlandsun.com/hyc/
  Chief Architect, OpenLDAP  http://www.openldap.org/project/

Comment 5 nacho.resa@gmail.com 2018-09-05 21:08:22 UTC
not super important since it is anyway quite fast but takes half of the
time running meson + ninja than running make -j6... :)
real    0m3.070s
user    0m7.031s
sys    0m0.493s

vs

real    0m1.501s
user    0m2.138s
sys    0m0.446s

In any case it is not the end of the world to keep a fork for gvsbuild and
maybe fedora, at the end of the day this library
does not change that often to make the build system painful to maintain out
of upstream.

On Wed, Sep 5, 2018 at 7:15 PM Howard Chu <hyc@symas.com> wrote:

> Ignacio Casal Quinteiro wrote:
> > FWIW any chance to reconsider having both build systems?
>
> I have no desire to support multiple build systems. The Project does not
> support
> any tools that we don't use ourselves.
>
> The files you add significantly increase the line count, and don't even
> contain any comments.
> In contrast, the current Makefile is mostly comments.
>
> > with meson it is easy to build on windows. Plus I'd like you
> > to see at these numbers:
> >
> > time make:
> > real    0m5.629s
> > user    0m5.197s
> > sys    0m0.399s
> >
> > time meson build
> > real    0m0.452s
> > user    0m0.335s
> > sys    0m0.131s
> >
> > time ninja -C build
> > real    0m0.992s
> > user    0m1.812s
> > sys    0m0.362s
> >
> > You can see that configuring and building with meson is faster than just
> using make
>
> On my system the majority of build time is in gcc itself. The proportion
> of time that
> make itself uses is trivial. I would guess the only reason you're seeing a
> speedup is
> because meson parallelizes the build. You would get the same effect using
> "make -jXX".
>
> >
> > On Wed, Sep 5, 2018 at 6:31 PM Ignacio Casal Quinteiro <
> nacho.resa@gmail.com <mailto:nacho.resa@gmail.com>> wrote:
> >
> >     yeah... knowing my previous tries with lmdb I did not have much
> hope...
> >
> >     On Wed, Sep 5, 2018 at 6:21 PM Howard Chu <hyc@symas.com <mailto:
> hyc@symas.com>> wrote:
> >
> >         nacho.resa@gmail.com <mailto:nacho.resa@gmail.com> wrote:
> >         > Full_Name: Ignacio Casal Quinteiro
> >         > Version:
> >         > OS:
> >         > URL: ftp://ftp.openldap.org/incoming/
> >         > Submission from: (NULL) (54.239.6.177)
> >         >
> >         >
> >         > Meson is the new thing out there,
> >
> >         No.
>
> --
>   -- Howard Chu
>   CTO, Symas Corp.           http://www.symas.com
>   Director, Highland Sun     http://highlandsun.com/hyc/
>   Chief Architect, OpenLDAP  http://www.openldap.org/project/
>


-- 
Ignacio Casal Quinteiro