[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XEN PATCH] tools: Have flex and bison mandatory


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Date: Tue, 7 Feb 2023 18:02:45 +0000
  • Authentication-results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Wei Liu <wl@xxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 07 Feb 2023 18:05:06 +0000
  • Ironport-data: A9a23:BfHsj6IeTj948OSpFE+R7JUlxSXFcZb7ZxGr2PjKsXjdYENSgzYDy GIaC2nXPvmJYGvyfNwgbYvlpE4AscDVzt9hQANlqX01Q3x08seUXt7xwmUcnc+xBpaaEB84t ZV2hv3odp1coqr0/0/1WlTZhSAgk/rOHvykU7Ss1hlZHWdMUD0mhQ9oh9k3i4tphcnRKw6Ws Jb5rta31GWNglaYCUpJrfPcwP9TlK6q4mhA5ARhPakjUGL2zBH5MrpOfcldEFOgKmVkNrbSb /rOyri/4lTY838FYj9yuu+mGqGiaue60Tmm0hK6aYD76vRxjnVaPpIAHOgdcS9qZwChxLid/ jnvWauYEm/FNoWU8AgUvoIx/ytWZcWq85efSZSzXFD6I+QrvBIAzt03ZHzaM7H09c5GQnsVr PEICQwLSSGgm8SGwfGfFsNz05FLwMnDZOvzu1llxDDdS/0nXYrCU+PB4towMDUY354UW6yEP oxANGQpNU6bC/FMEg5/5JYWleG0hn75YntApUicv6Yf6GnP1g1hlrPqNbI5f/TbGZQMwRrE+ goq+UzSWCsdK/qFxwGm737vqP3Gkjr5e6MrQejQGvlC3wTImz175ActfVmxrOS9i0W+c8lCM EFS8S0rxYAt8GS7Q9+7WAe3yFaGsQQbQMF4CPAh5UeGza+8yxaUAC0IQyBMbPQitdQqXno62 1mRhdTrCDdz9rqPRhq1/6+ZtzqoNQAJLGUJYmkPSg5t3jX4iNht1FSVFI8lSfPryISvQlkc3 gxmsgAPxK9I1MMb9pm92mHknxScp9vtEiQqs1C/sn2e0it1Y4usZoqN4Ffd7OpdIIvxcmRtr EToiODFsrlQUMjleDilBbxUQer3v6rt3Cj02wYHInU3y9i6F5dPl6h06So2GkpmO91sldTBM B6K4lM5CHO+0RKXgU5Lj2CZUZxCIUvIT46NuhXogj1mPPBMmPevpn0GWKJp9zmFfLIQua8+I 4yHVs2nEGwXD69qpBLvGbhAjud7mnhhmTmJLXwe8/hA+ePPDEN5tJ9faAfeBgzHxPPsTPrpH yZ3aJLRlkQ3vBzWaSjL648DRW3m3lBiba0aX/d/L7bZSiI/QTFJNhMk6e95E2CTt/gPx7igE 7DUchMw9WcTclWddljXNC44Nem/NXu9xFpiVRER0Z+T8yBLSe6SAG03LsNtFVX73ISPFcJJc sQ=
  • Ironport-hdrordr: A9a23:FjDRfa/yDN0LIMd4Maxuk+AiI+orL9Y04lQ7vn2ZKSY5TiVXra CTdZUgpHvJYVMqMk3I9uruBEDtex3hHP1OkOws1NWZLWrbUQKTRekP0WKL+Vbd8kbFh4xgPM lbEpSXCLfLfCVHZcSR2njFLz73quP3j5xBho3lvglQpRkBUdAG0+/gYDzraXGfQmN9dPwEPa vZ3OVrjRy6d08aa8yqb0N1JdQq97Xw5evbiQdtPW9e1DWz
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Tue, Feb 07, 2023 at 06:03:12PM +0100, Jan Beulich wrote:
> On 07.02.2023 17:09, Anthony PERARD wrote:
> > Both are already mandatory to build the hypervisor.
> 
> I'm not sure this is sufficient as a justification. From all we can
> tell even pretty old tool versions are okay for kconfig's purposes.
> However, pretty recently I've learned that some linker script language
> construct used for GNU ld runs into a bug in certain (old) versions of
> flex. Use of that construct will then cause an (almost?) infinite loop
> in ld. Therefore the question is whether libxlu's uses are immune to
> such issues (along the lines of kconfig apparently being).
> 
> That said - I'm happy about the change in principle; if so desired we
> could simply see if anyone ever runs into an issue, and revert if need
> be. Nevertheless I'm not convinced it'll address the problem Andrew
> had noticed in CI (and where the consideration to remove the generated

Indeed, it won't fix the issue.

> files originated). It is likely to mask the issue in CI (simply
> because, aiui, there are no incremental builds done there), but that
> won't prevent people running into it on other occasions.


> > This will help avoid cases where the *.y or *.l files are been updated
> > but flex and bison aren't available.
> 
> This is odd: How will this "help"? Right now the build ought to fail
> (it doesn't, there's merely a warning, which might be easily missed).
> With your change configure will fail when the tools aren't there.

The scenario I was thinking about is when someone edit the *.l source
file, and try to rebuild without flex been installed. It might take
sometime to find-out that the reason change aren't taken into account is
because flex is missing. At least there's a warning, but it is buried
within the rest of the build log.

> > This also remove the way the missing binaries are been handled, with
> > double-column-rules, which might be an issue sometime.
> 
> These double-colon rules should never have been introduced. Double
> colons have a different meaning ("terminal rule") for pattern rules.
> In fact they were my initial suspects when looking into that odd build
> failure in CI.

After some more investigation, I don't think anymore the double-colon
rules here is an issue.

I think the issue that Andrew saw in the CI with "libxlu_cfg_y.o"
failing to build while "libxlu_cfg_l.[ch]" are been regenerated is
probably because make doesn't consider "libxlu_cfg_l.[ch]" as a group of
targets.

If for some reason we have:
    libxlu_cfg_l.h newer than libxlu_cfg_l.l newer than libxlu_cfg_l.c

Then make seems to take two parallel decision:
    When building libxlu_cfg_y.o:
        libxlu_cfg_l.h is newer than libxlu_cfg_l.l
        -> libxlu_cfg_l.h is up-to-date, start building libxlu_cfg_y.o
    When building libxlu_cfg_l.o:
        libxlu_cfg_l.c is older than libxlu_cfg_l.l
        -> we need to generate libxlu_cfg_l.c first
Then, libxlu_cfg_y.o fails to build because libxlu_cfg_l.h is been
updated do to the parallel build of libxlu_cfg_l.o.

I can easily reproduce the issue with:
    touch libxlu_cfg_l.c; sleep .1; touch libxlu_cfg_l.l; sleep .1;
    touch libxlu_cfg_l.h; sleep .1; make -j
And having "sleep 1" in "%.c %.h: %.l" recipe, between `rm` and `flex`.

I don't know how to properly fix this yet.
Event writing "%.c %.h &: %.l" doesn't work, with make 4.3, which is
supposed to be grouped targets. But that's is maybe fixed in 4.4.


> > Adding ".SECONDARY:" to avoid "libxlu_cfg_y.c" been deleted by make
> > when building the library, and regenerating the file on the first
> > incremental build.
> 
> While probably okay here, I'd still like to ask: Are you sure you
> don't want to specify the files we care about, rather than applying it
> to everything (by leaving blank the right side of the colon)?

I guess it would be better to specify each targets.

Thanks,

-- 
Anthony PERARD



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.