Hi Mike,
$(DEP) files should not go in $(COMMON_DIR), the rule should create them in the current (i.e. the O.<$(T_A)>) directory.
You also have to be careful when creating files in $(COMMON_DIR); during a parallel build two different copies of GNUmake building for different targets may try generate the same file at the same time, and depending on the how it is generated that might fail.
Most of our rules that do that now generate a file inside the O.$(T_A) directory and then $(MOVE) it into $(COMMON_DIR) since the latter is an atomic operation.
- Andrew
On 9/24/19 3:29 PM, Michael Westfall via Tech-talk wrote:
Thanks for your help, Andrew!
With what you told me, I was eventually able to figure out I needed to add the following rule to our custom set of rules:
# This is necessary in R3.15.x as a consequence of TDCT producing .db files directly
$(COMMON_DIR)/%.db$(RAW)$(DEP): $(COMMON_DIR)/%.db$(RAW)
@$(RM) $@
$(MSI3_15) -D $(DBFLAGS) -o $(COMMONDEP_TARGET) $< > $@
Although, I now get complaints about circular dependencies being dropped that I don't yet understand:
make[3]: Circular ../O.Common/bctest.db <- ../O.Common/bctest.db dependency dropped.
Hi Michael,
> On Sep 24, 2019, at 9:40 AM, Michael Westfall via Tech-talk <[email protected]> wrote:
>
> I have installed EPICS R3.15.6 here and now when I compile a support module, it fails with this:
> --------------
> ...
> Installing created db file ../../../db/bctest.db
> /gem_sw/epics/R3.15.6/base/configure/RULES.Db:521: Building ../../../db/bctest.db (from ../O.Common/bctest.db) (../O.Common/bctest.db newer)
> + perl -CSD /gem_sw/epics/R3.15.6/base/bin/linux-x86_64/installEpics.pl -d -m 444 ../O.Common/bctest.db ../../../db
> mkdir ../../../db
> make[3]: *** No rule to make target `bctest.db.d', needed by `build'. Stop.
> make[3]: Leaving directory `/home/mwestfall/bancomm/bancommApp/Db/O.linux-x86_64’
> ...
> --------
> I imagine this might have something to do with our custom rules that we add in here at Gemini, but I'm not seeing how.
> Any pointers as to where I should be looking to figure out why the bctest.db.d file is not being created?
The build rules changed between 3.14 and 3.15 specifically for $(DEP) = .d files; previously we would create a .d file in the same rule as the target itself and the build didn’t worry if there was no .d file. Since 3.15 we have a separate set of rules for creating
.d files – look for the rules for targets %.db$(RAW)$(DEP) in Base/configure/RULES.Db and make sure you have equivalents in your ruleset.
Note that 3.15 comes with a newer version of the msi program which was required to generate .d files. In the build this is referred to with $(MSI3_15) since the older msi $(MSI) from extensions is not compatible. The associated changes may be what you’re missing.
IIRC there were quite a lot of changes to the build system between 3.14 and 3.15, I hope you have looked at those while updating your ruleset.
HTH,
- Andrew
--
Mike Westfall
Control Systems Software Engineer
--
Complexity comes for free, Simplicity you have to work for.
|