All of lore.kernel.org
 help / color / mirror / Atom feed
From: Waldemar Brodkorb <wbx@openadk.org>
To: Scott Fan <fancp2007@gmail.com>
Cc: Bernd Kuhls <bernd@kuhls.net>, buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH v2] package/sqlite: fix configure options for readline/editline support
Date: Fri, 14 Feb 2025 10:32:33 +0100	[thread overview]
Message-ID: <Z68NsSRTlm0aGSi4@waldemar-brodkorb.de> (raw)
In-Reply-To: <20250214074235.917242-1-fancp2007@gmail.com>

Hi,

sorry I forgot to drop v1 of the patch.

Works now. You can add a 
Tested-by: Waldemar Brodkorb <wbx@openadk.org>

best regards
 Waldemar

Scott Fan wrote,

> The autosetup script will skip checking for readline.h when cross-compiling,
> which will cause line-editing support for the sqlite3 shell to always be "none".
> 
> In this case, if the --editline option is provided, an error will be reported:
> ERROR: Explicit --editline failed to find a matching library.
> 
> However, we can enable readline or editline support by specifying the CFLAGS
> and LDFLAGS values ​​instead of having it handled automatically by the
> autosetup configure script.
> 
> In addition, the libedit package actually depends on the ncurses package,
> just like the readline package. So when using the libedit package,
> also add the ncurses dependency.
> 
> Signed-off-by: Scott Fan <fancp2007@gmail.com>
> 
> ---
> Changes v1 -> v2:
>   - use the CFLAGS and LDFLAGS values instead of autosetup configure options
>   - update commit message
> ---
>  package/sqlite/sqlite.mk | 11 +++++++----
>  1 file changed, 7 insertions(+), 4 deletions(-)
> 
> diff --git a/package/sqlite/sqlite.mk b/package/sqlite/sqlite.mk
> index 5a8b033ce0..255ddc937b 100644
> --- a/package/sqlite/sqlite.mk
> +++ b/package/sqlite/sqlite.mk
> @@ -44,9 +44,12 @@ endif
>  
>  ifeq ($(BR2_PACKAGE_NCURSES)$(BR2_PACKAGE_READLINE),yy)
>  SQLITE_DEPENDENCIES += ncurses readline
> -else ifeq ($(BR2_PACKAGE_LIBEDIT),y)
> -SQLITE_DEPENDENCIES += libedit
> -SQLITE_CONF_OPTS += --disable-readline --editline
> +SQLITE_CFLAGS  += -DHAVE_READLINE=1
> +SQLITE_LDFLAGS += -lreadline -lncurses
> +else ifeq ($(BR2_PACKAGE_NCURSES)$(BR2_PACKAGE_LIBEDIT),yy)
> +SQLITE_DEPENDENCIES += ncurses libedit
> +SQLITE_CFLAGS  += -DHAVE_EDITLINE=1
> +SQLITE_LDFLAGS += -ledit -lncurses
>  else
>  SQLITE_CONF_OPTS += --disable-readline
>  endif
> @@ -59,7 +62,7 @@ ifeq ($(BR2_PACKAGE_SQLITE_ENABLE_JSON1),)
>  SQLITE_CONF_OPTS += --disable-json
>  endif
>  
> -SQLITE_CONF_ENV = CFLAGS="$(SQLITE_CFLAGS)"
> +SQLITE_CONF_ENV = CFLAGS="$(SQLITE_CFLAGS)" LDFLAGS="$(SQLITE_LDFLAGS)"
>  
>  define SQLITE_CONFIGURE_CMDS
>  	(cd $(@D); $(TARGET_CONFIGURE_OPTS) $(SQLITE_CONF_ENV) ./configure \
> -- 
> 2.43.0
> 
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  parent reply	other threads:[~2025-02-14  9:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-14  2:14 [Buildroot] [PATCH] package/sqlite: fix configure options for readline/editline support Scott Fan
2025-02-14  7:42 ` [Buildroot] [PATCH v2] " Scott Fan
2025-02-14  8:08   ` Waldemar Brodkorb
2025-02-14  9:32   ` Waldemar Brodkorb [this message]
2025-02-15  2:51     ` Scott Fan
2025-02-17  2:47       ` Scott Fan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Z68NsSRTlm0aGSi4@waldemar-brodkorb.de \
    --to=wbx@openadk.org \
    --cc=bernd@kuhls.net \
    --cc=buildroot@buildroot.org \
    --cc=fancp2007@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.