Patchwork cmake-native: Depend on ncurses-native too

login
register
mail settings
Submitter Mike Crowe
Date April 1, 2014, 9:16 a.m.
Message ID <1396343775-18753-1-git-send-email-mac@mcrowe.com>
Download mbox | patch
Permalink /patch/69807/
State New
Headers show

Comments

Mike Crowe - April 1, 2014, 9:16 a.m.
cmake detects the presence of curses automatically during configure so
cmake-native must also depend on ncurses-native to stop it being removed
from the sysroot during the build.

Signed-off-by: Mike Crowe <mac@mcrowe.com>
---
 meta/recipes-devtools/cmake/cmake-native_2.8.12.2.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Richard Purdie - April 1, 2014, 9:31 a.m.
On Tue, 2014-04-01 at 10:16 +0100, Mike Crowe wrote:
> cmake detects the presence of curses automatically during configure so
> cmake-native must also depend on ncurses-native to stop it being removed
> from the sysroot during the build.
> 
> Signed-off-by: Mike Crowe <mac@mcrowe.com>
> ---
>  meta/recipes-devtools/cmake/cmake-native_2.8.12.2.bb | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-devtools/cmake/cmake-native_2.8.12.2.bb b/meta/recipes-devtools/cmake/cmake-native_2.8.12.2.bb
> index 08b2c02..8d93b9a 100644
> --- a/meta/recipes-devtools/cmake/cmake-native_2.8.12.2.bb
> +++ b/meta/recipes-devtools/cmake/cmake-native_2.8.12.2.bb
> @@ -2,7 +2,7 @@ require cmake.inc
>  inherit native
>  
>  # Using cmake's internal libarchive, so some dependencies are needed
> -DEPENDS += "bzip2-native zlib-native"
> +DEPENDS += "bzip2-native zlib-native ncurses-native"
>  
>  SRC_URI += "file://cmlibarchive-disable-ext2fs.patch"
>  

What does an ncurses enabled cmake give us that is desirable?

Cheers,

Richard
Mike Crowe - April 1, 2014, 10:11 a.m.
On Tuesday 01 April 2014 at 10:31:59 +0100, Richard Purdie wrote:
> On Tue, 2014-04-01 at 10:16 +0100, Mike Crowe wrote:
> > cmake detects the presence of curses automatically during configure so
> > cmake-native must also depend on ncurses-native to stop it being removed
> > from the sysroot during the build.
> > 
> > Signed-off-by: Mike Crowe <mac@mcrowe.com>
> > ---
> >  meta/recipes-devtools/cmake/cmake-native_2.8.12.2.bb | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/meta/recipes-devtools/cmake/cmake-native_2.8.12.2.bb b/meta/recipes-devtools/cmake/cmake-native_2.8.12.2.bb
> > index 08b2c02..8d93b9a 100644
> > --- a/meta/recipes-devtools/cmake/cmake-native_2.8.12.2.bb
> > +++ b/meta/recipes-devtools/cmake/cmake-native_2.8.12.2.bb
> > @@ -2,7 +2,7 @@ require cmake.inc
> >  inherit native
> >  
> >  # Using cmake's internal libarchive, so some dependencies are needed
> > -DEPENDS += "bzip2-native zlib-native"
> > +DEPENDS += "bzip2-native zlib-native ncurses-native"
> >  
> >  SRC_URI += "file://cmlibarchive-disable-ext2fs.patch"
> >  
> 
> What does an ncurses enabled cmake give us that is desirable?

I'm not really sure.

CMake's bootstrap configure script detects curses and tries to use it which
causes build failures if curses has gone missing in the meantime.

In the failure I saw bitbake was building cmake-native and ncurses-native
in parallel in a tree that had previously been used to build for a
different machine. This caused curses.h to be present during
cmake-native.do_configure but go missing before or during
cmake-native.do_compile.

It seems to be possible to disable building the "CursesDialog" component to
remove the need for ncurses but I couldn't immediately see how to do that
for a bootstrap build.

The non-native cmake recipe depends on ncurses even though it passes
-DBUILD_CursesDialog=0.

Thanks.

Mike.
Richard Purdie - April 1, 2014, 10:46 a.m.
On Tue, 2014-04-01 at 11:11 +0100, Mike Crowe wrote:
> On Tuesday 01 April 2014 at 10:31:59 +0100, Richard Purdie wrote:
> > On Tue, 2014-04-01 at 10:16 +0100, Mike Crowe wrote:
> > > cmake detects the presence of curses automatically during configure so
> > > cmake-native must also depend on ncurses-native to stop it being removed
> > > from the sysroot during the build.
> > > 
> > > Signed-off-by: Mike Crowe <mac@mcrowe.com>
> > > ---
> > >  meta/recipes-devtools/cmake/cmake-native_2.8.12.2.bb | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/meta/recipes-devtools/cmake/cmake-native_2.8.12.2.bb b/meta/recipes-devtools/cmake/cmake-native_2.8.12.2.bb
> > > index 08b2c02..8d93b9a 100644
> > > --- a/meta/recipes-devtools/cmake/cmake-native_2.8.12.2.bb
> > > +++ b/meta/recipes-devtools/cmake/cmake-native_2.8.12.2.bb
> > > @@ -2,7 +2,7 @@ require cmake.inc
> > >  inherit native
> > >  
> > >  # Using cmake's internal libarchive, so some dependencies are needed
> > > -DEPENDS += "bzip2-native zlib-native"
> > > +DEPENDS += "bzip2-native zlib-native ncurses-native"
> > >  
> > >  SRC_URI += "file://cmlibarchive-disable-ext2fs.patch"
> > >  
> > 
> > What does an ncurses enabled cmake give us that is desirable?
> 
> I'm not really sure.
> 
> CMake's bootstrap configure script detects curses and tries to use it which
> causes build failures if curses has gone missing in the meantime.
> 
> In the failure I saw bitbake was building cmake-native and ncurses-native
> in parallel in a tree that had previously been used to build for a
> different machine. This caused curses.h to be present during
> cmake-native.do_configure but go missing before or during
> cmake-native.do_compile.
> 
> It seems to be possible to disable building the "CursesDialog" component to
> remove the need for ncurses but I couldn't immediately see how to do that
> for a bootstrap build.
> 
> The non-native cmake recipe depends on ncurses even though it passes
> -DBUILD_CursesDialog=0.

I'd much prefer to disable the need for curses if we can since the more
convoluted the dependency chain, the longer our build times. If we don't
need this, it would be much nicer to disable it, even if we have to
patch it out.

Cheers,

Richard
Khem Raj - April 2, 2014, 4:53 a.m.
On Tue, Apr 1, 2014 at 2:31 AM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> What does an ncurses enabled cmake give us that is desirable?
>

bells and whistles -  curses GUI frontend :) which I would assume we
don't use as much
if someone does please speak up
Khem Raj - April 2, 2014, 4:59 a.m.
On Tue, Apr 1, 2014 at 3:11 AM, Mike Crowe <mac@mcrowe.com> wrote:
> It seems to be possible to disable building the "CursesDialog" component to
> remove the need for ncurses but I couldn't immediately see how to do that
> for a bootstrap build.
>
> The non-native cmake recipe depends on ncurses even though it passes
> -DBUILD_CursesDialog=0.

you need to disable it completely in CMakefile.txt, just that define
does not suffice you might try something like
http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-util/cmake/files/cmake-2.8.10-libform.patch?diff_format=f&view=markup
Mike Crowe - April 3, 2014, 10:44 a.m.
On Tuesday 01 April 2014 at 21:59:34 -0700, Khem Raj wrote:
> On Tue, Apr 1, 2014 at 3:11 AM, Mike Crowe <mac@mcrowe.com> wrote:
> > It seems to be possible to disable building the "CursesDialog" component to
> > remove the need for ncurses but I couldn't immediately see how to do that
> > for a bootstrap build.
> >
> > The non-native cmake recipe depends on ncurses even though it passes
> > -DBUILD_CursesDialog=0.
> 
> you need to disable it completely in CMakefile.txt, just that define
> does not suffice you might try something like
> http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-util/cmake/files/cmake-2.8.10-libform.patch?diff_format=f&view=markup
> 

It appears that a similar problem occurs if cmake-native is built at the
same time as acl-native:

 Building C object Utilities/cmcurl/CMakeFiles/cmcurl.dir/http_chunks.c.o
 [ 30%] /home/jenkins/workspace/nightly-brightsign-master/MACHINE/source/label/nightly/build-bcm7425/source-release-test-build/brightsign-oe/build-bcm7425/tmp-eglibc/work/x86_64-linux/cmake-native/2.8.12.2-r0/cmake-2.8.12.2/Utilities/cmlibarchive/libarchive/archive_read_disk_entry_from_file.c:38:21:fatal error: sys/acl.h: No such file or directory
 compilation terminated.

cmake detects sys/acl.h but by the time the compiler tries to include it
the file has been unstaged from the sysroot.

This one is harder to patch out. Do you object to me adding acl{,-native}
to DEPENDS?

Thanks.

Mike.
Richard Purdie - April 6, 2014, 11:57 a.m.
On Thu, 2014-04-03 at 11:44 +0100, Mike Crowe wrote:
> On Tuesday 01 April 2014 at 21:59:34 -0700, Khem Raj wrote:
> > On Tue, Apr 1, 2014 at 3:11 AM, Mike Crowe <mac@mcrowe.com> wrote:
> > > It seems to be possible to disable building the "CursesDialog" component to
> > > remove the need for ncurses but I couldn't immediately see how to do that
> > > for a bootstrap build.
> > >
> > > The non-native cmake recipe depends on ncurses even though it passes
> > > -DBUILD_CursesDialog=0.
> > 
> > you need to disable it completely in CMakefile.txt, just that define
> > does not suffice you might try something like
> > http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-util/cmake/files/cmake-2.8.10-libform.patch?diff_format=f&view=markup
> > 
> 
> It appears that a similar problem occurs if cmake-native is built at the
> same time as acl-native:
> 
>  Building C object Utilities/cmcurl/CMakeFiles/cmcurl.dir/http_chunks.c.o
>  [ 30%] /home/jenkins/workspace/nightly-brightsign-master/MACHINE/source/label/nightly/build-bcm7425/source-release-test-build/brightsign-oe/build-bcm7425/tmp-eglibc/work/x86_64-linux/cmake-native/2.8.12.2-r0/cmake-2.8.12.2/Utilities/cmlibarchive/libarchive/archive_read_disk_entry_from_file.c:38:21:fatal error: sys/acl.h: No such file or directory
>  compilation terminated.
> 
> cmake detects sys/acl.h but by the time the compiler tries to include it
> the file has been unstaged from the sysroot.
> 
> This one is harder to patch out. Do you object to me adding acl{,-native}
> to DEPENDS?

Each dependency we add like this tends to cause slightly longer builds.
Each small piece mounts up. So I do feel quite strongly we disable
things we can...

Cheers,

Richard

Patch

diff --git a/meta/recipes-devtools/cmake/cmake-native_2.8.12.2.bb b/meta/recipes-devtools/cmake/cmake-native_2.8.12.2.bb
index 08b2c02..8d93b9a 100644
--- a/meta/recipes-devtools/cmake/cmake-native_2.8.12.2.bb
+++ b/meta/recipes-devtools/cmake/cmake-native_2.8.12.2.bb
@@ -2,7 +2,7 @@  require cmake.inc
 inherit native
 
 # Using cmake's internal libarchive, so some dependencies are needed
-DEPENDS += "bzip2-native zlib-native"
+DEPENDS += "bzip2-native zlib-native ncurses-native"
 
 SRC_URI += "file://cmlibarchive-disable-ext2fs.patch"