I get the following error loading a library file on
vxWorks/Epics 3.14.4:
cd timingbin
value = 0 = 0x0
ld<timingLib.munch
Undefined symbol: p (binding 1 type 0) <<<<<<<<<<<<<<<<<<<<<
value = 28536800 = 0x1b36fe0
cd timing
value = 0 = 0x0
dbLoadDatabase("dbd/timing.dbd",0,0)
value = 0 = 0x0
timing_registerRecordDeviceDriver(pdbbase)
program
Exception current instruction address: 0x01b47334
Machine Status Register: 0x0008b030
Condition Register: 0x44200082
Task: 0x1b51b18 "tShell"
In timing.dbd I have:
……
driver (drvV124S)
device (ai,
VME_IO, devAiV124S, "Timing
Gate")
…….
#registrar("timingSubs")
<<<<<<<<<<<<<<<<<<<<<
Commented out
And from that registerRecordDeviceDriver.pl generates:
……
epicsShareExtern void (*p)(void);
<<<<<<<<<<<<<<<<<<<<<<<<
int timing_registerRecordDeviceDriver(DBBASE *pbase)
{
int i;
for(i=0; i< 11; i++ ) {
if(registryDeviceSupportFind(deviceSupportNames[i]))
continue;
if(!registryDeviceSupportAdd(deviceSupportNames[i],devsl[i]))
{
errlogPrintf("registryDeviceSupportAdd failed %s\n",
deviceSupportNames[i]);
continue;
}
}
for(i=0; i< 1; i++ ) {
if(registryDriverSupportFind(driverSupportNames[i]))
continue;
if(!registryDriverSupportAdd(driverSupportNames[i],drvsl[i]))
{
errlogPrintf("registryDriverSupportAdd failed %s\n",
driverSupportNames[i]);
continue;
}
}
(*p)();
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
return(0);
}
…
The call to (*p)() generates the bus error and the unresolved
link error.
The registrar line was commented out since I hadn’t
actually completed the registrar function for that source file.
Apparently some pass that registerRecordDeviceDriver.pl made on the dbd file
counted the line has having a registrar spec but didn’t pick up its
argument. The work around is to misspell “registrar”.