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 | 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 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Problem linking Mclennan stepper motor libraries into x86 IOC app |
From: | Peter Linardakis <[email protected]> |
To: | "[email protected]" <[email protected]> |
Date: | Fri, 8 Aug 2014 03:00:30 +0000 |
Dear tech-talkers We have a x64 machine which is used to cross compile IOC applications for RTEMS, linux-arm and linux-x86. The creator of this setup has since left our employ, but this system has been plodding along nicely. However,
I have run into a problem when trying to add in support for Mclennan stepper motor controllers. This example is with motor module R6-5-2 and all that has changed from the production system is the modification of: ../epics/trunk/tandem/tandemApp/src/Makefile which with addition of two lines referencing the Mclennan database and library is now: TOP=../.. include $(TOP)/configure/CONFIG #---------------------------------------- # ADD MACRO DEFINITIONS AFTER THIS LINE #============================= #============================= # Build the IOC application #PROD_Linux = -nil- # not on linux PROD_DEFAULT = tandem # tandem.dbd will be created and installed DBD += tandem.dbd # tandem.dbd will be made up from these files: tandem_DBD += base.dbd # Include dbd files from all support applications: tandem_DBD += $(ANUNUCLEAR)/src/anunuclear.dbd tandem_DBD += $(DJRESTORE)/src/djrestore.dbd tandem_DBD += $(ASYN)/dbd/asyn.dbd tandem_DBD += $(ASYN)/dbd/asynRecord.dbd tandem_DBD += $(MOTOR)/dbd/motorRecord.dbd tandem_DBD += $(MOTOR)/dbd/motorSupport.dbd tandem_DBD += $(MOTOR)/dbd/devSoftMotor.dbd tandem_DBD += $(STD)/dbd/epidRecord.dbd tandem_DBD += $(STD)/dbd/std.dbd tandem_DBD += $(IOCSTATS)/dbd/devIocStats.dbd tandem_DBD += stream.dbd tandem_DBD += tandem_seq.dbd tandem_DBD += $(MODBUS)/modbus.dbd tandem_DBD += $(TSDAQCTL)/tsdaqctl.dbd tandem_DBD += $(MOTOR)/dbd/devMclennanMotor.dbd # ADDITION 1 # Add all the support libraries needed by this IOC tandem_LIBS += anunuclear djrestore modbus tandem_LIBS += asyn std calc seq pv motor softMotor devIocStats stream streamSynApps tandem_LIBS += tsdaqctl tandem_LIBS += Mclennan # ADDITION 2 # tandem_registerRecordDeviceDriver.cpp derives from tandem.dbd tandem_SRCS += tandem_registerRecordDeviceDriver.cpp tandem_SRCS += pwm.st tandem_SRCS += linac-resonators-conditioning.st tandem_SRCS += msnics_wheel.st tandem_SRCS += injecting_magnet.st tandem_SRCS += bigblue.st tandem_SRCS += foil_changer.st tandem_SRCS += cup_metering.st tandem_SRCS += beam_config.st beam_on.st tandem_SRCS += supere-target-loader.st tandem_SRCS += supere-solenoid.st tandem_SRCS += silverpak-23ce.st tandem_SRCS += linec_target_ladder.st tandem_SRCS += linac_ac1.st # turn on snc debug messages SNCFLAGS += +d # Build the main IOC entry point on workstation OSs. tandem_SRCS_DEFAULT += tandemMain.cpp tandem_SRCS_vxWorks += -nil- # Add support from base/src/vxWorks if needed #tandem_OBJS_vxWorks += $(EPICS_BASE_BIN)/vxComLibrary tandem_LIBS += $(EPICS_BASE_IOC_LIBS) tandem_SYS_LIBS += curl z seq_DIR = $(INSTALL_LIB) #=========================== include $(TOP)/configure/RULES #---------------------------------------- # ADD RULES AFTER THIS LINE The result of a compilation via make is an error while trying to build the x86 version, with output: /usr/bin/g++ -o tandem -Wl,-Bstatic -L/home/peter/epics/trunk/base/lib/linux-x86 -L/home/peter/epics/trunk/modules/asyn/lib/linux-x86
-L/home/peter/epics/trunk/modules/calc-2-8/lib/linux-x86 -L/home/peter/epics/trunk/modules/devIocStats/lib/linux-x86 -L/home/peter/epics/trunk/modules/motorR6-5-2/lib/linux-x86 -L/home/peter/epics/trunk/modules/seq-2-0-12/lib/linux-x86 -L/home/peter/epics/trunk/modules/std-2-8/lib/linux-x86
-L/home/peter/epics/trunk/support/anunuclear/lib/linux-x86 -L/home/peter/epics/trunk/support/djrestore/lib/linux-x86 -L/home/peter/epics/trunk/support/modbus/lib/linux-x86 -L/home/peter/epics/trunk/support/tsdaqctl/lib/linux-x86 -L/home/peter/epics/trunk/tandem/lib/linux-x86
-Wl,-rpath,/home/peter/epics/trunk/base/lib/linux-x86 -Wl,-rpath,/home/peter/epics/trunk/modules/asyn/lib/linux-x86 -Wl,-rpath,/home/peter/epics/trunk/modules/calc-2-8/lib/linux-x86 -Wl,-rpath,/home/peter/epics/trunk/modules/devIocStats/lib/linux-x86 -Wl,-rpath,/home/peter/epics/trunk/modules/motorR6-5-2/lib/linux-x86
-Wl,-rpath,/home/peter/epics/trunk/modules/seq-2-0-12/lib/linux-x86 -Wl,-rpath,/home/peter/epics/trunk/modules/std-2-8/lib/linux-x86 -Wl,-rpath,/home/peter/epics/trunk/support/anunuclear/lib/linux-x86 -Wl,-rpath,/home/peter/epics/trunk/support/djrestore/lib/linux-x86
-Wl,-rpath,/home/peter/epics/trunk/support/modbus/lib/linux-x86 -Wl,-rpath,/home/peter/epics/trunk/support/tsdaqctl/lib/linux-x86 -Wl,-rpath,/home/peter/epics/trunk/tandem/lib/linux-x86 -m32 -Wl,-rpath,/lib/i386-linux-gnu -Wl,-rpath,/usr/lib/i386-linux-gnu
tandem_registerRecordDeviceDriver.o pwm.o linac-resonators-conditioning.o msnics_wheel.o injecting_magnet.o bigblue.o foil_changer.o cup_metering.o beam_config.o beam_on.o supere-target-loader.o supere-solenoid.o silverpak-23ce.o linec_target_ladder.o linac_ac1.o
tandemMain.o -lanunuclear -ldjrestore -lmodbus -lasyn -lstd -lcalc -lseq -lpv -lmotor -lsoftMotor -ldevIocStats -lstream -lstreamSynApps -ltsdaqctl -lMclennan -lrecIoc -lsoftDevIoc -lmiscIoc -lrsrvIoc -ldbtoolsIoc -lasIoc -ldbIoc -lregistryIoc -ldbStaticIoc
-lca -lCom -Wl,-Bdynamic -lcurl -lz -lpthread -lreadline -lm -lrt -ldl -lgcc /home/peter/epics/trunk/modules/motorR6-5-2/lib/linux-x86/libMclennan.a(drvPM304.o): In function `motor_init()': drvPM304.cc:(.text+0xa1f): undefined reference to `motor_task(thread_args*)' /home/peter/epics/trunk/modules/motorR6-5-2/lib/linux-x86/libMclennan.a(drvPM304.o):(.data.rel+0x24): undefined reference to `motor_send(mess_node*,
driver_table*)' /home/peter/epics/trunk/modules/motorR6-5-2/lib/linux-x86/libMclennan.a(drvPM304.o):(.data.rel+0x28): undefined reference to `motor_free(mess_node*,
driver_table*)' /home/peter/epics/trunk/modules/motorR6-5-2/lib/linux-x86/libMclennan.a(drvPM304.o):(.data.rel+0x2c): undefined reference to `motor_card_info(int,
mess_card_query*, driver_table*)' /home/peter/epics/trunk/modules/motorR6-5-2/lib/linux-x86/libMclennan.a(drvPM304.o):(.data.rel+0x30): undefined reference to `motor_axis_info(int,
int, mess_axis_query*, driver_table*)' /home/peter/epics/trunk/modules/motorR6-5-2/lib/linux-x86/libMclennan.a(devPM304.o): In function `PM304_end_trans(motorRecord*)': devPM304.cc:(.text+0x21): undefined reference to `motor_end_trans_com(motorRecord*, driver_table*)' /home/peter/epics/trunk/modules/motorR6-5-2/lib/linux-x86/libMclennan.a(devPM304.o): In function `PM304_start_trans(motorRecord*)': devPM304.cc:(.text+0x591): undefined reference to `motor_start_trans_com(motorRecord*, board_stat**)' /home/peter/epics/trunk/modules/motorR6-5-2/lib/linux-x86/libMclennan.a(devPM304.o): In function `PM304_init_record(void*)': devPM304.cc:(.text+0x5d4): undefined reference to `motor_init_record_com(motorRecord*, int, driver_table*, board_stat**)' /home/peter/epics/trunk/modules/motorR6-5-2/lib/linux-x86/libMclennan.a(devPM304.o): In function `PM304_init(void*)': devPM304.cc:(.text+0x634): undefined reference to `motor_init_com(int, int, driver_table*, board_stat***)' /home/peter/epics/trunk/modules/motorR6-5-2/lib/linux-x86/libMclennan.a(devPM304.o):(.data.rel+0x34): undefined reference to `motor_update_values(motorRecord*)' collect2: ld returned 1 exit status make[1]: *** [tandem] Error 1 make[1]: Leaving directory `/home/peter/epics/trunk/tandem/tandemApp/src/O.linux-x86' make: *** [install.linux-x86] Error 2 Everything inside the motor module directory builds fine. Any help is much appreciated. Regards Peter Dr Peter Linardakis Accelerator Research & Development Engineer Nuclear Physics | Research School of Physics and Engineering Australian National University p: +61 2 6125 2862 w:
http://physics.anu.edu.au/nuclear/ |