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  <20152016  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  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: FW: Sequencer problem :iocBuild: Aborting, bad database definition (DBD)! [Solved]
From: Mark Rivers <[email protected]>
To: EPICS Tech-Talk <[email protected]>
Date: Thu, 6 Aug 2015 20:03:15 +0000
Just posting this to tech-talk so everyone knows the solution.

Mark

________________________________
From: Tasaddaq Khan [[email protected]]
Sent: Thursday, August 06, 2015 3:02 PM
To: Mark Rivers
Subject: Re: Sequencer problem :iocBuild: Aborting, bad database definition (DBD)! [Solved]

Thanks Mark, it solved with your suggestion.

On Thu, Aug 6, 2015 at 11:30 PM, Mark Rivers <[email protected]<mailto:[email protected]>> wrote:
I think I see your problem.  You named your SNL program test1.st<http://test1.st>.  You then have this line in your Makefile:

    test1_DBD += test1.dbd

So you have 2 dbd files with the same name, but different functions.  One should be your application dbd file, and the other the dbd file that just contains only the registrar definition for your SNL program.

I think you should rename your test1.st<http://test1.st> and test1.dbd to be test1SNL.st and test1SNL.dbd.  Alternatively you could rename your application to be test1App or something.

Mark


________________________________
From: Tasaddaq Khan [[email protected]<mailto:[email protected]>]
Sent: Thursday, August 06, 2015 11:57 AM
To: Mark Rivers; [email protected]<mailto:[email protected]>
Subject: Re: Sequencer problem :iocBuild: Aborting, bad database definition (DBD)!

Hi Mark

My test1.dbd contains only following line

  registrar(test1Registrar)

Output of my make clean and then make :

[omar@localhost test1]$ make clean
make -C ./configure clean
make[1]: Entering directory `/home/omar/epics/test1/configure'
rm -rf O.linux-x86 O.Common
make[1]: Leaving directory `/home/omar/epics/test1/configure'
make -C ./test1App clean
make[1]: Entering directory `/home/omar/epics/test1/test1App'
make -C ./src clean
make[2]: Entering directory `/home/omar/epics/test1/test1App/src'
rm -rf O.linux-x86 O.Common
make[2]: Leaving directory `/home/omar/epics/test1/test1App/src'
make -C ./Db clean
make[2]: Entering directory `/home/omar/epics/test1/test1App/Db'
rm -rf O.linux-x86 O.Common
make[2]: Leaving directory `/home/omar/epics/test1/test1App/Db'
make[1]: Leaving directory `/home/omar/epics/test1/test1App'
make -C ./iocBoot clean
make[1]: Entering directory `/home/omar/epics/test1/iocBoot'
make -C ./ioctest1 clean
make[2]: Entering directory `/home/omar/epics/test1/iocBoot/ioctest1'
rm -f cdCommands envPaths dllPath.bat
make[2]: Leaving directory `/home/omar/epics/test1/iocBoot/ioctest1'
make[1]: Leaving directory `/home/omar/epics/test1/iocBoot'
[omar@localhost test1]$ make
make -C ./configure install
make[1]: Entering directory `/home/omar/epics/test1/configure'
perl /home/omar/epics/base/bin/linux-x86/makeMakefile.pl O.linux-x86 ../..
mkdir O.Common
make -C O.linux-x86 -f ../Makefile TOP=../.. T_A=linux-x86 install
make[2]: Entering directory `/home/omar/epics/test1/configure/O.linux-x86'
perl /home/omar/epics/base/bin/linux-x86/convertRelease.pl checkRelease
make[2]: Leaving directory `/home/omar/epics/test1/configure/O.linux-x86'
make[1]: Leaving directory `/home/omar/epics/test1/configure'
make -C ./test1App install
make[1]: Entering directory `/home/omar/epics/test1/test1App'
make -C ./src install
make[2]: Entering directory `/home/omar/epics/test1/test1App/src'
perl /home/omar/epics/base/bin/linux-x86/makeMakefile.pl O.linux-x86 ../../..
mkdir O.Common
make -C O.linux-x86 -f ../Makefile TOP=../../.. T_A=linux-x86 install
make[3]: Entering directory `/home/omar/epics/test1/test1App/src/O.linux-x86'
perl /home/omar/epics/base/bin/linux-x86/mkmf.pl<http://mkmf.pl><http://mkmf.pl> -m test1.st.d  .  ../os/Linux ../os/posix ../os/default ..  test1.i ../test1.st<http://test1.st><http://test1.st>
perl /home/omar/epics/base/bin/linux-x86/mkmf.pl<http://mkmf.pl><http://mkmf.pl> -m sncProgram.st.d  .  ../os/Linux ../os/posix ../os/default ..  sncProgram.i ../sncProgram.st
make[3]: Leaving directory `/home/omar/epics/test1/test1App/src/O.linux-x86'
make[3]: Entering directory `/home/omar/epics/test1/test1App/src/O.linux-x86'
echo "../O.Common/xxxRecord.h : ../Makefile" >> xxxRecord.h.d
/home/omar/epics/base/bin/linux-x86/dbToRecordtypeH  -I. -I.. -I../O.Common -I../../../dbd -I/home/omar/epics/seq-2.2.2/dbd -I/home/omar/epics/base/dbd ../xxxRecord.dbd xxxRecord.h
Installing generated generic include file ../../../include/xxxRecord.h

/usr/bin/gcc -c  -D_POSIX_C_SOURCE=199506L -D_POSIX_THREADS -D_XOPEN_SOURCE=500           -D_X86_  -DUNIX  -D_BSD_SOURCE -Dlinux  -D_REENTRANT   -O3 -g   -Wall      -m32     -fPIC -MMD -I. -I../O.Common -I. -I.. -I../../../include/os/Linux -I../../../include  -I/home/omar/epics/seq-2.2.2/include -I/home/omar/epics/base/include/os/Linux -I/home/omar/epics/base/include       ../xxxRecord.c

/usr/bin/gcc -c  -D_POSIX_C_SOURCE=199506L -D_POSIX_THREADS -D_XOPEN_SOURCE=500           -D_X86_  -DUNIX  -D_BSD_SOURCE -Dlinux  -D_REENTRANT   -O3 -g   -Wall      -m32     -fPIC -MMD -I. -I../O.Common -I. -I.. -I../../../include/os/Linux -I../../../include  -I/home/omar/epics/seq-2.2.2/include -I/home/omar/epics/base/include/os/Linux -I/home/omar/epics/base/include       ../devXxxSoft.c

/usr/bin/gcc -c  -D_POSIX_C_SOURCE=199506L -D_POSIX_THREADS -D_XOPEN_SOURCE=500           -D_X86_  -DUNIX  -D_BSD_SOURCE -Dlinux  -D_REENTRANT   -O3 -g   -Wall      -m32     -fPIC -MMD -I. -I../O.Common -I. -I.. -I../../../include/os/Linux -I../../../include  -I/home/omar/epics/seq-2.2.2/include -I/home/omar/epics/base/include/os/Linux -I/home/omar/epics/base/include       ../dbSubExample.c

/usr/bin/gcc -c  -D_POSIX_C_SOURCE=199506L -D_POSIX_THREADS -D_XOPEN_SOURCE=500           -D_X86_  -DUNIX  -D_BSD_SOURCE -Dlinux  -D_REENTRANT   -O3 -g   -Wall      -m32     -fPIC -MMD -I. -I../O.Common -I. -I.. -I../../../include/os/Linux -I../../../include  -I/home/omar/epics/seq-2.2.2/include -I/home/omar/epics/base/include/os/Linux -I/home/omar/epics/base/include       ../test1Hello.c

/usr/bin/gcc -c  -D_POSIX_C_SOURCE=199506L -D_POSIX_THREADS -D_XOPEN_SOURCE=500           -D_X86_  -DUNIX  -D_BSD_SOURCE -Dlinux  -D_REENTRANT   -O3 -g   -Wall      -m32     -fPIC -MMD -I. -I../O.Common -I. -I.. -I../../../include/os/Linux -I../../../include  -I/home/omar/epics/seq-2.2.2/include -I/home/omar/epics/base/include/os/Linux -I/home/omar/epics/base/include       ../initTrace.c
compiling ../sncExample.stt to C
/home/omar/epics/seq-2.2.2/bin/linux-x86/snc +r    ../sncExample.stt -o sncExample.c

/usr/bin/gcc -c  -D_POSIX_C_SOURCE=199506L -D_POSIX_THREADS -D_XOPEN_SOURCE=500           -D_X86_  -DUNIX  -D_BSD_SOURCE -Dlinux  -D_REENTRANT   -O3 -g   -Wall      -m32     -fPIC -MMD -I. -I../O.Common -I. -I.. -I../../../include/os/Linux -I../../../include  -I/home/omar/epics/seq-2.2.2/include -I/home/omar/epics/base/include/os/Linux -I/home/omar/epics/base/include       sncExample.c
preprocessing ../test1.st<http://test1.st><http://test1.st>
/usr/bin/gcc -x c -E  -D_POSIX_C_SOURCE=199506L -D_POSIX_THREADS -D_XOPEN_SOURCE=500           -D_X86_  -DUNIX  -D_BSD_SOURCE -Dlinux  -D_REENTRANT -I. -I../O.Common -I. -I.. -I../../../include/os/Linux -I../../../include  -I/home/omar/epics/seq-2.2.2/include -I/home/omar/epics/base/include/os/Linux -I/home/omar/epics/base/include       ../test1.st<http://test1.st><http://test1.st> > test1.i
compiling test1.i to C
/home/omar/epics/seq-2.2.2/bin/linux-x86/snc +r    test1.i -o test1.c

/usr/bin/gcc -c  -D_POSIX_C_SOURCE=199506L -D_POSIX_THREADS -D_XOPEN_SOURCE=500           -D_X86_  -DUNIX  -D_BSD_SOURCE -Dlinux  -D_REENTRANT   -O3 -g   -Wall      -m32     -fPIC -MMD -I. -I../O.Common -I. -I.. -I../../../include/os/Linux -I../../../include  -I/home/omar/epics/seq-2.2.2/include -I/home/omar/epics/base/include/os/Linux -I/home/omar/epics/base/include       test1.c
/usr/bin/ar -rc   libtest1Support.a        xxxRecord.o devXxxSoft.o dbSubExample.o test1Hello.o initTrace.o sncExample.o test1.o
/usr/bin/ranlib libtest1Support.a
/usr/bin/g++ -o libtest1Support.so -shared -fPIC -Wl,-hlibtest1Support.so -L/home/omar/epics/base/lib/linux-x86 -L/home/omar/epics/seq-2.2.2/lib/linux-x86 -Wl,-rpath,/home/omar/epics/base/lib/linux-x86 -Wl,-rpath,/home/omar/epics/seq-2.2.2/lib/linux-x86       -m32               xxxRecord.o devXxxSoft.o dbSubExample.o test1Hello.o initTrace.o sncExample.o test1.o    -lrecIoc -lsoftDevIoc -lmiscIoc -lrsrvIoc -ldbtoolsIoc -lasIoc -ldbIoc -lregistryIoc -ldbStaticIoc -lca -lCom -lseq -lpv   -lpthread   -lreadline -lm -lrt -ldl -lgcc
Installing shared library ../../../lib/linux-x86/libtest1Support.so
Installing library ../../../lib/linux-x86/libtest1Support.a
preprocessing ../sncProgram.st
/usr/bin/gcc -x c -E  -D_POSIX_C_SOURCE=199506L -D_POSIX_THREADS -D_XOPEN_SOURCE=500           -D_X86_  -DUNIX  -D_BSD_SOURCE -Dlinux  -D_REENTRANT -I. -I../O.Common -I. -I.. -I../../../include/os/Linux -I../../../include  -I/home/omar/epics/seq-2.2.2/include -I/home/omar/epics/base/include/os/Linux -I/home/omar/epics/base/include       ../sncProgram.st > sncProgram.i
compiling sncProgram.i to C
/home/omar/epics/seq-2.2.2/bin/linux-x86/snc +m    sncProgram.i -o sncProgram.c

/usr/bin/gcc -c  -D_POSIX_C_SOURCE=199506L -D_POSIX_THREADS -D_XOPEN_SOURCE=500           -D_X86_  -DUNIX  -D_BSD_SOURCE -Dlinux  -D_REENTRANT   -O3 -g   -Wall      -m32      -MMD -I. -I../O.Common -I. -I.. -I../../../include/os/Linux -I../../../include  -I/home/omar/epics/seq-2.2.2/include -I/home/omar/epics/base/include/os/Linux -I/home/omar/epics/base/include       sncProgram.c
/usr/bin/g++ -o sncProgram  -L/home/omar/epics/base/lib/linux-x86 -L/home/omar/epics/seq-2.2.2/lib/linux-x86 -Wl,-rpath,/home/omar/epics/base/lib/linux-x86 -Wl,-rpath,/home/omar/epics/seq-2.2.2/lib/linux-x86       -m32               sncProgram.o    -lseq -lpv -lcas -lgdd -lasHost -ldbStaticHost -lregistryIoc -lca -lCom
perl /home/omar/epics/base/bin/linux-x86/registerRecordDeviceDriver.pl ../test1.dbd test1_registerRecordDeviceDriver /home/omar/epics/test1 > test1.tmp
mv test1.tmp test1_registerRecordDeviceDriver.cpp

/usr/bin/g++ -c  -D_POSIX_C_SOURCE=199506L -D_POSIX_THREADS -D_XOPEN_SOURCE=500           -D_X86_  -DUNIX  -D_BSD_SOURCE -Dlinux  -D_REENTRANT   -O3 -g   -Wall      -m32      -MMD -I. -I../O.Common -I. -I.. -I../../../include/os/Linux -I../../../include  -I/home/omar/epics/seq-2.2.2/include -I/home/omar/epics/base/include/os/Linux -I/home/omar/epics/base/include       test1_registerRecordDeviceDriver.cpp

/usr/bin/g++ -c  -D_POSIX_C_SOURCE=199506L -D_POSIX_THREADS -D_XOPEN_SOURCE=500           -D_X86_  -DUNIX  -D_BSD_SOURCE -Dlinux  -D_REENTRANT   -O3 -g   -Wall      -m32      -MMD -I. -I../O.Common -I. -I.. -I../../../include/os/Linux -I../../../include  -I/home/omar/epics/seq-2.2.2/include -I/home/omar/epics/base/include/os/Linux -I/home/omar/epics/base/include       ../test1Main.cpp
/usr/bin/g++ -o test1  -L/home/omar/epics/test1/lib/linux-x86 -L/home/omar/epics/base/lib/linux-x86 -L/home/omar/epics/seq-2.2.2/lib/linux-x86 -Wl,-rpath,/home/omar/epics/test1/lib/linux-x86 -Wl,-rpath,/home/omar/epics/base/lib/linux-x86 -Wl,-rpath,/home/omar/epics/seq-2.2.2/lib/linux-x86       -m32               test1_registerRecordDeviceDriver.o test1Main.o    -ltest1Support -lseq -lpv -lrecIoc -lsoftDevIoc -lmiscIoc -lrsrvIoc -ldbtoolsIoc -lasIoc -ldbIoc -lregistryIoc -ldbStaticIoc -lca -lCom
Installing created file ../../../bin/linux-x86/sncProgram
Installing created file ../../../bin/linux-x86/test1
make[3]: Leaving directory `/home/omar/epics/test1/test1App/src/O.linux-x86'
make[2]: Leaving directory `/home/omar/epics/test1/test1App/src'
make -C ./Db install
make[2]: Entering directory `/home/omar/epics/test1/test1App/Db'
perl /home/omar/epics/base/bin/linux-x86/makeMakefile.pl O.linux-x86 ../../..
mkdir O.Common
make -C O.linux-x86 -f ../Makefile TOP=../../.. T_A=linux-x86 install
make[3]: Entering directory `/home/omar/epics/test1/test1App/Db/O.linux-x86'
make[3]: Nothing to be done for `install'.
make[3]: Leaving directory `/home/omar/epics/test1/test1App/Db/O.linux-x86'
make[2]: Leaving directory `/home/omar/epics/test1/test1App/Db'
make[1]: Leaving directory `/home/omar/epics/test1/test1App'
make -C ./iocBoot install
make[1]: Entering directory `/home/omar/epics/test1/iocBoot'
make -C ./ioctest1 install
make[2]: Entering directory `/home/omar/epics/test1/iocBoot/ioctest1'
perl /home/omar/epics/base/bin/linux-x86/convertRelease.pl -a linux-x86 -t /home/omar/epics/test1 envPaths
make[2]: Leaving directory `/home/omar/epics/test1/iocBoot/ioctest1'
make[1]: Leaving directory `/home/omar/epics/test1/iocBoot'

Tasaddaq


On Thu, Aug 6, 2015 at 9:11 PM, Mark Rivers <[email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>>> wrote:
Sorry, I did not scroll down far enough to see your Makefile.  I don't see an obvious problem with the Makefile.

You can do the following:

- Send the complete output when you do "make clean" and then "make"
- Send the output of

grep calc dbd/test1.dbd

Mark



________________________________
From: [email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>> [[email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>>] on behalf of Tasaddaq Khan [[email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>>]
Sent: Thursday, August 06, 2015 10:41 AM
To: [email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>>
Subject: Sequencer problem :iocBuild: Aborting, bad database definition (DBD)!

Hi

I have successfully build test1 application using Sequencer but when I run the ./st.cmd command, I face following error:

#!../../bin/linux-x86/test1
## You may have to change test1 to something else
## everywhere it appears in this file
< envPaths
epicsEnvSet("ARCH","linux-x86")
epicsEnvSet("IOC","ioctest1")
epicsEnvSet("TOP","/home/omar/epics/test1")
epicsEnvSet("SNCSEQ","/home/omar/epics/seq-2.2.2")
epicsEnvSet("EPICS_BASE","/home/omar/epics/base")
cd /home/omar/epics/test1
## Register all support components
dbLoadDatabase "dbd/test1.dbd"
test1_registerRecordDeviceDriver pdbbase
## Load record instances
#dbLoadTemplate "db/userHost.substitutions"
#dbLoadRecords "db/dbSubExample.db", "user=omarHost"
dbLoadRecords "db/test1.db", "user=omarHost"
Record "vout" is of unknown type "calc"
Error at or before ")" in file "db/test1.db" line 1
Error: syntax error
    at or before "" in file "db/test1.db" line 1
## Set this to see messages from mySub
#var mySubDebug 1
## Run this to trace the stages of iocInit
#traceIocInit
cd /home/omar/epics/test1/iocBoot/ioctest1
iocInit
Starting iocInit
checkDatabase: menuConvert not defined.
iocBuild: Aborting, bad database definition (DBD)!
## Start any sequence programs
#seq sncExample, "user=omarHost"
seq test1, "user=omarHost"
sevr=info Sequencer release 2.2.2, compiled Mon Jul 20 06:19:58 2015
sevr=info Spawning sequencer program "test1", thread 0x9f46e78: "test1"
epics> sevr=minor test1[0](after 2 sec): assigned=2, connected=0, monitored=1, got monitor=0

......


My Makefile is

TOP=../..

include $(TOP)/configure/CONFIG
#----------------------------------------
#  ADD MACRO DEFINITIONS AFTER THIS LINE

#=============================
# Build the IOC support library

LIBRARY_IOC += test1Support

# xxxRecord.h will be created from xxxRecord.dbd
DBDINC += xxxRecord
# Install devXxxSoft.dbd into <top>/dbd
DBD += xxxSupport.dbd

# Compile and add the code to the support library
test1Support_SRCS += xxxRecord.c
test1Support_SRCS += devXxxSoft.c

# Link locally-provided code into the support library,
# rather than directly into the IOC application.
test1Support_SRCS += dbSubExample.c
test1Support_SRCS += test1Hello.c
test1Support_SRCS += initTrace.c

test1Support_LIBS += $(EPICS_BASE_IOC_LIBS)

#=============================
# Build the IOC application

PROD_IOC = test1
# test1.dbd will be created and installed
DBD += test1.dbd

# test1.dbd will be made up from these files:
test1_DBD += base.dbd
test1_DBD += xxxSupport.dbd
test1_DBD += dbSubExample.dbd
test1_DBD += test1Hello.dbd
test1_DBD += initTrace.dbd

# test1_registerRecordDeviceDriver.cpp derives from test1.dbd
test1_SRCS += test1_registerRecordDeviceDriver.cpp

# Build the main IOC entry point on workstation OSs.
test1_SRCS_DEFAULT += test1Main.cpp
test1_SRCS_vxWorks += -nil-

# Add support from base/src/vxWorks if needed
#test1_OBJS_vxWorks += $(EPICS_BASE_BIN)/vxComLibrary

# Link in the code from the support library
test1_LIBS += test1Support

# NOTE: To build SNL programs, SNCSEQ must be defined
# in the <top>/configure/RELEASE file

ifneq ($(SNCSEQ),)
    # Build sncExample into test1Support
    sncExample_SNCFLAGS += +r
    test1_SNCFLAGS += +r
    test1_DBD += sncExample.dbd
    test1_DBD += test1.dbd
    test1Support_SRCS += sncExample.stt
    test1Support_SRCS += test1.st<http://test1.st><http://test1.st><http://test1.st>
    test1Support_LIBS += seq pv
    test1_LIBS += seq pv
#   test1_SRCS += test1.st<http://test1.st><http://test1.st><http://test1.st>
    # Build sncProgram as a standalone program
    PROD_HOST += sncProgram
    sncProgram_SNCFLAGS += +m
    sncProgram_SRCS += sncProgram.st
    sncProgram_LIBS += seq pv
    sncProgram_LIBS += $(EPICS_BASE_HOST_LIBS)
endif

# Finally link to the EPICS Base libraries
test1_LIBS += $(EPICS_BASE_IOC_LIBS)

#=============================

include $(TOP)/configure/RULES
#----------------------------------------
#  ADD RULES AFTER THIS LINE

____________________________________________________


Please check the Makefile and tell me where is the problem.

Regards,

Tasaddaq




Navigate by Date:
Prev: RE: Sequencer problem :iocBuild: Aborting, bad database definition (DBD)! Mark Rivers
Next: Re: Sequencer problem :iocBuild: Aborting, bad database definition (DBD)! [Solved] Tasaddaq Khan
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: Sequencer problem :iocBuild: Aborting, bad database definition (DBD)! Mark Rivers
Next: Re: Sequencer problem :iocBuild: Aborting, bad database definition (DBD)! [Solved] Tasaddaq Khan
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 16 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·