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  <20202021  2022  2023  2024  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Problems with hanging osiSockTest
From: "Johnson, Andrew N. via Core-talk" <core-talk at aps.anl.gov>
To: Ralph Lange <ralph.lange at gmx.de>
Cc: EPICS core-talk <core-talk at aps.anl.gov>
Date: Fri, 20 Nov 2020 18:31:59 +0000
On Nov 20, 2020, at 10:13 AM, Ralph Lange via Core-talk <core-talk at aps.anl.gov> wrote:

Neolithic vxWorks (5.x?) is the only one I know, and I know that Dirk uses.
Andrew always fixed these situations in Base, but he stopped doing that. When APS moved to vxWorks 6? Around Bronze age?

The APS still builds and runs some IOCs on VxWorks 5.5.2 but we have been working to update those IOCs to Base-3.14.12.5 and VxWorks 6.9 which is quite happy to compile declarations after other statements in a block. I’m not sure which VxWorks 6.x version updated gcc to one that first accepted that syntax, I’m pretty sure 6.8 also supports it though.

I did have to point out to Kay the other day that the latest release of his ether_ip module no longer builds on VxWorks 5 for this exact same reason, but I was able to disable those targets when building that module and I just suggested that he should mention the incompatibility in his README, not that he should change the code.

EPICS 7.0 dropped support for VxWorks 5.5.x, but Dirk has previously submitted changes to ensure the core modules will build for it; it’s just the PVA modules that can’t. Does a newer gcc build that has the flag --std=c89 detect this syntax? I suspect it might also need the flag —pedantic to enforce the old syntax standard though, and Base probably won’t build with that flag as well.

If someone is able to detect this by playing with with compiler flags they would also have to stop that build from descending into the PVA modules. That can be done quite easily by having the build create a modules/Makefile.local that contains just one line:

undef SUBMODULES

Whether Ralph would/should accept the necessary parallel changes to the CI scripts is a different question though.

Dirk's particular change request here seems innocuous[1] and small enough that I don’t mind our making it. At some point though (7.1 if not sooner) we are going to reject these kinds of changes on principle. Variable scope affects code readability.

- Andrew

[1]
in·noc·u·ous
/iˈnäkyo͞oəs/
adjective
  1. not harmful or offensive.
    "it was an innocuous question"



On Fri, 20 Nov 2020 at 16:42, Michael Davidsaver via Core-talk <core-talk at aps.anl.gov> wrote:
On 11/20/20 12:49 AM, Zimoch Dirk (PSI) wrote:
> Which this change, the tests terminates and succeeds.
>
> Please do not have variable declarations after instructions in C (non C++) code. Not all compilers like that. I already had to fix udpSockFanoutTestRx() because of this problem:

How could we expand our CI coverage to discover this?
Do your CI builds cover this case?  (a non-MS compiler
which still imposes this C89 ordering restriction by
default)


> @@ -213,6 +213,7 @@ void udpSockFanoutTestRx(void* raw)
>  {
>      struct TInfo *info = raw;
>      epicsTimeStamp start, now;
> +    unsigned nremain = nrepeat;
>  #ifdef _WIN32
>      /* ms */
>      DWORD timeout = 10000;
> @@ -222,7 +223,6 @@ void udpSockFanoutTestRx(void* raw)
>      timeout.tv_sec = 10;
>      timeout.tv_usec = 0;
>  #endif
> -    unsigned nremain = nrepeat;

>      (void)epicsTimeGetCurrent(&start);
>      now = start;
>
>
>
> Dirk

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


References:
Problems with hanging osiSockTest Zimoch Dirk (PSI) via Core-talk
Re: Problems with hanging osiSockTest Johnson, Andrew N. via Core-talk
AW: Problems with hanging osiSockTest Zimoch Dirk (PSI) via Core-talk
Re: AW: Problems with hanging osiSockTest Michael Davidsaver via Core-talk
Re: AW: Problems with hanging osiSockTest Michael Davidsaver via Core-talk
AW: AW: Problems with hanging osiSockTest Zimoch Dirk (PSI) via Core-talk
Re: AW: AW: Problems with hanging osiSockTest Michael Davidsaver via Core-talk
AW: AW: AW: Problems with hanging osiSockTest Zimoch Dirk (PSI) via Core-talk
Re: AW: AW: AW: Problems with hanging osiSockTest Michael Davidsaver via Core-talk
Re: AW: AW: AW: Problems with hanging osiSockTest Ralph Lange via Core-talk

Navigate by Date:
Prev: Re: AW: AW: AW: Problems with hanging osiSockTest Ralph Lange via Core-talk
Next: Build failed: epics-base base-7.0-603 AppVeyor via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024 
Navigate by Thread:
Prev: Re: AW: AW: AW: Problems with hanging osiSockTest Ralph Lange via Core-talk
Next: AW: AW: AW: AW: Problems with hanging osiSockTest Zimoch Dirk (PSI) via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024 
ANJ, 23 Nov 2020 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·