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

Subject: Re: readline in base 7.0.7
From: Mark Rivers via Core-talk <core-talk at aps.anl.gov>
To: Michael Davidsaver <mdavidsaver at gmail.com>
Cc: "core-talk at aps.anl.gov" <core-talk at aps.anl.gov>
Date: Sun, 11 Sep 2022 20:26:39 +0000
Hi Michael,

> As always, I would encourage those interested to follow PRs.
> Compatibility doesn't just happen by itself.

I don't consider myself a core developer, and I can't follow all PRs.  
However, in the past there have been "release candidate" versions of base that were available and announced a few weeks before the official version release date:

corvette:local/epics/base-7.0.6.1>git tag | grep rc
R3.14.10-rc1
R3.14.10-rc2
R3.14.11-rc1
R3.14.12-rc1
R3.14.12.1-rc1
R3.14.12.2-rc1
R3.14.12.3-rc1
R3.14.12.4-rc1
R3.14.12.5-rc1
R3.14.12.6-rc1
R3.14.12.7-rc1
R3.14.12.8-rc1
R3.14.9-rc1
R3.15.1-rc1
R3.15.2-rc1
R3.15.3-rc1
R3.15.4-rc1
R3.15.5-rc1
R3.15.6-rc1
R3.16.1-rc1
R3.16.2-rc1
R7.0.1-rc1
R7.0.2-rc1
R7.0.4.1-rc1

If these were done consistently and announced on core-talk (or better yet on tech-talk) asking people to test them I would try to do so.

Thanks for providing the patch.  I will test it, and if it works then perhaps there should be a 7.0.7.1 relatively soon.

Specific suggestions on wording are welcomed.  I find it difficult to write succinct documentation which speaks to every user.

I have added the last 2 lines to the release notes below.  I also changed the spelling of "effect" to "affect" in the previous line.

Automatic COMMANDLINE_LIBRARY w/ newer compilers

When built with a compiler supporting __has_include<>, the presence of the <readline/readline.h> will be used to automatically determine a default value for COMMANDLINE_LIBRARY.

Mingw builds with readline support now link -ltermcap instead of -lcurses.

This should not affect sites which set explicitly set COMMANDLINE_LIBRARY as the only definition in Base now has the form COMMANDLINE_LIBRARY ?= ....

However, it does require now manually setting COMMANDLINE_LIBRARY on systems with versions of gcc prior to gcc-5, where previously it was set automatically.  

This includes RHEL/CentOS 6 and 7.


> I don't know when clang or msvc added support.

MSCV added support for __has​_include in VS 2017 15.3.  https://docs.microsoft.com/en-us/cpp/overview/visual-cpp-language-conformance?view=msvc-170
However, I don't think that matters for this readline issue, since the VS studio builds don't use readline, right?

Thanks,
Mark





From: Michael Davidsaver <mdavidsaver at gmail.com>
Sent: Friday, September 9, 2022 6:28 PM
To: Mark Rivers <rivers at cars.uchicago.edu>
Cc: core-talk at aps.anl.gov <core-talk at aps.anl.gov>
Subject: Re: readline in base 7.0.7
 
On 9/8/22 11:44, Mark Rivers wrote:
>  > You will need to manually specify COMMANDLINE_LIBRARY for the time being.  (and hopefully put an OS upgrade on your roadmap)
>
> This is unfortunate, since the automatic detection worked fine in base 7.0.6.1.

fyi.  https://github.com/epics-base/epics-base/pull/254

As always, I would encourage those interested to follow PRs.
Compatibility doesn't just happen by itself.


The following lightly tested patch should restore the previous
$(GNU_DIR) automatic detection for older compilers.  (not just
linux)

> diff --git a/configure/toolchain.c b/configure/toolchain.c
> index 2f76b475b..bc37cad64 100644
> --- a/configure/toolchain.c
> +++ b/configure/toolchain.c
> @@ -45,5 +45,7 @@ COMMANDLINE_LIBRARY ?= READLINE
>  COMMANDLINE_LIBRARY ?= EPICS
>  #  endif
>  #else
> -COMMANDLINE_LIBRARY ?= EPICS
> +COMMANDLINE_LIBRARY ?= $(strip $(if $(wildcard \
> +    $(if $(GNU_DIR),$(GNU_DIR)/include/readline/readline.h) \
> +), READLINE, EPICS))
>  #endif


> The release notes really should say that manual editing is now required for older compilers, while it previously was not.

Specific suggestions on wording are welcomed.  I find it
difficult to write succinct documentation which speaks
to every user.


>  They should also say which version of gcc is required to have the automatic detection work.

GCC >=5.0

https://gcc.gnu.org/projects/cxx-status.html#cxx17

I don't know when clang or msvc added support.


>  I now need to spend a few hours rebuilding base and synApps for a bunch of architectures.

I'm sorry to have wasted your time.


>  > and hopefully put an OS upgrade on your roadmap)
>
> We have a number of machines where vendor support for kernel drivers limits such upgrades.  RHEL 7 has 2 more years before EOL, and is still used on many APS beamlines.
>
> Mark
>
> -----Original Message-----
> From: Michael Davidsaver <mdavidsaver at gmail.com>
> Sent: Thursday, September 8, 2022 1:29 PM
> To: Mark Rivers <rivers at cars.uchicago.edu>
> Cc: core-talk at aps.anl.gov
> Subject: Re: readline in base 7.0.7
>
> On 9/8/22 10:40, Mark Rivers via Core-talk wrote:
>
>  > I just built base 7.0.7 on Centos 7 with no changes to the files in configure/os.
>
> Right, I wasn't paying attention.  Automatic detection now depends on GCC version.  As I recall, centos7 has GCC 4.8, which is too old.
>
> You will need to manually specify COMMANDLINE_LIBRARY for the time being.  (and hopefully put an OS upgrade on your roadmap)
>
>  > My IOCs now are not built with libreadline, while in base 7.0.6.1 they were, again with no changes to the configure/os files.
>
>  >
>
>  > I see this change between base 7.0.6.1 and base 7.0.7
>
>  >
>
>  > corvette:base-7.0.7/configure/os>git diff R7.0.6.1 R7.0.7
>
>  > CONFIG_SITE.Common.linux-x
>
>  >
>
>  > CONFIG_SITE.Common.linux-x86        CONFIG_SITE.Common.linux-x86_64
>
>  > CONFIG_SITE.Common.linux-xscale_be
>
>  >
>
>  > corvette:base-7.0.7/configure/os>git diff R7.0.6.1 R7.0.7
>
>  > CONFIG_SITE.Common.linux-x86_64
>
>  >
>
>  > diff --git a/configure/os/CONFIG_SITE.Common.linux-x86_64
>
>  > b/configure/os/CONFIG_SITE.Common.linux-x86_64
>
>  >
>
>  > index e098b76..b98385f 100644
>
>  >
>
>  > --- a/configure/os/CONFIG_SITE.Common.linux-x86_64
>
>  >
>
>  > +++ b/configure/os/CONFIG_SITE.Common.linux-x86_64
>
>  >
>
>  > @@ -15,10 +15,6 @@
>
>  >
>
>  > #    to inform the system of the shared library location.
>
>  >
>
>  > -# Use GNU Readline if the header file is installed
>
>  >
>
>  > -COMMANDLINE_LIBRARY = $(strip $(if $(wildcard \
>
>  >
>
>  > -    $(GNU_DIR)/include/readline/readline.h), READLINE, EPICS))
>
>  >
>
>  > -
>
>  >
>
>  > # If libreadline needs additional libraries to be linked with it, try
>
>  >
>
>  > # uncommenting each of the lines below in turn, starting with the top
>
>  >
>
>  > # one and working downwards, until the build succeeds. Do a 'make rebuild'
>
>  >
>
>  > The release notes say:
>
>  >
>
>  > *Automatic COMMANDLINE_LIBRARY w/ newer compilers*
>
>  >
>
>  > When built with a compiler supporting __has_include<>, the presence of the <readline/readline.h> will be used to automatically determine a default value for COMMANDLINE_LIBRARY.
>
>  >
>
>  > Mingw builds with readline support now link -ltermcap instead of -lcurses.
>
>  >
>
>  > This should not effect sites which set explicitly set COMMANDLINE_LIBRARY as the only definition in Base now has the form COMMANDLINE_LIBRARY ?= ....
>
>  >
>
>  > I interpret the first sentence here to mean that the test for
>
>  > COMMANDLINE_LIBRARY is done in the compiler if possible, but it does
>
>  > not say that the previous way of doing it in the CONFIG_SITE file (for
>
>  > older compilers) has been removed
>
>  >
>
>  > Does this mean that I now need to edit CONFIG_SITE.Common.linux-x86_64 to manually set COMMANDLINE_LIBRARY?
>
>  >
>
>  > Thanks,
>
>  >
>
>  > Mark
>
>  >
>


References:
readline in base 7.0.7 Mark Rivers via Core-talk
Re: readline in base 7.0.7 Michael Davidsaver via Core-talk
RE: readline in base 7.0.7 Mark Rivers via Core-talk
Re: readline in base 7.0.7 Michael Davidsaver via Core-talk

Navigate by Date:
Prev: Re: readline in base 7.0.7 Michael Davidsaver via Core-talk
Next: Build failed: EPICS Base 7 base-R7.0.7-684 AppVeyor via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  <20222023  2024 
Navigate by Thread:
Prev: Re: readline in base 7.0.7 Michael Davidsaver via Core-talk
Next: RE: readline in base 7.0.7 Mark Rivers via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  <20222023  2024 
ANJ, 30 Sep 2022 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·