EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024 
<== Date ==> <== Thread ==>

Subject: AW: softiIoc and softIocPVA incomplete on VxWorks (and others?)
From: "Zimoch Dirk \(PSI\) via Core-talk" <core-talk at aps.anl.gov>
To: "Johnson, Andrew N." <anj at anl.gov>
Cc: EPICS core-talk <core-talk at aps.anl.gov>
Date: Wed, 9 Jun 2021 16:03:30 +0000

Hi Andrew,

 

It has always been a problem. I used to use iocCoreLibrary.munch instead of softIoc.munch for that reason (before I found out how to fix it). I will try yout suggestions tomorrow.

 

Does APS (or anyone else) use softIoc.munch from base or your own ioc App? With an ioc App the new flag should not affect you.

 

Dirk

 

Von: Johnson, Andrew N. <anj at anl.gov>
Gesendet: Mittwoch, 9. Juni 2021 17:51
An: Zimoch Dirk (PSI) <dirk.zimoch at psi.ch>
Cc: EPICS core-talk <core-talk at aps.anl.gov>
Betreff: Re: softiIoc and softIocPVA incomplete on VxWorks (and others?)

 

Hi Dirk,



On Jun 9, 2021, at 3:35 AM, Zimoch Dirk (PSI) via Core-talk <core-talk at aps.anl.gov> wrote:

 

On VxWorks, softIoc.munch and softioc.PVA.munch are statically linked. As normal with static linkage, only those symbols actually used in the program are copied into the program. While this is usually totally sufficient, it becomes a problem when the statically linked program dynamically loads plugins as possible with 'dlload' (or 'ld' on VxWorks).
Those dynamically loaded plugins may use EPICS functions that are defined but not used in EPICS Base itself, resulting in load errors like this:
Warning: module 0x76a130 holds reference to undefined symbol epicsMessageQueueReceiveWithTimeout.

I have seen this on VxWorks only, as this is the only platform where I use static linkage with dynamic loading of modules. But I guess that other platforms may be affected as well. As I have never seen any complaints about this behavior, I may be the only one who uses softIoc this way.

Anyway, the problem is easy to fix, and I would appreciate to have the fix included future EPICS releases:
Add the linker flag -whole-archive when building softIoc/softIocPVA.
I have added PROD_LDFLAGS_vxWorks = --whole-archive to modules/database/src/std/softIoc/Makefile and modules/pva2pva/pdbApp/Makefile.
Maybe this or something similar (I don't know the corresponding Windows linker flag) should be done not only for VxWorks but for all statically built versions.

 

Is there a recent change that has caused this, or has it always been a problem?

 

Could you instead try adding the --whole-archive flag to either MUNCH_LDFLAGS or OP_SYS_LDFLAGS in your Base configure/os/CONFIG_SITE.Common.vxWorksCommon file. It’s only your site which needs that flag, and I don’t know what effect it will have on the memory needed by our VxWorks IOCs (APS does not use dynamic loading of plugins on any IOC architecture).

 

- Andrew

 

-- 

Complexity comes for free, simplicity you have to work for.

 


Replies:
Re: softiIoc and softIocPVA incomplete on VxWorks (and others?) Johnson, Andrew N. via Core-talk
References:
softiIoc and softIocPVA incomplete on VxWorks (and others?) Zimoch Dirk (PSI) via Core-talk
Re: softiIoc and softIocPVA incomplete on VxWorks (and others?) Johnson, Andrew N. via Core-talk

Navigate by Date:
Prev: Re: softiIoc and softIocPVA incomplete on VxWorks (and others?) Johnson, Andrew N. via Core-talk
Next: Re: softiIoc and softIocPVA incomplete on VxWorks (and others?) Michael Davidsaver via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024 
Navigate by Thread:
Prev: Re: softiIoc and softIocPVA incomplete on VxWorks (and others?) Johnson, Andrew N. via Core-talk
Next: Re: softiIoc and softIocPVA incomplete on VxWorks (and others?) Johnson, Andrew N. via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024 
ANJ, 09 Jun 2021 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·