EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  <20222023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  <20222023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Makefile rule differences with base 3.14 vs 3.15+ in ADCore build with pvi
From: "Yendell, Gary \(DLSLtd, RAL, LSCI\) via Tech-talk" <tech-talk at aps.anl.gov>
To: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>, Andrew Johnson <anj at anl.gov>
Date: Fri, 12 Aug 2022 17:03:38 +0000
Hi Andrew,

pvi is entirely optional for the user of a support module - it only needs to be used by the developers. If ADCore is built and pvi is available, then it will generate the files and then they can be checked in and released as normal. If it is not available, i.e. when other sites are importing it, then it will just build against the checked in files as it normally would. This is done by an optional include in the Makefiles in ADCore. It only will go into ADCore if we can convince Mark that it is a good idea. Your suggestion to copy the way sequencer does this is interesting - it would make things a bit neater. We will investigate that.

---

Adding an empty rule for a template.d file with a dependency on the yaml file fixes the second problem, but not the first problem. Testing in a local EPICS7 container locally, I have tried to insert the .template dependency on the yaml into the .d file like so:

%Parameters.template$(DEP): $(TOP)/pvi/%.pvi.producer.yaml
      @$(RM) $@
      echo "%Parameters.template: $(TOP)/pvi/%.pvi.producer.yaml" > $@

as that is what it looks like some of the other .d files in ADCore do, but it doesn't make a difference. I am not sure how the content of the template.d file would help because it doesn't run the rule for the template.d file when the template already exists.

I notice that when I build without the file so that it is generated, then touching the file causes it to be regenerated. This is because the template file then exists in ADApp/Db/O.linux-x86_64 - if I delete that file then it stops working again. Is that a clue?

Cheers,
Gary

From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Andrew Johnson via Tech-talk <tech-talk at aps.anl.gov>
Sent: 11 August 2022 00:19
To: tech-talk at aps.anl.gov <tech-talk at aps.anl.gov>
Subject: Re: Makefile rule differences with base 3.14 vs 3.15+ in ADCore build with pvi
 
Hi Gary,

On 8/10/22 7:35 AM, Yendell, Gary (DLSLtd, RAL, LSCI) via Tech-talk wrote:

I am currently working on a proposed change to ADCore to use pvi to generate template and header files during the build.


Why should that go into ADCore? You would appear to be adding a dependency which (currently at least) only your site might need. The EPICS build system allows support modules to publish CONFIG_* and RULES_* files that downstream modules (i.e. other modules that point to this module in their configure/RELEASE file) will include automatically, although some aspects of that did change slightly somewhere in the 3.14-3.15 timescale. I would recommend you look into making your changes in a way that downstream IOCs only need to add your module to obtain the additional build functionality. The EPICS State Notation Compiler/Sequencer module does this in its more recent releases, look at its cfg/RULES_SNCSEQ file for one of the earlier examples, and ask here for more details if you do go this route.

BTW I know nothing about pvi, we don't use it here so some things in my answer may reflect my ignorance about what it does.

This works on 3.14 locally and in GitHub Actions with ci-scripts. The files are generated during the build, and it completes. If I change a yaml file only the relevant files are regenerated and rebuilt against. However, in CI on 3.15 (and 7) I see two problems.


1. Rules are not being run to regenerate existing files even though the sources are newer than the targets.

When the files exist, it does not consider the yaml file as a pre-requisite at all in 3.15, where it does in 3.14, so it just installs the existing file. The rules do run on 3.15 if the targets do not exist at all, but in a preliminary step before the rule for installing to db/ - see here.


Is it because of slightly strange rules to generate the files in the source location and then copy them? Maybe the dependency isn't tracked properly in 3.15? The pvi rules are defined here.


One major change in the build system between 3.14 and 3.15 was that in 3.15 and beyond we expect anyone adding build rules to also provide rules for creating dependency $(DEP) i.e. .d files for their build targets. You might need some conditionals to only enable those dependency rules on 3.15 and later builds, but they are easy to add. I think this is probably causing both problems that you're seeing, you need to provide rules to create your template.d files, and when you do that you can include the yaml file(s) as one of the dependencies, which will then cause later modifications to that file to run the regeneration rules automatically.

You can compare the equivalent sections of the Base/configure/RULES_BUILD files for examples of creating the $(DEP) files.

HTH,

- Andrew
-- 
Complexity comes for free, Simplicity you have to work for.

 

-- 

This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail.
Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd.
Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.
Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom
 


Replies:
Re: Makefile rule differences with base 3.14 vs 3.15+ in ADCore build with pvi Michael Davidsaver via Tech-talk
References:
Makefile rule differences with base 3.14 vs 3.15+ in ADCore build with pvi Yendell, Gary (DLSLtd, RAL, LSCI) via Tech-talk
Re: Makefile rule differences with base 3.14 vs 3.15+ in ADCore build with pvi Andrew Johnson via Tech-talk

Navigate by Date:
Prev: forcing rpath Pierrick M Hanlet via Tech-talk
Next: CSS spinner and text box instant write Wang, Andrew via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  <20222023  2024 
Navigate by Thread:
Prev: Re: Makefile rule differences with base 3.14 vs 3.15+ in ADCore build with pvi Andrew Johnson via Tech-talk
Next: Re: Makefile rule differences with base 3.14 vs 3.15+ in ADCore build with pvi Michael Davidsaver via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  <20222023  2024 
ANJ, 14 Sep 2022 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·