tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: databases/mariadb55-client and readline



maya%netbsd.org@localhost writes:

> On Thu, May 24, 2018 at 02:58:05AM +0200, Emmanuel Dreyfus wrote:
>> <maya%netbsd.org@localhost> wrote:
>> 
>> > Add
>> > typedef char  **rl_completion_func_t(const char *, int, int);
>> 
>> I had to add two ifdef __NetBSD__ to get it building:
>>  
>> +#if defined(__NetBSD__)
>> +typedef char   **rl_completion_func_t(const char *, int, int);
>> +#endif
>> 
>> (...)
>> 
>> -#if !defined(HAVE_HIST_ENTRY)
>> +#if !defined(__NetBSD__) && !defined(HAVE_HIST_ENTRY)
>>  typedef struct _hist_entry {
>>    const char      *line;
>>    const char      *data;
>>  } HIST_ENTRY; 
>> 
>> Of course this is not satisfying, since even NetBSD could be using real
>> readline. There must be something borken in configure process.
>
> The change was made to fix the build on libedit in netbsd-8/current.
> people seem to actively avoid readline. mariadb even bundles readline.
> If you force include include devel/readline instead of mk/readline I
> think it will pull in readline from pkgsrc.

People avoid readline in a number of cases where the licensing of the
main program is BSDish/LGPLish, and using readline results in GPL.  In a
program that is already GPL, this concern doesn't apply.  I'm not aware
of other significant reasons to avoid it, other than preference for the
smaller size and whatever else is different.

> this all looks like a mess. instead of a configure check, we force
> USE_READLINE_V6 = 1. perhaps that was the crossover point and checking
> for rl_completion_func_t instead of forcing the new interface is the
> clean change?

Multiple separate issues here:

  What does mariadb require from a readline library, really?

  Does mariadb check for readline features/versions in a clean way which
  works well with being handed libedit

  There should be some way to declare that as an API level and the
  mk/readline.builtin.mk should be able to choose NetBSD's libedit vs
  real readline based on that.   But there is currently only an
  exhortation to include mk/readline.buildlink3.mk if you don't care and
  one or the other if you do.  That's really a variable that encodes
  which of the 2 are available :-)

  Does NetBSD's libedit leave out things that it could have, with little
  effort, and make it usable in more places?



So I think overall for now I agree with what I think Maya is saying,
which is that mariadb, if it doesn't just work without issues with
NetBSD's libedit, should just include devel/readline/buildlink3.mk, and
patches to make it work with libedit dropped.

Attachment: signature.asc
Description: PGP signature



Home | Main Index | Thread Index | Old Index