From: Eryu Guan <guaneryu@gmail.com>
To: Lu Fengqi <lufq.fnst@cn.fujitsu.com>
Cc: fstests@vger.kernel.org, zlang@redhat.com, yangx.jy@cn.fujitsu.com
Subject: Re: [PATCH] build: fix possibly undefined macro: AC_PACKAGE_NEED_GETXATTR_LIBATTR
Date: Mon, 2 Jul 2018 16:18:56 +0800 [thread overview]
Message-ID: <20180702081856.GZ2780@desktop> (raw)
In-Reply-To: <20180702070001.1973-1-lufq.fnst@cn.fujitsu.com>
On Mon, Jul 02, 2018 at 03:00:01PM +0800, Lu Fengqi wrote:
> Because the macro AC_PACKAGE_NEED_GETXATTR_LIBATTR was removed by
> the following commit specified by fixes tag, we also need remove
> AC_PACKAGE_NEED_GETXATTR_LIBATTR from configure.ac.
>
> In addition, the libattr will not be set, after the macro was be
> removed. This cause gcc can't link the libattr for fsstress correctly.
> The macro AC_PACKAGE_NEED_ATTRGET_LIBATTR has been obsoleted, so change
> it to AC_PACKAGE_NEED_ATTRSET_LIBATTR and add it to configure.ac. It can
> help me check libattr and set libattr variable.
>
> Fixes: 42b851446ff1 ("build: remove <attr/xattr.h> check")
> Reported-by: Zorro Lang <zlang@redhat.com>
> Signed-off-by: Lu Fengqi <lufq.fnst@cn.fujitsu.com>
> ---
> Hi, Eryu
>
> I apologize for the previous patch about the build infrastructure that
> caused the master branch to not be compiled.
That's my fault, I didn't test the latest patch but a stale one, your
original patch worked fine. Sorry about that!
>
> Spoiler:
> Regarding the following deprecated functions, I want to replace them
> with the glibc version. And, I will carefully confirm the correctness
> before send patches. Any suggestions?
>
> fsstress.c:762:2: warning: 'attr_list' is deprecated: Use listxattr or
> llistxattr instead [-Wdeprecated-declarations]
> fsstress.c:781:2: warning: 'attr_remove' is deprecated: Use removexattr
> or lremovexattr instead [-Wdeprecated-declarations]
> fsstress.c:801:2: warning: 'attr_set' is deprecated: Use setxattr or
> lsetxattr instead [-Wdeprecated-declarations]
IMHO, replacing the deprecated attr functions looks fine to me. But I'm
not sure if there's any historical reason behind this.
>
> configure.ac | 2 +-
> m4/package_attrdev.m4 | 4 ++--
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index 63ea032dc564..aede4f59a060 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -53,7 +53,7 @@ AC_PACKAGE_NEED_XFS_HANDLE_H
> AC_PACKAGE_NEED_ATTRLIST_LIBHANDLE
> AC_PACKAGE_NEED_ATTRIBUTES_H
> AC_PACKAGE_WANT_ATTRLIST_LIBATTR
> -AC_PACKAGE_NEED_GETXATTR_LIBATTR
> +AC_PACKAGE_NEED_ATTRSET_LIBATTR
>
> AC_PACKAGE_NEED_SYS_ACL_H
> AC_PACKAGE_NEED_ACL_LIBACL_H
> diff --git a/m4/package_attrdev.m4 b/m4/package_attrdev.m4
> index 9a82f241de3a..d994cfc23c25 100644
> --- a/m4/package_attrdev.m4
> +++ b/m4/package_attrdev.m4
> @@ -26,8 +26,8 @@ AC_DEFUN([AC_PACKAGE_WANT_ATTRLIST_LIBATTR],
> AC_SUBST(have_attr_list)
> ])
>
> -AC_DEFUN([AC_PACKAGE_NEED_ATTRGET_LIBATTR],
> - [ AC_CHECK_LIB(attr, attr_get,, [
> +AC_DEFUN([AC_PACKAGE_NEED_ATTRSET_LIBATTR],
> + [ AC_CHECK_LIB(attr, attr_set,, [
Looks fine to me as a hotfix. Thanks!
Eryu
> echo
> echo 'FATAL ERROR: could not find a valid Extended Attributes library.'
> echo 'Install the extended attributes (attr) development package.'
> --
> 2.18.0
>
>
>
next prev parent reply other threads:[~2018-07-02 8:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-02 7:00 [PATCH] build: fix possibly undefined macro: AC_PACKAGE_NEED_GETXATTR_LIBATTR Lu Fengqi
2018-07-02 8:18 ` Eryu Guan [this message]
2018-07-03 22:20 ` Darrick J. Wong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180702081856.GZ2780@desktop \
--to=guaneryu@gmail.com \
--cc=fstests@vger.kernel.org \
--cc=lufq.fnst@cn.fujitsu.com \
--cc=yangx.jy@cn.fujitsu.com \
--cc=zlang@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.