Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/util-linux: fix detection of ncurses
@ 2023-09-04 12:43 Norbert Lange
  2023-09-06 17:20 ` Peter Korsgaard
  0 siblings, 1 reply; 3+ messages in thread
From: Norbert Lange @ 2023-09-04 12:43 UTC (permalink / raw)
  To: buildroot; +Cc: Norbert Lange

the configure script seems to use the NCURSES6_CONFIG variable,
however it will still check for a system ncurses6-config and prefer
this script if available.

Change to using ac_cv_prog_NCURSES[W]6_CONFIG override which
works always

Signed-off-by: Norbert Lange <nolange79@gmail.com>
---
 package/util-linux/util-linux.mk | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/package/util-linux/util-linux.mk b/package/util-linux/util-linux.mk
index 4a40d5afec..4e866d86c9 100644
--- a/package/util-linux/util-linux.mk
+++ b/package/util-linux/util-linux.mk
@@ -77,11 +77,9 @@ endif
 ifeq ($(BR2_PACKAGE_NCURSES),y)
 UTIL_LINUX_DEPENDENCIES += ncurses
 ifeq ($(BR2_PACKAGE_NCURSES_WCHAR),y)
-UTIL_LINUX_CONF_OPTS += --with-ncursesw
-UTIL_LINUX_CONF_ENV += NCURSESW6_CONFIG=$(STAGING_DIR)/usr/bin/$(NCURSES_CONFIG_SCRIPTS)
+UTIL_LINUX_CONF_OPTS += --with-ncursesw ac_cv_prog_NCURSESW6_CONFIG=$(STAGING_DIR)/usr/bin/$(NCURSES_CONFIG_SCRIPTS)
 else
-UTIL_LINUX_CONF_OPTS += --without-ncursesw --with-ncurses --disable-widechar
-UTIL_LINUX_CONF_ENV += NCURSES6_CONFIG=$(STAGING_DIR)/usr/bin/$(NCURSES_CONFIG_SCRIPTS)
+UTIL_LINUX_CONF_OPTS += --without-ncursesw --with-ncurses --disable-widechar ac_cv_prog_NCURSES6_CONFIG=$(STAGING_DIR)/usr/bin/$(NCURSES_CONFIG_SCRIPTS)
 endif
 else
 ifeq ($(BR2_USE_WCHAR),y)
-- 
2.39.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Buildroot] [PATCH] package/util-linux: fix detection of ncurses
  2023-09-04 12:43 [Buildroot] [PATCH] package/util-linux: fix detection of ncurses Norbert Lange
@ 2023-09-06 17:20 ` Peter Korsgaard
  2023-09-06 20:18   ` Norbert Lange
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Korsgaard @ 2023-09-06 17:20 UTC (permalink / raw)
  To: Norbert Lange; +Cc: buildroot

>>>>> "Norbert" == Norbert Lange <nolange79@gmail.com> writes:

 > the configure script seems to use the NCURSES6_CONFIG variable,
 > however it will still check for a system ncurses6-config and prefer
 > this script if available.

Where do you see that? Looking at configure I see the normal
ac_cv_prog_FOO / check FOO / fallback to program:


if test ${ac_cv_prog_NCURSESW6_CONFIG+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test -n "$NCURSESW6_CONFIG"; then
  ac_cv_prog_NCURSESW6_CONFIG="$NCURSESW6_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_NCURSESW6_CONFIG="${ac_tool_prefix}ncursesw6-config"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done

What is the error you are seeing exactly?

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Buildroot] [PATCH] package/util-linux: fix detection of ncurses
  2023-09-06 17:20 ` Peter Korsgaard
@ 2023-09-06 20:18   ` Norbert Lange
  0 siblings, 0 replies; 3+ messages in thread
From: Norbert Lange @ 2023-09-06 20:18 UTC (permalink / raw)
  To: Peter Korsgaard; +Cc: buildroot

Am Mi., 6. Sept. 2023 um 19:20 Uhr schrieb Peter Korsgaard
<peter@korsgaard.com>:
>
> >>>>> "Norbert" == Norbert Lange <nolange79@gmail.com> writes:
>
>  > the configure script seems to use the NCURSES6_CONFIG variable,
>  > however it will still check for a system ncurses6-config and prefer
>  > this script if available.
>
> Where do you see that? Looking at configure I see the normal
> ac_cv_prog_FOO / check FOO / fallback to program:
>
>
> if test ${ac_cv_prog_NCURSESW6_CONFIG+y}
> then :
>   printf %s "(cached) " >&6
> else $as_nop
>   if test -n "$NCURSESW6_CONFIG"; then
>   ac_cv_prog_NCURSESW6_CONFIG="$NCURSESW6_CONFIG" # Let the user override the test.
> else
> as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
> for as_dir in $PATH
> do
>   IFS=$as_save_IFS
>   case $as_dir in #(((
>     '') as_dir=./ ;;
>     */) ;;
>     *) as_dir=$as_dir/ ;;
>   esac
>     for ac_exec_ext in '' $ac_executable_extensions; do
>   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
>     ac_cv_prog_NCURSESW6_CONFIG="${ac_tool_prefix}ncursesw6-config"
>     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
>     break 2
>   fi
> done
>
> What is the error you are seeing exactly?

I see in the config log, that buildroots ncursesw6-config is used,
and then following that /usr/bin/ncursesw6-config is detected.
Then the build fails as libtinfo.so is missing.

By setting ac_cv_prog_NCURSESW6_CONFIG (applying this patch),

I see in the config log, that buildroots ncursesw6-config is used.
Then the build succeeds.

If you asked me about where the error is buried in configure hell-script,
I demand the certainly following psychological harm compensated.

>
> --
> Bye, Peter Korsgaard

Norbert
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-09-06 20:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-04 12:43 [Buildroot] [PATCH] package/util-linux: fix detection of ncurses Norbert Lange
2023-09-06 17:20 ` Peter Korsgaard
2023-09-06 20:18   ` Norbert Lange

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox