Message ID | 20230816222627.3873712-4-i.maximets@ovn.org |
---|---|
State | Accepted |
Headers | show |
Series | m4: Fix autoconf 2.70+ warnings. | expand |
Context | Check | Description |
---|---|---|
ovsrobot/apply-robot | success | apply and check: success |
ovsrobot/github-robot-_Build_and_Test | success | github build: passed |
ovsrobot/github-robot-_ovn-kubernetes | success | github build: passed |
On 8/17/23 00:26, Ilya Maximets wrote: > This fixes the obsolescence warning for AC_TRY_RUN with autoconf 2.70+: > > $ ./boot.sh > configure.ac:141: warning: The macro `AC_TRY_RUN' is obsolete. > configure.ac:141: You should run autoupdate. > ./lib/autoconf/general.m4:2997: AC_TRY_RUN is expanded from... > lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from... > lib/m4sugar/m4sh.m4:699: AS_IF is expanded from... > ./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from... > ./lib/autoconf/general.m4:2270: AC_CACHE_CHECK is expanded from... > m4/ax_func_posix_memalign.m4:27: AX_FUNC_POSIX_MEMALIGN is expanded from... > configure.ac:141: the top level > > Signed-off-by: Ilya Maximets <i.maximets@ovn.org> > --- > m4/ax_func_posix_memalign.m4 | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/m4/ax_func_posix_memalign.m4 b/m4/ax_func_posix_memalign.m4 > index bd60adcbc..2442ceca7 100644 > --- a/m4/ax_func_posix_memalign.m4 > +++ b/m4/ax_func_posix_memalign.m4 > @@ -1,5 +1,5 @@ > # =========================================================================== > -# http://www.gnu.org/software/autoconf-archive/ax_func_posix_memalign.html > +# https://www.gnu.org/software/autoconf-archive/ax_func_posix_memalign.html > # =========================================================================== > # > # SYNOPSIS > @@ -22,12 +22,12 @@ > # and this notice are preserved. This file is offered as-is, without any > # warranty. > > -#serial 7 > +#serial 9 > > AC_DEFUN([AX_FUNC_POSIX_MEMALIGN], > [AC_CACHE_CHECK([for working posix_memalign], > [ax_cv_func_posix_memalign_works], > - [AC_TRY_RUN([ > + [AC_RUN_IFELSE([AC_LANG_SOURCE([[ > #include <stdlib.h> > > int > @@ -39,7 +39,7 @@ main () > * the size word. */ > exit (posix_memalign (&buffer, sizeof(void *), 123) != 0); > } > - ], > + ]])], > [ax_cv_func_posix_memalign_works=yes], > [ax_cv_func_posix_memalign_works=no], > [ax_cv_func_posix_memalign_works=no])]) Hi Ilya, This looks correct but I we don't use HAVE_POSIX_MEMALIGN anywhere. OVS libs do but OVN doesn't do that directly. Shouldn't we just remove this all together instead? What do you think? Thanks, Dumitru
On 8/17/23 09:31, Dumitru Ceara wrote: > On 8/17/23 00:26, Ilya Maximets wrote: >> This fixes the obsolescence warning for AC_TRY_RUN with autoconf 2.70+: >> >> $ ./boot.sh >> configure.ac:141: warning: The macro `AC_TRY_RUN' is obsolete. >> configure.ac:141: You should run autoupdate. >> ./lib/autoconf/general.m4:2997: AC_TRY_RUN is expanded from... >> lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from... >> lib/m4sugar/m4sh.m4:699: AS_IF is expanded from... >> ./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from... >> ./lib/autoconf/general.m4:2270: AC_CACHE_CHECK is expanded from... >> m4/ax_func_posix_memalign.m4:27: AX_FUNC_POSIX_MEMALIGN is expanded from... >> configure.ac:141: the top level >> >> Signed-off-by: Ilya Maximets <i.maximets@ovn.org> >> --- >> m4/ax_func_posix_memalign.m4 | 8 ++++---- >> 1 file changed, 4 insertions(+), 4 deletions(-) >> >> diff --git a/m4/ax_func_posix_memalign.m4 b/m4/ax_func_posix_memalign.m4 >> index bd60adcbc..2442ceca7 100644 >> --- a/m4/ax_func_posix_memalign.m4 >> +++ b/m4/ax_func_posix_memalign.m4 >> @@ -1,5 +1,5 @@ >> # =========================================================================== >> -# http://www.gnu.org/software/autoconf-archive/ax_func_posix_memalign.html >> +# https://www.gnu.org/software/autoconf-archive/ax_func_posix_memalign.html >> # =========================================================================== >> # >> # SYNOPSIS >> @@ -22,12 +22,12 @@ >> # and this notice are preserved. This file is offered as-is, without any >> # warranty. >> >> -#serial 7 >> +#serial 9 >> >> AC_DEFUN([AX_FUNC_POSIX_MEMALIGN], >> [AC_CACHE_CHECK([for working posix_memalign], >> [ax_cv_func_posix_memalign_works], >> - [AC_TRY_RUN([ >> + [AC_RUN_IFELSE([AC_LANG_SOURCE([[ >> #include <stdlib.h> >> >> int >> @@ -39,7 +39,7 @@ main () >> * the size word. */ >> exit (posix_memalign (&buffer, sizeof(void *), 123) != 0); >> } >> - ], >> + ]])], >> [ax_cv_func_posix_memalign_works=yes], >> [ax_cv_func_posix_memalign_works=no], >> [ax_cv_func_posix_memalign_works=no])]) > > Hi Ilya, > > This looks correct but I we don't use HAVE_POSIX_MEMALIGN anywhere. > OVS libs do but OVN doesn't do that directly. > > Shouldn't we just remove this all together instead? What do you think? You're probably right and we could remove the macro, but I didn't test that. Was just fixing a problem at hands. The issue however might arise in the future if the check will ever creep out from OVS'es .c files to its internal (non-public) headers that OVN use. In this case, if OVN will not check, it will silently start using a slow allocation method. Best regards, Ilya Maximets.
On 8/17/23 12:03, Ilya Maximets wrote: > On 8/17/23 09:31, Dumitru Ceara wrote: >> On 8/17/23 00:26, Ilya Maximets wrote: >>> This fixes the obsolescence warning for AC_TRY_RUN with autoconf 2.70+: >>> >>> $ ./boot.sh >>> configure.ac:141: warning: The macro `AC_TRY_RUN' is obsolete. >>> configure.ac:141: You should run autoupdate. >>> ./lib/autoconf/general.m4:2997: AC_TRY_RUN is expanded from... >>> lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from... >>> lib/m4sugar/m4sh.m4:699: AS_IF is expanded from... >>> ./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from... >>> ./lib/autoconf/general.m4:2270: AC_CACHE_CHECK is expanded from... >>> m4/ax_func_posix_memalign.m4:27: AX_FUNC_POSIX_MEMALIGN is expanded from... >>> configure.ac:141: the top level >>> >>> Signed-off-by: Ilya Maximets <i.maximets@ovn.org> >>> --- >>> m4/ax_func_posix_memalign.m4 | 8 ++++---- >>> 1 file changed, 4 insertions(+), 4 deletions(-) >>> >>> diff --git a/m4/ax_func_posix_memalign.m4 b/m4/ax_func_posix_memalign.m4 >>> index bd60adcbc..2442ceca7 100644 >>> --- a/m4/ax_func_posix_memalign.m4 >>> +++ b/m4/ax_func_posix_memalign.m4 >>> @@ -1,5 +1,5 @@ >>> # =========================================================================== >>> -# http://www.gnu.org/software/autoconf-archive/ax_func_posix_memalign.html >>> +# https://www.gnu.org/software/autoconf-archive/ax_func_posix_memalign.html >>> # =========================================================================== >>> # >>> # SYNOPSIS >>> @@ -22,12 +22,12 @@ >>> # and this notice are preserved. This file is offered as-is, without any >>> # warranty. >>> >>> -#serial 7 >>> +#serial 9 >>> >>> AC_DEFUN([AX_FUNC_POSIX_MEMALIGN], >>> [AC_CACHE_CHECK([for working posix_memalign], >>> [ax_cv_func_posix_memalign_works], >>> - [AC_TRY_RUN([ >>> + [AC_RUN_IFELSE([AC_LANG_SOURCE([[ >>> #include <stdlib.h> >>> >>> int >>> @@ -39,7 +39,7 @@ main () >>> * the size word. */ >>> exit (posix_memalign (&buffer, sizeof(void *), 123) != 0); >>> } >>> - ], >>> + ]])], >>> [ax_cv_func_posix_memalign_works=yes], >>> [ax_cv_func_posix_memalign_works=no], >>> [ax_cv_func_posix_memalign_works=no])]) >> >> Hi Ilya, >> >> This looks correct but I we don't use HAVE_POSIX_MEMALIGN anywhere. >> OVS libs do but OVN doesn't do that directly. >> >> Shouldn't we just remove this all together instead? What do you think? > > You're probably right and we could remove the macro, but I didn't > test that. Was just fixing a problem at hands. > It was easy to remove but.. > The issue however might arise in the future if the check will > ever creep out from OVS'es .c files to its internal (non-public) > headers that OVN use. In this case, if OVN will not check, it > will silently start using a slow allocation method. > .. indeed OVN uses internal OVS stuff so it's probably safer to keep the check. I pushed it as is. Thanks!
diff --git a/m4/ax_func_posix_memalign.m4 b/m4/ax_func_posix_memalign.m4 index bd60adcbc..2442ceca7 100644 --- a/m4/ax_func_posix_memalign.m4 +++ b/m4/ax_func_posix_memalign.m4 @@ -1,5 +1,5 @@ # =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_func_posix_memalign.html +# https://www.gnu.org/software/autoconf-archive/ax_func_posix_memalign.html # =========================================================================== # # SYNOPSIS @@ -22,12 +22,12 @@ # and this notice are preserved. This file is offered as-is, without any # warranty. -#serial 7 +#serial 9 AC_DEFUN([AX_FUNC_POSIX_MEMALIGN], [AC_CACHE_CHECK([for working posix_memalign], [ax_cv_func_posix_memalign_works], - [AC_TRY_RUN([ + [AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include <stdlib.h> int @@ -39,7 +39,7 @@ main () * the size word. */ exit (posix_memalign (&buffer, sizeof(void *), 123) != 0); } - ], + ]])], [ax_cv_func_posix_memalign_works=yes], [ax_cv_func_posix_memalign_works=no], [ax_cv_func_posix_memalign_works=no])])
This fixes the obsolescence warning for AC_TRY_RUN with autoconf 2.70+: $ ./boot.sh configure.ac:141: warning: The macro `AC_TRY_RUN' is obsolete. configure.ac:141: You should run autoupdate. ./lib/autoconf/general.m4:2997: AC_TRY_RUN is expanded from... lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from... lib/m4sugar/m4sh.m4:699: AS_IF is expanded from... ./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from... ./lib/autoconf/general.m4:2270: AC_CACHE_CHECK is expanded from... m4/ax_func_posix_memalign.m4:27: AX_FUNC_POSIX_MEMALIGN is expanded from... configure.ac:141: the top level Signed-off-by: Ilya Maximets <i.maximets@ovn.org> --- m4/ax_func_posix_memalign.m4 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)