[fedfs-utils] [PATCH] Do not look for libattr. <sys/xattr.h> is enough

Chuck Lever chuck.lever at oracle.com
Tue Jun 24 07:49:13 PDT 2014


Hi Cristian-

On Jun 23, 2014, at 8:05 PM, Cristian Rodríguez <crrodriguez at opensuse.org> wrote:

> El 23/06/14 19:17, Chuck Lever escribió:
>> 
>> On Jun 23, 2014, at 7:00 PM, Cristian Rodríguez <crrodriguez at opensuse.org> wrote:
>> 
>>> El 23/06/14 18:54, Chuck Lever escribió:
>>>> 
>>>> On Jun 23, 2014, at 6:38 PM, Cristian Rodríguez <crrodriguez at opensuse.org> wrote:
>>>> 
>>>>> Of course the package build will have libattr-devel as a build 
>>>>> dependency, since this code include <attr/xattr.h> and will fail 
>>>>> without it.. however...the code is not even linking the attr library so 
>>>>> it will never get used.
>>>>> 
>>>>> AC_CHECK_LIB([attr], [fgetxattr],
>>>>>            [AC_SUBST([LIBATTR], ["-lattr"])
>>>>>              AC_DEFINE([HAVE_LIBATTR], [1],
>>>>>                        [Define if you have libattr])],
>>>>>             [AC_MSG_ERROR([libattr not found.])])
>>>>> 
>>>>> Does not add -lattr to $LIBS and the variable LIBATTR is never 
>>>>> referenced anywhere in the makefiles.. the build succeeds because 
>>>>> libattr duplicates libc functionality….
>>>> 
>>>> Then commit f5c16606 is incorrect: configure.ac should be looking for
>>>> the attr/xattr.h header, not the libattr.so library.
>>> 
>>> Nope, it should be only looking for <sys/xattr.h> as glibc 2.3 that
>>> contains this functionality was released in 2002.. 12 years ago.. the
>>> xattr functions that are provided by glibc will disappear in upcoming
>>> releases of libattr...working on that too..
>> 
>> Can you point me to something that documents the deprecation of attr/xattr.h?
> 
> There is no document about it but it is quite simple.. no one wants to
> maintain duplicate interfaces..
> 
> attr/xattr.h wont go away.. the library and headers will be modified,
> attr/xattr.h will just include <sys/xattr.h>.. the functions that are
> already provided by glibc will only stay available for existing binaries
> but they will disappear from the default version, hence AC_CHECK_LIB or
> similar won't find it there anymore..

> Ok,, attached is a different patch that will probably make everyone
> happy..otherwise we will be arguing about this until next year thing
> that I am not particularly interested in doing.

Thanks for pursuing this. I know that due diligence can sometimes be a
twisty little maze of passages, all alike.

I agree that the current CHECK_LIB(attr) is bogus and should be removed.
But I still don’t understand why the libjunction changes are necessary
if attr/xattr.h is not being deprecated.

No new patch is needed, just a clarification.

--
Chuck Lever
chuck[dot]lever[at]oracle[dot]com






More information about the fedfs-utils-devel mailing list