g+
g+ Communities
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  <20122013  2014  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014 
<== Date ==> <== Thread ==>

Subject: Re: Build problem with db dependencies
From: Bruce Hill <bhill@slac.stanford.edu>
To: Emma Shepherd <Emma.Shepherd@synchrotron.org.au>
Cc: "tech-talk@aps.anl.gov" <tech-talk@aps.anl.gov>
Date: Tue, 20 Mar 2012 20:24:39 -0700
Thanks Emma!
Looks like we didn't have this problem with 3.14.9
as makeDbDepends.pl was creating dependency
files with no dependencies.

Cheers!
- Bruce

On 03/19/2012 11:00 PM, Emma Shepherd wrote:
Hi Bruce,

Good timing - I just ran into the same problem today!  I agree, it's a pain to have to run 'make rebuild' every time.  Thanks for the patch, that works for me too.

Cheers,

Emma

-----Original Message-----
From: tech-talk-bounces@aps.anl.gov [mailto:tech-talk-bounces@aps.anl.gov] On Behalf Of Bruce Hill
Sent: Saturday, 18 February 2012 11:31 AM
To: tech-talk@aps.anl.gov
Subject: Build problem with db dependencies

Has anyone else run into a build dependency problem with base-3,14,12?

What I've been finding is that I can build an IOC or module that depends on
*.db or *.template files from another module successfully the first time, but
it fails on subsequent builds.

Example build output:
% make
perl /reg/g/pcds/package/epics/3.14/base/R3.14.12-0.4.0/bin/linux-x86_64/makeMakefile.pl O.linux-x86_64 ../../..
perl /reg/g/pcds/package/epics/3.14/base/R3.14.12-0.4.0/bin/linux-x86_64/makeMakefile.pl O.RTEMS-beatnik ../../..
perl /reg/g/pcds/package/epics/3.14/base/R3.14.12-0.4.0/bin/linux-x86_64/makeMakefile.pl O.linux-x86 ../../..
mkdir O.Common
/usr/bin/make -C O.linux-x86_64 -f ../Makefile TOP=../../.. T_A=linux-x86_64 install
make[1]: Entering directory `/reg/neh/home/bhill/wa2/epics/iocTest/test-R3.14.12/evr1/myEvrApp/Db/O.linux-x86_64'
perl /reg/g/pcds/package/epics/3.14/base/R3.14.12-0.4.0/bin/linux-x86_64/makeDbDepends.pl ../O.Common/iocAdmin.db ../iocAdmin.substitutions>>  iocAdmin.db.d
echo "../O.Common/iocAdmin.db : ">>  iocAdmin.db.d
Inflating database from ../iocAdmin.substitutions
/reg/g/pcds/package/epics/3.14/extensions/current/bin/linux-x86/msi   -I. -I.. -I../O.Common -I ../../../db     -I/reg/g/pcds/package/epics/3.14/base/R3.14.12-0.4.0/db     -I/reg/g/pcds/package/epics/3.14/modules/autosave/R4.2.1.2-2.7.0/db -I/reg/g/pcds/package/epics/3.14/modules/iocAdmin/R3.0.0-1.6.0/db -I/reg/neh/home/bhill/wa2/trunk/pcds/epics/modules/event/current/db  -S../iocAdmin.substitutions>  iocAdmin.tmp
mv iocAdmin.tmp ../O.Common/iocAdmin.db
perl /reg/g/pcds/package/epics/3.14/base/R3.14.12-0.4.0/bin/linux-x86_64/makeDbDepends.pl ../O.Common/evr.db ../evr.substitutions>>  evr.db.d
echo "../O.Common/evr.db : ">>  evr.db.d
Inflating database from ../evr.substitutions
/reg/g/pcds/package/epics/3.14/extensions/current/bin/linux-x86/msi   -I. -I.. -I../O.Common -I ../../../db     -I/reg/g/pcds/package/epics/3.14/base/R3.14.12-0.4.0/db     -I/reg/g/pcds/package/epics/3.14/modules/autosave/R4.2.1.2-2.7.0/db -I/reg/g/pcds/package/epics/3.14/modules/iocAdmin/R3.0.0-1.6.0/db -I/reg/neh/home/bhill/wa2/trunk/pcds/epics/modules/event/current/db  -S../evr.substitutions>  evr.tmp
mv evr.tmp ../O.Common/evr.db
Installing created db file ../../../db/iocAdmin.db
Installing created db file ../../../db/evr.db
make[1]: Leaving directory `/reg/neh/home/bhill/wa2/epics/iocTest/test-R3.14.12/evr1/myEvrApp/Db/O.linux-x86_64'
/usr/bin/make -C O.RTEMS-beatnik -f ../Makefile TOP=../../.. T_A=RTEMS-beatnik install
make[1]: Entering directory `/reg/neh/home/bhill/wa2/epics/iocTest/test-R3.14.12/evr1/myEvrApp/Db/O.RTEMS-beatnik'
make[1]: Nothing to be done for `install'.
make[1]: Leaving directory `/reg/neh/home/bhill/wa2/epics/iocTest/test-R3.14.12/evr1/myEvrApp/Db/O.RTEMS-beatnik'
/usr/bin/make -C O.linux-x86 -f ../Makefile TOP=../../.. T_A=linux-x86 install
make[1]: Entering directory `/reg/neh/home/bhill/wa2/epics/iocTest/test-R3.14.12/evr1/myEvrApp/Db/O.linux-x86'
make[1]: Nothing to be done for `install'.
make[1]: Leaving directory `/reg/neh/home/bhill/wa2/epics/iocTest/test-R3.14.12/evr1/myEvrApp/Db/O.linux-x86'
(232) 04:29 PM psusr115:~/wa2/epics/iocTest/test-R3.14.12/evr1/myEvrApp/Db
% make
/usr/bin/make -C O.linux-x86_64 -f ../Makefile TOP=../../.. T_A=linux-x86_64 install
make[1]: Entering directory `/reg/neh/home/bhill/wa2/epics/iocTest/test-R3.14.12/evr1/myEvrApp/Db/O.linux-x86_64'
make[1]: *** No rule to make target `ioc.db', needed by `../O.Common/iocAdmin.db'.  Stop.
make[1]: Leaving directory `/reg/neh/home/bhill/wa2/epics/iocTest/test-R3.14.12/evr1/myEvrApp/Db/O.linux-x86_64'
make: *** [install.linux-x86_64] Error 2

The first build succeeds because RELEASE_DBFLAGS has a list of -I directives
which includes the released iocAdmin module's db dir, so msi is able to use that
to successfully build my iocAdmin.db file.

The problem arises because the first build also creates a dependency file
for iocAdmin.db using makeDbDepends.pl that looks like this.

% cat O.linux-x86_64/iocAdmin.db.d
../O.Common/iocAdmin.db: ioc.db access.db iocCluster.db
../O.Common/iocAdmin.db :


Subsequent builds fail because ioc.db is over in the released iocAdmin  module's db dir,
which doesn't end up on the vpath for .db files.

I think I have a fix for it, but I can't figure out why this hasn't been a problem for us
and others before now.

I'd like to avoid customizing my base configure files to the extent possible,
but these changes seem to fix the problem.

% svn diff
Index: CONFIG_APP_INCLUDE
===================================================================
--- CONFIG_APP_INCLUDE  (revision 8621)
+++ CONFIG_APP_INCLUDE  (working copy)
@@ -16,6 +16,8 @@
     RELEASE_INCLUDES += $$(addprefix -I,$$(wildcard $$(strip $$($(1)))/include))
     RELEASE_DBDFLAGS += $$(addprefix -I,$$(wildcard $$(strip $$($(1)))/dbd))
     RELEASE_DBFLAGS += $$(addprefix -I,$$(wildcard $$(strip $$($(1)))/db))
+  RELEASE_DIRS_DBD += $$(wildcard $$(strip $$($(1)))/dbd)
+  RELEASE_DIRS_DB  += $$(wildcard $$(strip $$($(1)))/db)
     RELEASE_PERL_MODULE_DIRS += $$(wildcard $$($(1)_LIB)/perl)
   endef
   $(foreach top, $(RELEASE_TOPS), $(eval $(call RELEASE_FLAGS_template,$(top)) ))
Index: RULES.Db
===================================================================
--- RULES.Db    (revision 8757)
+++ RULES.Db    (working copy)
@@ -11,10 +11,10 @@
   #####################################################  vpath

   vpath %.dbd $(USR_VPATH) $(GENERIC_SRC_DIRS) $(dir $(DBD))
-vpath %.db $(USR_VPATH) $(GENERIC_SRC_DIRS) $(dir $(DB))
-vpath %.vdb $(USR_VPATH) $(GENERIC_SRC_DIRS) $(dir $(DB))
+vpath %.db $(USR_VPATH) $(GENERIC_SRC_DIRS) $(dir $(DB)) $(RELEASE_DIRS_DB)
+vpath %.vdb $(USR_VPATH) $(GENERIC_SRC_DIRS) $(dir $(DB)) $(RELEASE_DIRS_DBD)
   vpath %.substitutions $(USR_VPATH) $(GENERIC_SRC_DIRS) $(COMMON_DIR)
-vpath %.template $(USR_VPATH) $(GENERIC_SRC_DIRS) $(COMMON_DIR)
+vpath %.template $(USR_VPATH) $(GENERIC_SRC_DIRS) $(COMMON_DIR) $(RELEASE_DIRS_DB)
   vpath bpt%.data $(USR_VPATH) $(GENERIC_SRC_DIRS) $(COMMON_DIR)
   vpath %.acf $(USR_VPATH) $(GENERIC_SRC_DIRS) $(COMMON_DIR)
   vpath %.acs $(USR_VPATH) $(GENERIC_SRC_DIRS) $(COMMON_DIR)


Any comments would be appreciated.
Thanks,
- Bruce


<br>This message and any attachments may contain proprietary or confidential information. If you are not the intended recipient or you received the message in error, you must not use, copy or distribute the message. Please notify the sender immediately and destroy the original message. Thank you.

--
Bruce Hill
Member Technical Staff
SLAC National Accelerator Lab
2575 Sand Hill Road M/S 10
Menlo Park, CA  94025


References:
Build problem with db dependencies Bruce Hill
RE: Build problem with db dependencies Emma Shepherd

Navigate by Date:
Prev: Re: menuFtype for 64 bit integers aka. long long and unsigned long long Andrew Johnson
Next: RE: 32-bit TIFFs and PIL Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014 
Navigate by Thread:
Prev: Re: Build problem with db dependencies Bruce Hill
Next: Obsolete code in configure/os/CONFIG.Common.linux-arm michael.abbott
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014 
ANJ, 18 Nov 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICSv4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·