From: David Gibson <david@gibson.dropbear.id.au>
To: Claudio Fontana <cfontana@suse.de>
Cc: Peter Maydell <peter.maydell@linaro.org>,
Alex Bennee <alex.bennee@linaro.org>,
QEMU Developers <qemu-devel@nongnu.org>,
Laurent Vivier <laurent@vivier.eu>
Subject: Re: [PATCH] configure: check for bison, flex before dtc submodule build
Date: Wed, 8 Apr 2020 18:00:46 +1000 [thread overview]
Message-ID: <20200408080046.GD304335@umbus.fritz.box> (raw)
In-Reply-To: <1353d8a4-fe8b-ee8f-2f42-f1f463188767@suse.de>
[-- Attachment #1: Type: text/plain, Size: 5136 bytes --]
On Wed, Apr 08, 2020 at 09:52:40AM +0200, Claudio Fontana wrote:
> On 4/8/20 3:57 AM, David Gibson wrote:
> > On Tue, Apr 07, 2020 at 12:20:15PM +0100, Peter Maydell wrote:
> >> On Tue, 7 Apr 2020 at 12:16, Claudio Fontana <cfontana@suse.de> wrote:
> >>>
> >>> if fdt is required, and the system DTC (libfdt) is not usable,
> >>> check for the dtc submodule requirements before trying to build it,
> >>> and error out with a helpful message in case the dependencies are not met.
> >>>
> >>> Signed-off-by: Claudio Fontana <cfontana@suse.de>
> >>
> >> Does the dtc module actually need bison/flex, or does it just
> >> print an ugly warning about it? We only want the 'libfdt' part
> >> of dtc, which doesn't need the parser, we don't need to build
> >> the actual dtc compiler.
> >
> > Assuming we're just invoking "make libfdt" within the submodule,
> > rather than "make" which will build dtc as well, then bison / flex
> > shouldn't be needed.
> >
>
> Indeed; I just sent a patch that works for me,
> tried a few in-tree and out-of-tree full builds, and it seems to work as intended.
> patchew complains about docker builds/tests though, although running the same TEST SCRIPTs manually with docker works for me.
>
> The libfdt target inside dtc/Makefile actually causes more than just libfdt to be built:
>
> ~/git/qemu/dtc> make libdtc
> DEP tests/dumptrees.c
> DEP tests/trees.S
> DEP tests/testutils.c
> DEP tests/value-labels.c
> DEP tests/asm_tree_dump.c
> DEP tests/truncated_memrsv.c
> DEP tests/truncated_string.c
> DEP tests/truncated_property.c
> DEP tests/check_full.c
> DEP tests/check_header.c
> DEP tests/check_path.c
> DEP tests/overlay_bad_fixup.c
> DEP tests/overlay.c
> DEP tests/subnode_iterate.c
> DEP tests/property_iterate.c
> DEP tests/integer-expressions.c
> DEP tests/utilfdt_test.c
> DEP tests/path_offset_aliases.c
> DEP tests/add_subnode_with_nops.c
> DEP tests/dtbs_equal_unordered.c
> DEP tests/dtb_reverse.c
> DEP tests/dtbs_equal_ordered.c
> DEP tests/extra-terminating-null.c
> DEP tests/incbin.c
> DEP tests/boot-cpuid.c
> DEP tests/phandle_format.c
> DEP tests/path-references.c
> DEP tests/references.c
> DEP tests/string_escapes.c
> DEP tests/propname_escapes.c
> DEP tests/appendprop2.c
> DEP tests/appendprop1.c
> DEP tests/del_node.c
> DEP tests/del_property.c
> DEP tests/setprop.c
> DEP tests/set_name.c
> DEP tests/rw_tree1.c
> DEP tests/open_pack.c
> DEP tests/nopulate.c
> DEP tests/mangle-layout.c
> DEP tests/move_and_save.c
> DEP tests/sw_states.c
> DEP tests/sw_tree1.c
> DEP tests/nop_node.c
> DEP tests/nop_property.c
> DEP tests/setprop_inplace.c
> DEP tests/stringlist.c
> DEP tests/addr_size_cells2.c
> DEP tests/addr_size_cells.c
> DEP tests/notfound.c
> DEP tests/sized_cells.c
> DEP tests/char_literal.c
> DEP tests/get_alias.c
> DEP tests/node_offset_by_compatible.c
> DEP tests/node_check_compatible.c
> DEP tests/node_offset_by_phandle.c
> DEP tests/node_offset_by_prop_value.c
> DEP tests/parent_offset.c
> DEP tests/supernode_atdepth_offset.c
> DEP tests/get_path.c
> DEP tests/get_phandle.c
> DEP tests/getprop.c
> DEP tests/get_name.c
> DEP tests/path_offset.c
> DEP tests/subnode_offset.c
> DEP tests/find_property.c
> DEP tests/root_node.c
> DEP tests/get_mem_rsv.c
> DEP libfdt/fdt_overlay.c
> DEP libfdt/fdt_addresses.c
> DEP libfdt/fdt_empty_tree.c
> DEP libfdt/fdt_strerror.c
> DEP libfdt/fdt_rw.c
> DEP libfdt/fdt_sw.c
> DEP libfdt/fdt_wip.c
> DEP libfdt/fdt_ro.c
> DEP libfdt/fdt.c
> DEP util.c
> DEP fdtoverlay.c
> DEP fdtput.c
> DEP fdtget.c
> DEP fdtdump.c
> LEX convert-dtsv0-lexer.lex.c
> make: flex: Command not found
> DEP srcpos.c
> BISON dtc-parser.tab.c
> make: bison: Command not found
> LEX dtc-lexer.lex.c
> make: flex: Command not found
> DEP treesource.c
> DEP livetree.c
> DEP fstree.c
> DEP flattree.c
> DEP dtc.c
> DEP data.c
> DEP checks.c
> CHK version_gen.h
> LEX convert-dtsv0-lexer.lex.c
> make: flex: Command not found
> BISON dtc-parser.tab.c
> make: bison: Command not found
> LEX dtc-lexer.lex.c
> make: flex: Command not found
> make: *** No rule to make target 'libdtc'. Stop.
>
>
> so I just used dtc/libfdt/Makefile.libfdt directly and removed the
> recursion altogether.
The Makefile setup of dtc/libfdt is a bit weird (mostly to allow for
Makefile fragments to be used in weird build environments). But for
this case you might be better off still doing the recursion, but just
changing the target from 'all' to 'libfdt'.
> Let me know what you think about the idea in general, or if anybody knows what is wrong in the patch that makes patchew complain?
>
> Ciao,
>
> Claudio
>
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2020-04-08 8:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-07 11:16 [PATCH] configure: check for bison, flex before dtc submodule build Claudio Fontana
2020-04-07 11:20 ` Peter Maydell
2020-04-07 15:21 ` Claudio Fontana
2020-04-08 1:57 ` David Gibson
2020-04-08 7:52 ` Claudio Fontana
2020-04-08 8:00 ` David Gibson [this message]
2020-04-08 8:08 ` Claudio Fontana
2020-04-08 8:36 ` David Gibson
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=20200408080046.GD304335@umbus.fritz.box \
--to=david@gibson.dropbear.id.au \
--cc=alex.bennee@linaro.org \
--cc=cfontana@suse.de \
--cc=laurent@vivier.eu \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/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;
as well as URLs for NNTP newsgroup(s).