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  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: seq: benign(?) error message when building with R3.15
From: Andrew Johnson <[email protected]>
To: Benjamin Franksen <[email protected]>
Cc: [email protected]
Date: Thu, 28 Feb 2013 18:11:44 -0600
Hi Benjamin,

On 2013-02-28 Benjamin Franksen wrote:
> with the latest snapshot (http://www-
> csr.bessy.de/control/SoftDist/sequencer/releases/seq-snapshot-latest.tar.gz
>  or darcs get
>  http://www-csr.bessy.de/control/SoftDist/sequencer/repo/branch-2-1/ ) I
>  can build the sequencer reliably under 3.15.0.1 (all patches applied),
>  even with parallel make. however, I get a spurious message saying
> 
>   Can't find file 'vxTestHarnessRegistrars.dbd'
> 
> that I do not understand and do not get with base 3.14.12.2. It looks as if
> the build is ok despite the message (make runtests runs through just fine),
> but if you have a hint how to get rid of the message I'd be glad.

I get several different issues.  Using the latest 3.15 branch code and a 
serial build the first error I saw was this:

/usr/bin/g++ -o decl  -L/home/phoebus3/ANJ/epics/modules/soft/seq-
snapshot-2013-02-28/lib/linux-x86_64 -
L/home/phoebus3/ANJ/epics/base/mirror-3.15/lib/linux-x86_64 -Wl,-
rpath,/home/phoebus3/ANJ/epics/modules/soft/seq-snapshot-2013-02-28/lib/linux-
x86_64 -Wl,-rpath,/home/phoebus3/ANJ/epics/base/mirror-3.15/lib/linux-x86_64       
-m64 decl.o -lseqSoftIoc -lseq -lpv -ldbRecStd -ldbCore -lca -lCom   
decl.o: In function `main':
/home/phoebus3/ANJ/epics/modules/soft/seq-
snapshot-2013-02-28/test/validate/O.linux-x86_64/../seqMain.c:118: undefined 
reference to `seqSoftIoc_registerRecordDeviceDriver'
collect2: ld returned 1 exit status
make[3]: *** [decl] Error 1
make[3]: Leaving directory `/home/phoebus3/ANJ/epics/modules/soft/seq-
snapshot-2013-02-28/test/validate/O.linux-x86_64'

I immediately went to the test/validate directory and ran make there.
    tux% make
    make: `vxTestHarness.db' is up to date.
Huh?  In the O.linux-x86_64 directory I get the same seqMain error from above.

This is happening because in your test/validate/Makefile the rule for 
vxTestHarness.db$(DEP) appears *above* the "include $(TOP)/configure/RULES" 
line, contrary to the comment that follows.  All rules *must* go below that 
include or they interfere with the default rule.  You should probably check 
the other Makefiles for that too, I haven't looked.

With that issue out of the way, the seqMain error is happening because my 3.15 
build has gcc's -fvisibility=hidden flag set.  That makes it essential to 
properly decorate all symbols that are going to be exported from a shared 
library, thus matching the behavior of DLLs built on Windows.  Unfortunately 
the generated seqSoftIoc_registerRecordDeviceDriver() function is not (and 
can't be) decorated, so it's not actually possible to link it from a library.  
You have to link the .o file directly into each of your executables instead.

I removed the seqSoftIoc library from your Makefile and added the magic to set
    xxx_SRCS = xxx.st $(seqSoftIoc_SRCS)
for all your test programs.

Ok, Finally I can see your error:
    tux% make -sj4
    Can't find file 'vxTestHarnessRegistrars.dbd'
    tux%
Where is it coming from?  Well if I run a serial make and look at the output 
it occurs here:

perl -CSD /home/phoebus/ANJ/epics/base/mirror-3.15/bin/linux-
x86_64/makeIncludeDbd.pl base.dbd ../O.Common/vxTestHarnessRegistrars.dbd 
vxTestHarnessInclude.dbd
Can't find file 'vxTestHarnessRegistrars.dbd'
make[1]: Leaving directory `/home/phoebus3/ANJ/epics/modules/soft/seq-
snapshot-2013-02-28/test/validate/O.linux-x86_64'
make[1]: Entering directory `/home/phoebus3/ANJ/epics/modules/soft/seq-
snapshot-2013-02-28/test/validate/O.linux-x86_64'

The fact that this came from the first build pass (when GNUmake says "Leaving" 
followed by "Entering" the same directory) usually indicates that it's a 
problem generating a dependency file, and in this case you don't have a rule 
to generate the vxTestHarness.dbd$(DEP) file.  If I add that as well the error 
goes away:

    tux% make clean
    rm -rf O.linux-x86_64 O.vxWorks-ppc604_long O.vxWorks-ppc32
     O.vxWorks-ppc32sf O.RTEMS-uC5282 O.Common
    tux% make -sj4
    tux%

I also ran the tests on linux-x86_64, which all passed BTW.

You don't need to set USR_DBDFLAGS for 3.15 so I commented it out, but I guess 
it may be necessary for some earlier release of Base.

Patch file attached, but I only tried this with the latest 3.15 branch.

- Andrew
-- 
There is no such thing as a free lunch.  When invited for lunch,
it is best to check if you are there to eat, or to be eaten.
-- Clive Robinson
--- Makefile.orig	2013-02-28 15:30:52.362346140 -0600
+++ Makefile	2013-02-28 18:02:16.091655151 -0600
@@ -62,20 +62,14 @@
 #TESTPROD_HOST += ctest
 
 #  Libraries
-PROD_LIBS += seqSoftIoc
 PROD_LIBS += seq pv
 PROD_LIBS += $(EPICS_BASE_IOC_LIBS)
 
-LIBRARY += seqSoftIoc
-
 DBD += seqSoftIoc.dbd
 seqSoftIoc_DBD += base.dbd
 
 seqSoftIoc_SRCS += seqSoftIoc_registerRecordDeviceDriver.cpp
 
-seqSoftIoc_LIBS += seq pv
-seqSoftIoc_LIBS += $(EPICS_BASE_IOC_LIBS)
-
 ifeq '$(EPICS_HAS_UNIT_TEST)' '1'
 seqSoftIoc_SRCS += testSupport.c
 
@@ -91,15 +85,17 @@
 vxTestHarness_DBD += base.dbd
 vxTestHarness_DBD += $(COMMON_DIR)/vxTestHarnessRegistrars.dbd
 
-USR_DBDFLAGS += -I $(COMMON_DIR)
-
-TOUCH = $(PERL) -MExtUtils::Command -e touch
+# USR_DBDFLAGS += -I $(COMMON_DIR)
 
 DB += vxTestHarness.db
-vxTestHarness.db$(DEP):
-	$(TOUCH) $@
 endif
 
+define template_SRCS
+$(1)_SRCS += $(1).st $(seqSoftIoc_SRCS)
+endef
+$(foreach st, $(TESTPROD_HOST), $(eval $(call template_SRCS,$(st))))
+
+
 # PROD_RTEMS = rtemsTestHarness
 # rtemsTestHarness_SRCS += $(TESTPROD_HOST::%=%.st)
 
@@ -109,6 +105,13 @@
 #----------------------------------------
 #  ADD RULES AFTER THIS LINE
 
+ifeq '$(EPICS_HAS_UNIT_TEST)' '1'
+vxTestHarness.db$(DEP):
+	@echo "$(COMMON_DIR)/vxTestHarness.db: ../Makefile" > $@
+vxTestHarness.dbd$(DEP):
+	@echo "$(COMMON_DIR)/vxTestHarness.dbd: ../Makefile" > $@
+endif
+
 SOFTIOC=$(EPICS_BASE_BIN)/softIoc$(HOSTEXE)
 SOFTDBD=$(EPICS_BASE)/dbd/softIoc.dbd
 

Replies:
Re: seq: benign(?) error message when building with R3.15 Benjamin Franksen
References:
seq: benign(?) error message when building with R3.15 Benjamin Franksen

Navigate by Date:
Prev: RE: Crystal Logic goniometer Mark Rivers
Next: 答复: Crystal Logic goniometer 汪启胜
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: seq: benign(?) error message when building with R3.15 Benjamin Franksen
Next: Re: seq: benign(?) error message when building with R3.15 Benjamin Franksen
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 20 Apr 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·