Hi Peter,
On 08/07/2014 10:00 PM, Peter Linardakis wrote:
>
> # 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
> The result of a compilation via make is an error while trying to build
> the x86 version, with output:
> /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(devPM304.o):(.data.rel+0x34):
> undefined reference to `motor_update_values(motorRecord*)'
> collect2: ld returned 1 exit status
The problem is that you added the McLennan library in the wrong place in
the Makefile; the order of libraries in an xxx_LIBS variable is
important, and in this case you just need to move the "tandem_LIBS +=
Mclennan" line to /above/ the line that mentions motor.
If you had any other motor drivers in the list then it might not have
mattered (depending on whereabouts their libraries were listed) because
they would have already pulled those motor routines into the binary, but
as it is your new module is apparently the only thing that references
those parts of the motor record, so the linker didn't link them into the
output file when it processed the libmotor.a library. Static linking is
normally done in one pass in the order given, so you must list your
libraries in the order most-derived through to least-derived, which is
why the $(EPICS_BASE_IOC_LIBS) libraries must come last.
HTH,
- Andrew
--
Advertising may be described as the science of arresting the human
intelligence long enough to get money from it. -- Stephen Leacock
- Replies:
- RE: Problem linking Mclennan stepper motor libraries into x86 IOC app Peter Linardakis
- References:
- Problem linking Mclennan stepper motor libraries into x86 IOC app Peter Linardakis
- Navigate by Date:
- Prev:
Re: synApps Jeong Han Lee
- Next:
RE: Problem linking Mclennan stepper motor libraries into x86 IOC app Peter Linardakis
- 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:
Problem linking Mclennan stepper motor libraries into x86 IOC app Peter Linardakis
- Next:
RE: Problem linking Mclennan stepper motor libraries into x86 IOC app Peter Linardakis
- 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
|