Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Seiderer <ps.report@gmx.net>
To: buildroot@busybox.net
Subject: [Buildroot] [RFC v2] package/ninja: fix to be cmake-3.10 compatible again
Date: Fri, 11 Dec 2020 20:37:53 +0100	[thread overview]
Message-ID: <20201211203753.17c902f0@gmx.net> (raw)
In-Reply-To: <CAGm1_ktznMS6DHboQM0RZYcFWbxvnNUGa9yguzeUw+QBnxiJwQ@mail.gmail.com>

Hello Yegor,

On Fri, 11 Dec 2020 20:20:05 +0100, Yegor Yefremov via buildroot <buildroot@busybox.net> wrote:

> On Fri, Dec 11, 2020 at 7:38 PM Peter Seiderer <ps.report@gmx.net> wrote:
> >
> > Hello Yegor,
> >
> > On Fri, 11 Dec 2020 06:37:08 +0100, Yegor Yefremov via buildroot <buildroot@busybox.net> wrote:
> >
> > > On Thu, Dec 10, 2020 at 10:54 PM Peter Seiderer <ps.report@gmx.net> wrote:
> > > >
> > > > Fixes (see [1]):
> > > >
> > > > ToDo: ...
> > > >
> > > > [1] http://lists.busybox.net/pipermail/buildroot/2020-December/298159.html
> > > >
> > > > Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> > >
> > > Works like a charm.
> >
> > Thanks for testing, mind to send me the original failure message/log
> > so I can fill the missing part in the patch commit message?
>
> Here you are (error shown with VERBOSE=ON):
>
> [ 93%] Building CXX object CMakeFiles/ninja.dir/src/ninja.cc.o
> [ 96%] Building CXX object CMakeFiles/ninja.dir/src/browse.cc.o
> /home/user/MyProjects/oss/br-test-v2/s2srv/host/bin/ccache
> /usr/bin/g++  -DNINJA_HAVE_BROWSE  -O2
> -I/home/user/MyProjects/oss/br-test-v2/s2srv/host/include
> -Wno-deprecated -fdiagnostics-color   -o
> CMakeFiles/ninja.dir/src/ninja.cc.o -c
> /home/user/MyProjects/oss/br-test-v2/s2srv/build/host-ninja-1.10.2/src/ninja.cc
> /home/user/MyProjects/oss/br-test-v2/s2srv/host/bin/ccache
> /usr/bin/g++  -DNINJA_HAVE_BROWSE -DNINJA_PYTHON=\"python\"  -O2
> -I/home/user/MyProjects/oss/br-test-v2/s2srv/host/include
> -Wno-deprecated -fdiagnostics-color   -o
> CMakeFiles/ninja.dir/src/browse.cc.o -c
> /home/user/MyProjects/oss/br-test-v2/s2srv/build/host-ninja-1.10.2/src/browse.cc
> /home/user/MyProjects/oss/br-test-v2/s2srv/build/host-ninja-1.10.2/src/browse.cc:23:10:
> fatal error: build/browse_py.h: No such file or directory
>  #include "build/browse_py.h"
>           ^~~~~~~~~~~~~~~~~~~
> compilation terminated.

Thanks for the log...., but this is a follow-up failure because the file
is not generated, I believe because the dependency declared for src/browse.cc
(line 155-161, specially line 158: OBJECT_DEPENDS "${CMAKE_BINARY_DIR}/build/browse_py.h")
is not evaluated because the unknown INCLUDE_DIRECTORIES, no warning about this
earlier in the logs?

139 if(platform_supports_ninja_browse)
140         # Inlines src/browse.py into the browse_py.h header, so that it can be included
141         # by src/browse.cc
142         add_custom_command(
143                 OUTPUT build/browse_py.h
144                 MAIN_DEPENDENCY src/browse.py
145                 DEPENDS src/inline.sh
146                 COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/build
147                 COMMAND src/inline.sh kBrowsePy
148                                                 < src/browse.py
149                                                 > ${CMAKE_BINARY_DIR}/build/browse_py.h
150                 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
151                 VERBATIM
152         )
153
154         target_compile_definitions(ninja PRIVATE NINJA_HAVE_BROWSE)
155         target_sources(ninja PRIVATE src/browse.cc)
156         set_source_files_properties(src/browse.cc
157                 PROPERTIES
158                         OBJECT_DEPENDS "${CMAKE_BINARY_DIR}/build/browse_py.h"
159                         INCLUDE_DIRECTORIES "${CMAKE_BINARY_DIR}"
160                         COMPILE_DEFINITIONS NINJA_PYTHON="python"
161         )
162 endif()

Regards,
Peter

>
> Regards,
> Yegor
>
> > Regards,
> > Peter
> >
> > >
> > > Reviewed-by: Yegor Yefremov <yegorslists@googlemail.com>
> > >
> > > Regards,
> > > Yegor
> > >
> > > > ---
> > > > Changes v1 -> v2:
> > > >   - really use COMPILE_FLAGS (as the patch subject says)
> > > >     (suggested by Yegor Yefremov)
> > > > ---
> > > >  ...onform-COMPILE_FLAGS-instead-of-3.15.patch | 27 +++++++++++++++++++
> > > >  1 file changed, 27 insertions(+)
> > > >  create mode 100644 package/ninja/0004-use-cmake-3.10-conform-COMPILE_FLAGS-instead-of-3.15.patch
> > > >
> > > > diff --git a/package/ninja/0004-use-cmake-3.10-conform-COMPILE_FLAGS-instead-of-3.15.patch b/package/ninja/0004-use-cmake-3.10-conform-COMPILE_FLAGS-instead-of-3.15.patch
> > > > new file mode 100644
> > > > index 0000000000..d92959a938
> > > > --- /dev/null
> > > > +++ b/package/ninja/0004-use-cmake-3.10-conform-COMPILE_FLAGS-instead-of-3.15.patch
> > > > @@ -0,0 +1,27 @@
> > > > +From 71840d514511291410d514790c25956be9d4dfe5 Mon Sep 17 00:00:00 2001
> > > > +From: Peter Seiderer <ps.report@gmx.net>
> > > > +Date: Thu, 10 Dec 2020 20:29:19 +0100
> > > > +Subject: [PATCH] use cmake-3.10 conform COMPILE_FLAGS instead of 3.15
> > > > + INCLUDE_DIRECTORIES property
> > > > +
> > > > +Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> > > > +---
> > > > + CMakeLists.txt | 2 +-
> > > > + 1 file changed, 1 insertion(+), 1 deletion(-)
> > > > +
> > > > +diff --git a/CMakeLists.txt b/CMakeLists.txt
> > > > +index 7f03c35..f582d2f 100644
> > > > +--- a/CMakeLists.txt
> > > > ++++ b/CMakeLists.txt
> > > > +@@ -156,7 +156,7 @@ if(platform_supports_ninja_browse)
> > > > +       set_source_files_properties(src/browse.cc
> > > > +               PROPERTIES
> > > > +                       OBJECT_DEPENDS "${CMAKE_BINARY_DIR}/build/browse_py.h"
> > > > +-                      INCLUDE_DIRECTORIES "${CMAKE_BINARY_DIR}"
> > > > ++                      COMPILE_FLAGS "-I${CMAKE_BINARY_DIR}"
> > > > +                       COMPILE_DEFINITIONS NINJA_PYTHON="python"
> > > > +       )
> > > > + endif()
> > > > +--
> > > > +2.29.2
> > > > +
> > > > --
> > > > 2.29.2
> > > >
> > > _______________________________________________
> > > buildroot mailing list
> > > buildroot at busybox.net
> > > http://lists.busybox.net/mailman/listinfo/buildroot
> >
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

  parent reply	other threads:[~2020-12-11 19:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-10 21:54 [Buildroot] [RFC v2] package/ninja: fix to be cmake-3.10 compatible again Peter Seiderer
2020-12-11  5:37 ` Yegor Yefremov
2020-12-11 18:38   ` Peter Seiderer
2020-12-11 19:20     ` Yegor Yefremov
2020-12-11 19:21       ` Yegor Yefremov
2020-12-11 19:37       ` Peter Seiderer [this message]
2020-12-11 22:38         ` Yegor Yefremov
2020-12-12 11:41           ` Yegor Yefremov
2020-12-12 20:59             ` Peter Seiderer

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=20201211203753.17c902f0@gmx.net \
    --to=ps.report@gmx.net \
    --cc=buildroot@busybox.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox