Experimental Physics and Industrial Control System
FYI this problem is resolved
________________________________
From: ??? [mailto:[email protected]]
Sent: Wed 1/14/2009 9:09 PM
To: Mark Rivers
Subject: ??: MAXvSetup is an undefined symbol
Hi, That works. Thank you very much.
???
===================================================
No.239 Zhangheng Road
PuDong District
Shanghai Institute of Applied Physics CAS
Shanghai, China
Tel: +86-21-33933256 Fax: +86-21-33933031
-----Original Message-----
From: Mark Rivers [mailto:[email protected]]
Sent: 2009-1-14 (???) 21:57
To: ???
Cc: [email protected]; Ronald L. Sluiter; [email protected]
Subject: RE: MAXvSetup is an undefined symbol
Hi,
The problem is with the Makefile-3 file you sent (which is motorApp/OmsSrc/Makefile). That is NOT the file that came with the motor distribution, someone has altered it greatly. The version you sent builds an oms "PROD_IOC", not an oms library, which is your problem. It is not a good idea to modify the Makefile or other code in the distribution except to comment or uncomment things, because it leads to this confusion.
Here is your Makefile, the one you sent me:
# Makefile
TOP = ../..
include $(TOP)/configure/CONFIG
#----------------------------------------
# ADD MACRO DEFINITIONS AFTER THIS LINE
# The following are used for debugging messages.
#!USR_CXXFLAGS += -DDEBUG
PROD_IOC_vxWorks += oms
DBD +=oms.dbd
DBD +=devOms.dbd
oms_DBD +=base.dbd
oms_DBD += motorSupport.dbd
oms_DBD += devOms.dbd
oms_DBD += devSoftMotor.dbd
#oms_DBD += calc.dbd
#oms_DBD += aCalcoutRecord.dbd
#oms_DBD += calcSupport.dbd
#oms_DBD += sCalcoutRecord.dbd
#oms_DBD += swaitRecord.dbd
oms_DBD += transformRecord.dbd
oms_SRCS_vxWorks += oms_registerRecordDeviceDriver.cpp
oms_SRCS_DEFAULT += omsMain.cpp
# The following is required for the OMS PC68/78 (i.e., devOmsPC68) device driver.
#oms_SRCS_vxWorks += devOmsPC68.cc drvOmsPC68.cc
# The following is required for the OMS VME8/44 (i.e., devOMS) device driver.
oms_SRCS_vxWorks += devOms.cc drvOms.cc
# The following is required for the OMS VME58 (i.e., devOms58) device driver.
oms_SRCS_vxWorks += devOms58.cc drvOms58.cc
# The following is required for the OMS MAXv device driver.
oms_SRCS_vxWorks += devMAXv.cc drvMAXv.cc
# The following is required for all OMS device drivers.
oms_SRCS_vxWorks += devOmsCom.cc
oms_LIBS += motor
oms_LIBS += SoftMotor
#oms_LIBS += asyn
oms_LIBS += calc
oms_OBJS_vxWorks += $(EPICS_BASE_BIN)/vxComLibrary
oms_LIBS += $(EPICS_BASE_IOC_LIBS)
include $(TOP)/configure/RULES
#----------------------------------------
# ADD RULES AFTER THIS LINE
I have attached the current version of OmsSrc/Makefile. Here it is. Note that it builds a LIBRARY_IOC, not a PROD_IOC.
# Makefile
TOP = ../..
include $(TOP)/configure/CONFIG
#----------------------------------------
# ADD MACRO DEFINITIONS AFTER THIS LINE
# The following are used for debugging messages.
#!USR_CXXFLAGS += -DDEBUG
DBD += devOms.dbd
LIBRARY_IOC_DEFAULT += oms
# The following is required for the OMS PC68/78 (i.e., devOmsPC68) device driver.
ifdef ASYN
SRCS += devOmsPC68.cc drvOmsPC68.cc
endif
# The following is required for the OMS VME8/44 (i.e., devOMS) device driver.
SRCS += devOms.cc drvOms.cc
# The following is required for the OMS VME58 (i.e., devOms58) device driver.
SRCS += devOms58.cc drvOms58.cc
# The following is required for the OMS MAXv device driver.
SRCS += devMAXv.cc drvMAXv.cc
# The following is required for all OMS device drivers.
SRCS += devOmsCom.cc
oms_LIBS += motor
ifdef ASYN
oms_LIBS += asyn
endif
oms_LIBS += $(EPICS_BASE_IOC_LIBS)
include $(TOP)/configure/RULES
#----------------------------------------
# ADD RULES AFTER THIS LINE
This is from motor R6-4, and I think you are running R6-2. There are some minor difference which are shown here:
corvette:6-4beta/motorApp/OmsSrc>cvs diff -rR6-2 Makefile
Index: Makefile
===================================================================
RCS file: /net/beams-nfs/export/local/cvs/support/motor/motorApp/OmsSrc/Makefile,v
retrieving revision 1.7
retrieving revision 1.12
diff -u -r1.7 -r1.12
--- Makefile 2006/04/24 19:55:05 1.7
+++ Makefile 2008/09/17 21:48:58 1.12
@@ -10,10 +10,11 @@
DBD += devOms.dbd
LIBRARY_IOC_DEFAULT += oms
-LIBRARY_IOC_WIN32 += -nil-
# The following is required for the OMS PC68/78 (i.e., devOmsPC68) device driver.
+ifdef ASYN
SRCS += devOmsPC68.cc drvOmsPC68.cc
+endif
# The following is required for the OMS VME8/44 (i.e., devOMS) device driver.
SRCS += devOms.cc drvOms.cc
@@ -28,6 +29,9 @@
SRCS += devOmsCom.cc
oms_LIBS += motor
+ifdef ASYN
+oms_LIBS += asyn
+endif
oms_LIBS += $(EPICS_BASE_IOC_LIBS)
include $(TOP)/configure/RULES
Please go back to the original files in the motor distribution and build those. It will create an oms library, which should work fine.
Mark
________________________________
From: ??? [mailto:[email protected]]
Sent: Tue 1/13/2009 11:23 PM
To: Mark Rivers
Subject: ??: MAXvSetup is an undefined symbol
hello, thanks for your kindness. Please check the files in attachment.
???
===================================================
No.239 Zhangheng Road
PuDong District
Shanghai Institute of Applied Physics CAS
Shanghai, China
Tel: +86-21-33933256 Fax: +86-21-33933031
-----Original Message-----
From: Mark Rivers [mailto:[email protected]]
Sent: 2009-1-14 (???) 11:56
To: ???
Subject: RE: MAXvSetup is an undefined symbol
There is some problem if the oms library is not being built.
At the top level in motor please do the following:
make clean uninstall
make
and send me the complete output.
Also send me the contents of motor/Makefile and motor/motorApp/Makefile where motor is your top level directory for motor.
Mark
________________________________
From: ??? [mailto:[email protected]]
Sent: Tue 1/13/2009 9:11 PM
To: Mark Rivers
Subject: ??: MAXvSetup is an undefined symbol
Thanks for your advice. The OmsSrc directory is not commented, but in the lib directory only have libmotor and libsoftmotor. I am still do not know which line determine weather obtain the lib file after compiled.
???
===================================================
No.239 Zhangheng Road
PuDong District
Shanghai Institute of Applied Physics CAS
Shanghai, China
Tel: +86-21-33933256 Fax: +86-21-33933031
-----Original Message-----
From: Mark Rivers [mailto:[email protected]]
Sent: 2009-1-14 (???) 10:49
To: ???; [email protected]
Subject: RE: MAXvSetup is an undefined symbol
Depending on which version of the motor module you are using you may need to edit motorApp/Makefile to uncomment the line to build the OmsSrc directory. That is the correct way to do it, then you won't have to copy the source files to your application directory.
________________________________
From: ??? [mailto:[email protected]]
Sent: Tue 1/13/2009 7:11 PM
To: Mark Rivers; [email protected]
Subject: ??: MAXvSetup is an undefined symbol
If i don't compile the source file , there will be some error about oms:
ld < mx.munch
Undefined symbol: pvar_dset_devOMS (binding 1 type 0)
Undefined symbol: pvar_dset_devMAXv (binding 1 type 0)
Undefined symbol: pvar_drvet_drvOms (binding 1 type 0)
Undefined symbol: pvar_drvet_drvMAXv (binding 1 type 0)
Undefined symbol: pvar_dset_devOms58 (binding 1 type 0)
Undefined symbol: pvar_drvet_drvOms58 (binding 1 type 0)
ld error: Module contains undefined symbol(s) and may be unusable.
value = 0 = 0x0
Then i check the files, i did not find the oms library. So i have to compile the source directly. The reason for my problem is i don't have oms library after i compiled the motor support in the lib or other directory.
???
===================================================
No.239 Zhangheng Road
PuDong District
Shanghai Institute of Applied Physics CAS
Shanghai, China
Tel: +86-21-33933256 Fax: +86-21-33933031
-----Original Message-----
From: Mark Rivers [mailto:[email protected]]
Sent: 2009-1-13 (???) 22:29
To: ???; [email protected]
Subject: RE: MAXvSetup is an undefined symbol
You are doing things differently than we normally do. You are compiling the motor files (motorRecord.cc, devMAXv.cc, etc.) directly as part of your application with the lines like:
mx_SRCS_vxWorks += motorRecord.cc motordevCom.cc motordrvCom.cc
but you are also including those same routines again via external libraries with lines like:
mx_LIBS += motor
mx_LIBS += SoftMotor
As noted yesterday you are not including oms as an external library, which you should.
I suggest that you do not compile the motor or oms code again as part of your application, but rather just include the libraries from the motor module.
This works fine for me under vxWorks with the vxWorks shell, I do not have problems with C++ name mangling and MAXvSetup works with no problems.
Mark
________________________________
From: [email protected] on behalf of ???
Sent: Mon 1/12/2009 5:42 AM
To: [email protected]
Subject: MAXvSetup is an undefined symbol
Hello,everyone.
I have two application of oms motor and hytec adc, but i only have a VME crate. So i need to merget the two application to one ioc. The oms motor application from
synApps and hytec 8401 work well respectively. So i use the makeBaseApp.pl to produce a new application and revise the makefile, and copy the source file to the
corresponding directory. The compile is ok, i can get the munch and st.cmd files.
When download st.cmd to the vme, there are will problems. It is said the MAXvSetup is an undefined symbol. It is very strange. I insert the hytec8001 and 8401 in the
first and the VME in the third.
Please give me some advice and idea.
Thanks.
----------------------Makefile-----------------------------------------
TOP=../..
include $(TOP)/configure/CONFIG
#----------------------------------------
# ADD MACRO DEFINITIONS AFTER THIS LINE
#=============================
#=============================
# build an ioc application
PROD_IOC_vxWorks = mx
DBD += mx.dbd
# mx.dbd will be made up from these files:
mx_DBD += base.dbd
#include definitions for any other support applications needed
#mx_DBD += xxx.dbd
mx_DBD += transformRecord.dbd
mx_DBD += oms.dbd
mx_DBD += motorSupport.dbd
mx_DBD += motorRecord.dbd
mx_DBD += devOms.dbd
mx_DBD += devSoftMotor.dbd
mx_DBD += PSU0.dbd
mx_DBD += sscan.dbd
# <name>_registerRecordDeviceDriver.cpp will be created from <name>.dbd
mx_SRCS_vxWorks += mx_registerRecordDeviceDriver.cpp
mx_SRCS_DEFAULT += mxMain.cpp
mx_SRCS_vxWorks += -nil-
mx_SRCS_vxWorks += devOms.cc drvOms.cc
mx_SRCS_vxWorks += devOms58.cc drvOms58.cc
mx_SRCS_vxWorks += devMAXv.cc drvMAXv.cc
mx_SRCS_vxWorks += devOmsCom.cc
mx_SRCS_vxWorks += devSoft.cc devSoftAux.cc
mx_SRCS_vxWorks += motorRecord.cc motordevCom.cc motordrvCom.cc
#The following adds support from base/src/vxWorks
mx_OBJS_vxWorks += $(EPICS_BASE_BIN)/vxComLibrary
#add a definition for each support application used by this application
#mx_LIBS += xxx
#NOTES:
# 1)It is not possible to build sncExample both as a component of mx
# and standalone. You must choose only one.
# 2)To build sncExample SNCSEQ must be defined in <top>/configure/RELEASE
#The following builds sncExample as a component of mx
#mx_SRCS += sncExample.stt
#mx_LIBS += seq pv
mx_LIBS += motor
mx_LIBS += SoftMotor
mx_LIBS += Ipac
mx_LIBS += Hy8402ip
mx_LIBS += Hy8401ip
mx_LIBS += calc
mx_LIBS += sscan
mx_LIBS_vxWorks += $(EPICS_BASE_IOC_LIBS)
#The following builds sncExample as a standalone application
#PROD_HOST += sncExample
#sncExample_SNCFLAGS += +m
#sncExample_SRCS += sncExample.stt
#sncExample_LIBS += seq pv
#sncExample_LIBS += $(EPICS_BASE_HOST_LIBS)
#===========================
include $(TOP)/configure/RULES
#----------------------------------------
# ADD RULES AFTER THIS LINE
-----------------------------Error mesg--------------------------------
ld < mx.munch
sysAtReboot not found. epicsExit will not be called by reboot.
value = 516036768 = 0x1ec218a0
## Register all support components
cd top
value = 0 = 0x0
dbLoadDatabase("dbd/mx.dbd",0,0)
value = 0 = 0x0
mx_registerRecordDeviceDriver(pdbbase)
value = 0 = 0x0
## motor
dbLoadRecords("db/att.db")
value = 0 = 0x0
MAXvSetup(1,16,0xF000,180,6,10)
undefined symbol: MAXvSetup
???
===================================================
No.239 Zhangheng Road
PuDong District
Shanghai Institute of Applied Physics CAS
Shanghai, China
Tel: +86-21-33933256 Fax: +86-21-33933031
- References:
- MAXvSetup is an undefined symbol 汪启胜
- RE: MAXvSetup is an undefined symbol Mark Rivers
- 答复: MAXvSetup is an undefined symbol 汪启胜
- RE: MAXvSetup is an undefined symbol Mark Rivers
- Navigate by Date:
- Prev:
virtual linac with libstdc++.so.6 Pierrick Hanlet
- Next:
Re: virtual linac with libstdc++.so.6 Andrew Johnson
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
<2009>
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
RE: MAXvSetup is an undefined symbol Mark Rivers
- Next:
AreaDetector, Compiling synApps modules for Windows Microsoft compiler Timothy Madden
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
<2009>
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024