Dieter Bloms
2012-Jul-23 11:49 UTC
configure.ac not correct with test about libm ? (patch included)
Hi, I want to compile xen-unstable (last commit 25622:3c426da4788e) on alpinelinux. During the run of configure there is an error message like: "checking for isnan in -lm... no" I discussed this with the maintainer of the alpinelinux distribution and he told me, that the macro in configure.ac is wrong. I found out, that isnan is a macro not a function, so we have to use AC_CHECK_DECLS instead of AC_CHECK_LIB. So made this little patch to get it work: --snip-- diff -r 3c426da4788e tools/configure.ac --- a/tools/configure.ac Sun Jul 22 16:37:25 2012 +0100 +++ b/tools/configure.ac Mon Jul 23 13:43:16 2012 +0200 @@ -133,7 +133,7 @@ AC_SUBST(zlib) AC_CHECK_LIB([aio], [io_setup], [system_aio="y"], [system_aio="n"]) AC_SUBST(system_aio) -AC_CHECK_LIB([m], [isnan], [], [AC_MSG_ERROR([Could not find libm])]) +AC_CHECK_DECLS([isnan], [], [AC_MSG_ERROR([Could not find libm])], [[#include <math.h>]]) AC_CHECK_LIB([crypto], [MD5], [], [AC_MSG_ERROR([Could not find libcrypto])]) AC_CHECK_LIB([ext2fs], [ext2fs_open2], [libext2fs="y"], [libext2fs="n"]) AC_SUBST(libext2fs) --snip-- maybe someone of the developers is willing to add this little patch. -- Best regards Dieter -- I do not get viruses because I do not use MS software. If you use Outlook then please do not put my email address in your address-book so that WHEN you get a virus it won''t use my address in the From field.
Ian Campbell
2012-Jul-23 11:59 UTC
Re: [Xen-users] configure.ac not correct with test about libm ? (patch included)
On Mon, 2012-07-23 at 12:49 +0100, Dieter Bloms wrote:> Hi, > > I want to compile xen-unstable (last commit 25622:3c426da4788e) on > alpinelinux. > > During the run of configure there is an error message like: > > "checking for isnan in -lm... no" > > I discussed this with the maintainer of the alpinelinux distribution > and he told me, that the macro in configure.ac is wrong. > > I found out, that isnan is a macro not a function, so we have to use > AC_CHECK_DECLS instead of AC_CHECK_LIB.Is isnan always macro, or just in this particular libc implementation? Or does AC_CHECK_DECLS work right whether it is a macro or a function?> So made this little patch to get it work: > > --snip-- > diff -r 3c426da4788e tools/configure.ac > --- a/tools/configure.ac Sun Jul 22 16:37:25 2012 +0100 > +++ b/tools/configure.ac Mon Jul 23 13:43:16 2012 +0200 > @@ -133,7 +133,7 @@ > AC_SUBST(zlib) > AC_CHECK_LIB([aio], [io_setup], [system_aio="y"], [system_aio="n"]) > AC_SUBST(system_aio) > -AC_CHECK_LIB([m], [isnan], [], [AC_MSG_ERROR([Could not find libm])]) > +AC_CHECK_DECLS([isnan], [], [AC_MSG_ERROR([Could not find libm])], [[#include <math.h>]]) > AC_CHECK_LIB([crypto], [MD5], [], [AC_MSG_ERROR([Could not find libcrypto])]) > AC_CHECK_LIB([ext2fs], [ext2fs_open2], [libext2fs="y"], [libext2fs="n"]) > AC_SUBST(libext2fs) > --snip-- > > maybe someone of the developers is willing to add this little patch.Please submit patches to xen-devel according to the procedure in http://wiki.xen.org/wiki/SubmittingXenPatches , I''ve CC''d it this time for you In particular it will need a Signed off by line. Ian.
Ian Campbell
2012-Jul-23 11:59 UTC
Re: configure.ac not correct with test about libm ? (patch included)
On Mon, 2012-07-23 at 12:49 +0100, Dieter Bloms wrote:> Hi, > > I want to compile xen-unstable (last commit 25622:3c426da4788e) on > alpinelinux. > > During the run of configure there is an error message like: > > "checking for isnan in -lm... no" > > I discussed this with the maintainer of the alpinelinux distribution > and he told me, that the macro in configure.ac is wrong. > > I found out, that isnan is a macro not a function, so we have to use > AC_CHECK_DECLS instead of AC_CHECK_LIB.Is isnan always macro, or just in this particular libc implementation? Or does AC_CHECK_DECLS work right whether it is a macro or a function?> So made this little patch to get it work: > > --snip-- > diff -r 3c426da4788e tools/configure.ac > --- a/tools/configure.ac Sun Jul 22 16:37:25 2012 +0100 > +++ b/tools/configure.ac Mon Jul 23 13:43:16 2012 +0200 > @@ -133,7 +133,7 @@ > AC_SUBST(zlib) > AC_CHECK_LIB([aio], [io_setup], [system_aio="y"], [system_aio="n"]) > AC_SUBST(system_aio) > -AC_CHECK_LIB([m], [isnan], [], [AC_MSG_ERROR([Could not find libm])]) > +AC_CHECK_DECLS([isnan], [], [AC_MSG_ERROR([Could not find libm])], [[#include <math.h>]]) > AC_CHECK_LIB([crypto], [MD5], [], [AC_MSG_ERROR([Could not find libcrypto])]) > AC_CHECK_LIB([ext2fs], [ext2fs_open2], [libext2fs="y"], [libext2fs="n"]) > AC_SUBST(libext2fs) > --snip-- > > maybe someone of the developers is willing to add this little patch.Please submit patches to xen-devel according to the procedure in http://wiki.xen.org/wiki/SubmittingXenPatches , I''ve CC''d it this time for you In particular it will need a Signed off by line. Ian.
Ian Campbell
2012-Jul-25 16:09 UTC
Re: configure.ac not correct with test about libm ? (patch included)
On Mon, 2012-07-23 at 12:59 +0100, Ian Campbell wrote:> On Mon, 2012-07-23 at 12:49 +0100, Dieter Bloms wrote: > > Hi, > > > > I want to compile xen-unstable (last commit 25622:3c426da4788e) on > > alpinelinux. > > > > During the run of configure there is an error message like: > > > > "checking for isnan in -lm... no" > > > > I discussed this with the maintainer of the alpinelinux distribution > > and he told me, that the macro in configure.ac is wrong. > > > > I found out, that isnan is a macro not a function, so we have to use > > AC_CHECK_DECLS instead of AC_CHECK_LIB. > > Is isnan always macro, or just in this particular libc implementation? > > Or does AC_CHECK_DECLS work right whether it is a macro or a function? > > > So made this little patch to get it work: > > > > --snip-- > > diff -r 3c426da4788e tools/configure.ac > > --- a/tools/configure.ac Sun Jul 22 16:37:25 2012 +0100 > > +++ b/tools/configure.ac Mon Jul 23 13:43:16 2012 +0200 > > @@ -133,7 +133,7 @@ > > AC_SUBST(zlib) > > AC_CHECK_LIB([aio], [io_setup], [system_aio="y"], [system_aio="n"]) > > AC_SUBST(system_aio) > > -AC_CHECK_LIB([m], [isnan], [], [AC_MSG_ERROR([Could not find libm])]) > > +AC_CHECK_DECLS([isnan], [], [AC_MSG_ERROR([Could not find libm])], [[#include <math.h>]]) > > AC_CHECK_LIB([crypto], [MD5], [], [AC_MSG_ERROR([Could not find libcrypto])]) > > AC_CHECK_LIB([ext2fs], [ext2fs_open2], [libext2fs="y"], [libext2fs="n"]) > > AC_SUBST(libext2fs) > > --snip-- > > > > maybe someone of the developers is willing to add this little patch. > > Please submit patches to xen-devel according to the procedure in > http://wiki.xen.org/wiki/SubmittingXenPatches , I''ve CC''d it this time > for you > > In particular it will need a Signed off by line.Actually don''t worry about this -- it turns out we didn''t need libm anyway and Dario has posted a patch to remove the check altogether.
Ian Campbell
2012-Jul-25 16:09 UTC
Re: [Xen-users] configure.ac not correct with test about libm ? (patch included)
On Mon, 2012-07-23 at 12:59 +0100, Ian Campbell wrote:> On Mon, 2012-07-23 at 12:49 +0100, Dieter Bloms wrote: > > Hi, > > > > I want to compile xen-unstable (last commit 25622:3c426da4788e) on > > alpinelinux. > > > > During the run of configure there is an error message like: > > > > "checking for isnan in -lm... no" > > > > I discussed this with the maintainer of the alpinelinux distribution > > and he told me, that the macro in configure.ac is wrong. > > > > I found out, that isnan is a macro not a function, so we have to use > > AC_CHECK_DECLS instead of AC_CHECK_LIB. > > Is isnan always macro, or just in this particular libc implementation? > > Or does AC_CHECK_DECLS work right whether it is a macro or a function? > > > So made this little patch to get it work: > > > > --snip-- > > diff -r 3c426da4788e tools/configure.ac > > --- a/tools/configure.ac Sun Jul 22 16:37:25 2012 +0100 > > +++ b/tools/configure.ac Mon Jul 23 13:43:16 2012 +0200 > > @@ -133,7 +133,7 @@ > > AC_SUBST(zlib) > > AC_CHECK_LIB([aio], [io_setup], [system_aio="y"], [system_aio="n"]) > > AC_SUBST(system_aio) > > -AC_CHECK_LIB([m], [isnan], [], [AC_MSG_ERROR([Could not find libm])]) > > +AC_CHECK_DECLS([isnan], [], [AC_MSG_ERROR([Could not find libm])], [[#include <math.h>]]) > > AC_CHECK_LIB([crypto], [MD5], [], [AC_MSG_ERROR([Could not find libcrypto])]) > > AC_CHECK_LIB([ext2fs], [ext2fs_open2], [libext2fs="y"], [libext2fs="n"]) > > AC_SUBST(libext2fs) > > --snip-- > > > > maybe someone of the developers is willing to add this little patch. > > Please submit patches to xen-devel according to the procedure in > http://wiki.xen.org/wiki/SubmittingXenPatches , I''ve CC''d it this time > for you > > In particular it will need a Signed off by line.Actually don''t worry about this -- it turns out we didn''t need libm anyway and Dario has posted a patch to remove the check altogether.