lnav icon indicating copy to clipboard operation
lnav copied to clipboard

Option to build with unbundled libfmt

Open bowlofeggs opened this issue 4 years ago • 2 comments

Greetings!

A Gentoo user reported that libfmt appears to be bundled in this project. I didn't see a way to build against a system-provided libfmt using the configure script. I've got a few questions:

  • Are there changes to the bundled libfmt that are needed for lnav to work properly?
  • Would you be open to adding a configure flag that would allow a system-provided libfmt to be used in place of the bundled version?

bowlofeggs avatar Jul 21 '21 02:07 bowlofeggs

  • Are there changes to the bundled libfmt that are needed for lnav to work properly?

I don't think I made any changes.

  • Would you be open to adding a configure flag that would allow a system-provided libfmt to be used in place of the bundled version?

I'm not really clear on what the advantage is to using the system library. It's almost entirely a header-only library and linking against C++ system libraries is usually a minefield.

So, the honest answer is: I'll likely accept a pull-request with this change, but I'm not going to spend much effort maintaining it and will likely drop it if it gets in my way too much.

tstack avatar Aug 04 '21 22:08 tstack

The advantage to using the system library for Gentoo (and likely other distributions) is the ability to manage dependencies across the distribution. When there are problems with libfmt and some other dependency, Gentoo has to fix n libfmts rather than just 1, which is more difficult. In https://github.com/tstack/lnav/issues/912 I described a specific situation with doctest and glibc, for example.

I might be able to scrounge up some time to do a patch for this to be optional, but I'll wait to see what you think about #915 first, in case we go with a different approach than my first stab at that one. Then I can replicate whatever we settle on there for this one too.

bowlofeggs avatar Sep 19 '21 02:09 bowlofeggs