* Re: [PATCH] meson: fix ncurses detection on macOS
2020-12-28 15:16 [PATCH] meson: fix ncurses detection on macOS Chris Hofstaedtler
@ 2020-12-28 17:20 ` Philippe Mathieu-Daudé
2020-12-28 17:53 ` Samuel Thibault
2020-12-28 19:50 ` 罗勇刚(Yonggang Luo)
` (2 subsequent siblings)
3 siblings, 1 reply; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-12-28 17:20 UTC (permalink / raw)
To: Chris Hofstaedtler, qemu-devel; +Cc: pbonzini, Yonggang Luo, Samuel Thibault
On 12/28/20 4:16 PM, Chris Hofstaedtler wrote:
> Without this, meson fails with "curses package not usable"
> when using ncurses 6.2. Apparently the wide functions
> (addwstr, etc) are hidden behind the extra define, and
> meson does not define it at that detection stage.
Seems reasonable, but still Cc'ing more developers.
>
> Signed-off-by: Chris Hofstaedtler <chris@hofstaedtler.name>
> ---
> meson.build | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meson.build b/meson.build
> index 9c152a85bd..7b9d92c14a 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -510,7 +510,7 @@ if have_system and not get_option('curses').disabled()
> endforeach
> msg = get_option('curses').enabled() ? 'curses library not found' : ''
> if curses.found()
> - if cc.links(curses_test, dependencies: [curses])
> + if cc.links(curses_test, args: '-DNCURSES_WIDECHAR', dependencies: [curses])
> curses = declare_dependency(compile_args: '-DNCURSES_WIDECHAR', dependencies: [curses])
> else
> msg = 'curses package not usable'
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] meson: fix ncurses detection on macOS
2020-12-28 17:20 ` Philippe Mathieu-Daudé
@ 2020-12-28 17:53 ` Samuel Thibault
0 siblings, 0 replies; 6+ messages in thread
From: Samuel Thibault @ 2020-12-28 17:53 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: pbonzini, Yonggang Luo, qemu-devel, Chris Hofstaedtler
Philippe Mathieu-Daudé, le lun. 28 déc. 2020 18:20:13 +0100, a ecrit:
> On 12/28/20 4:16 PM, Chris Hofstaedtler wrote:
> > Without this, meson fails with "curses package not usable"
> > when using ncurses 6.2. Apparently the wide functions
> > (addwstr, etc) are hidden behind the extra define, and
> > meson does not define it at that detection stage.
>
> Seems reasonable, but still Cc'ing more developers.
That looks sensible indeed.
> > Signed-off-by: Chris Hofstaedtler <chris@hofstaedtler.name>
> > ---
> > meson.build | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/meson.build b/meson.build
> > index 9c152a85bd..7b9d92c14a 100644
> > --- a/meson.build
> > +++ b/meson.build
> > @@ -510,7 +510,7 @@ if have_system and not get_option('curses').disabled()
> > endforeach
> > msg = get_option('curses').enabled() ? 'curses library not found' : ''
> > if curses.found()
> > - if cc.links(curses_test, dependencies: [curses])
> > + if cc.links(curses_test, args: '-DNCURSES_WIDECHAR', dependencies: [curses])
> > curses = declare_dependency(compile_args: '-DNCURSES_WIDECHAR', dependencies: [curses])
> > else
> > msg = 'curses package not usable'
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] meson: fix ncurses detection on macOS
2020-12-28 15:16 [PATCH] meson: fix ncurses detection on macOS Chris Hofstaedtler
2020-12-28 17:20 ` Philippe Mathieu-Daudé
@ 2020-12-28 19:50 ` 罗勇刚(Yonggang Luo)
2020-12-30 16:28 ` Peter Maydell
2021-01-07 11:47 ` Paolo Bonzini
3 siblings, 0 replies; 6+ messages in thread
From: 罗勇刚(Yonggang Luo) @ 2020-12-28 19:50 UTC (permalink / raw)
To: Chris Hofstaedtler; +Cc: Paolo Bonzini, qemu-level
[-- Attachment #1: Type: text/plain, Size: 2228 bytes --]
On Mon, Dec 28, 2020 at 11:51 PM Chris Hofstaedtler <chris@hofstaedtler.name>
wrote:
>
> Without this, meson fails with "curses package not usable"
> when using ncurses 6.2. Apparently the wide functions
> (addwstr, etc) are hidden behind the extra define, and
> meson does not define it at that detection stage.
>
> Signed-off-by: Chris Hofstaedtler <chris@hofstaedtler.name>
> ---
> meson.build | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meson.build b/meson.build
> index 9c152a85bd..7b9d92c14a 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -510,7 +510,7 @@ if have_system and not get_option('curses').disabled()
> endforeach
> msg = get_option('curses').enabled() ? 'curses library not found' : ''
> if curses.found()
> - if cc.links(curses_test, dependencies: [curses])
> + if cc.links(curses_test, args: '-DNCURSES_WIDECHAR', dependencies:
[curses])
> curses = declare_dependency(compile_args: '-DNCURSES_WIDECHAR',
dependencies: [curses])
> else
> msg = 'curses package not usable'
> --
> 2.29.2
>
>
Better to share curses_compile_args
--- a/meson.build
+++ b/meson.build
@@ -504,16 +504,16 @@ if have_system and not get_option('curses').disabled()
endif
endforeach
msg = get_option('curses').enabled() ? 'curses library not found' : ''
+ curses_compile_args = ['-DNCURSES_WIDECHAR']
if curses.found()
- if cc.links(curses_test, dependencies: [curses])
- curses = declare_dependency(compile_args: '-DNCURSES_WIDECHAR',
dependencies: [curses])
+ if cc.links(curses_test, args: curses_compile_args, dependencies:
[curses])
+ curses = declare_dependency(compile_args: curses_compile_args,
dependencies: [curses])
else
msg = 'curses package not usable'
curses = not_found
endif
endif
if not curses.found()
- curses_compile_args = ['-DNCURSES_WIDECHAR']
has_curses_h = cc.has_header('curses.h', args: curses_compile_args)
if targetos != 'windows' and not has_curses_h
message('Trying with /usr/include/ncursesw')
--
2.29.2.windows.3
--
此致
礼
罗勇刚
Yours
sincerely,
Yonggang Luo
[-- Attachment #2: Type: text/html, Size: 2824 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] meson: fix ncurses detection on macOS
2020-12-28 15:16 [PATCH] meson: fix ncurses detection on macOS Chris Hofstaedtler
2020-12-28 17:20 ` Philippe Mathieu-Daudé
2020-12-28 19:50 ` 罗勇刚(Yonggang Luo)
@ 2020-12-30 16:28 ` Peter Maydell
2021-01-07 11:47 ` Paolo Bonzini
3 siblings, 0 replies; 6+ messages in thread
From: Peter Maydell @ 2020-12-30 16:28 UTC (permalink / raw)
To: Chris Hofstaedtler; +Cc: Paolo Bonzini, QEMU Developers
On Mon, 28 Dec 2020 at 15:52, Chris Hofstaedtler
<chris@hofstaedtler.name> wrote:
>
> Without this, meson fails with "curses package not usable"
> when using ncurses 6.2. Apparently the wide functions
> (addwstr, etc) are hidden behind the extra define, and
> meson does not define it at that detection stage.
>
> Signed-off-by: Chris Hofstaedtler <chris@hofstaedtler.name>
> ---
> meson.build | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meson.build b/meson.build
> index 9c152a85bd..7b9d92c14a 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -510,7 +510,7 @@ if have_system and not get_option('curses').disabled()
> endforeach
> msg = get_option('curses').enabled() ? 'curses library not found' : ''
> if curses.found()
> - if cc.links(curses_test, dependencies: [curses])
> + if cc.links(curses_test, args: '-DNCURSES_WIDECHAR', dependencies: [curses])
> curses = declare_dependency(compile_args: '-DNCURSES_WIDECHAR', dependencies: [curses])
> else
> msg = 'curses package not usable'
> --
This sounds like the Meson conversion regressed the fix made
in commit b01a4fd3bd7d6f2 in 2017 to the configure version of
this test...
thanks
-- PMM
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] meson: fix ncurses detection on macOS
2020-12-28 15:16 [PATCH] meson: fix ncurses detection on macOS Chris Hofstaedtler
` (2 preceding siblings ...)
2020-12-30 16:28 ` Peter Maydell
@ 2021-01-07 11:47 ` Paolo Bonzini
3 siblings, 0 replies; 6+ messages in thread
From: Paolo Bonzini @ 2021-01-07 11:47 UTC (permalink / raw)
To: Chris Hofstaedtler, qemu-devel
On 28/12/20 16:16, Chris Hofstaedtler wrote:
> Without this, meson fails with "curses package not usable"
> when using ncurses 6.2. Apparently the wide functions
> (addwstr, etc) are hidden behind the extra define, and
> meson does not define it at that detection stage.
>
> Signed-off-by: Chris Hofstaedtler <chris@hofstaedtler.name>
> ---
> meson.build | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meson.build b/meson.build
> index 9c152a85bd..7b9d92c14a 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -510,7 +510,7 @@ if have_system and not get_option('curses').disabled()
> endforeach
> msg = get_option('curses').enabled() ? 'curses library not found' : ''
> if curses.found()
> - if cc.links(curses_test, dependencies: [curses])
> + if cc.links(curses_test, args: '-DNCURSES_WIDECHAR', dependencies: [curses])
> curses = declare_dependency(compile_args: '-DNCURSES_WIDECHAR', dependencies: [curses])
> else
> msg = 'curses package not usable'
>
Already fixed by commit 0dbce6efb5ff2e7113734d3a0cabbf87fc56feec
meson: fix detection of curses with pkgconfig
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Sorry for the delay in applying it.
Thanks,
Paolo
^ permalink raw reply [flat|nested] 6+ messages in thread