All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH] configure.ac: Fix redefinition of mount_attr by checking sys/mount.h
@ 2022-09-26 16:59 Marcos Paulo de Souza via ltp
  2022-09-26 19:26 ` Petr Vorel
  0 siblings, 1 reply; 6+ messages in thread
From: Marcos Paulo de Souza via ltp @ 2022-09-26 16:59 UTC (permalink / raw)
  To: ltp; +Cc: Marcos Paulo de Souza

mount_setattr and mount_attr are defined in sys/mount.h.

Signed-off-by: Marcos Paulo de Souza <mpdesouza@suse.com>
---
 Tested on openSUSE Tumbleweed

 configure.ac | 1 +
 1 file changed, 1 insertion(+)

diff --git a/configure.ac b/configure.ac
index 1deeffc0c..0e9895415 100644
--- a/configure.ac
+++ b/configure.ac
@@ -71,6 +71,7 @@ AC_CHECK_HEADERS_ONCE([ \
     sys/epoll.h \
     sys/fanotify.h \
     sys/inotify.h \
+    sys/mount.h \
     sys/pidfd.h
     sys/prctl.h \
     sys/shm.h \
-- 
2.37.3


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [LTP] [PATCH] configure.ac: Fix redefinition of mount_attr by checking sys/mount.h
  2022-09-26 16:59 [LTP] [PATCH] configure.ac: Fix redefinition of mount_attr by checking sys/mount.h Marcos Paulo de Souza via ltp
@ 2022-09-26 19:26 ` Petr Vorel
  2022-09-26 22:17   ` Marcos Paulo de Souza
  0 siblings, 1 reply; 6+ messages in thread
From: Petr Vorel @ 2022-09-26 19:26 UTC (permalink / raw)
  To: Marcos Paulo de Souza; +Cc: ltp

Hi Marcos,

> mount_setattr and mount_attr are defined in sys/mount.h.

> Signed-off-by: Marcos Paulo de Souza <mpdesouza@suse.com>
> ---
>  Tested on openSUSE Tumbleweed

>  configure.ac | 1 +
>  1 file changed, 1 insertion(+)

> diff --git a/configure.ac b/configure.ac
> index 1deeffc0c..0e9895415 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -71,6 +71,7 @@ AC_CHECK_HEADERS_ONCE([ \
>      sys/epoll.h \
>      sys/fanotify.h \
>      sys/inotify.h \
> +    sys/mount.h \

Well, we don't add check for this, as sys/mount.h has been here since "ever", so
it'd just make configure little bit slower for no gain.

But you'd have to use somewhere compiler macro #ifdef HAVE_SYS_MOUNT_H, as this
macro is generated by configure script. Adding header to the list does nothing.

You obviously wanted to fix something, could you post the problem you're trying
to solve + steps you did to ML?

BTW I have no problem to build locally on the latest Tumbleweed. Also LTP
package build for Tumbleweed is also fine:
https://build.opensuse.org/package/binaries/benchmark:ltp:devel/ltp/openSUSE_Factory
https://build.opensuse.org/package/binaries/benchmark:ltp:devel/ltp/openSUSE_Tumbleweed

Kind regards,
Petr

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [LTP] [PATCH] configure.ac: Fix redefinition of mount_attr by checking sys/mount.h
  2022-09-26 19:26 ` Petr Vorel
@ 2022-09-26 22:17   ` Marcos Paulo de Souza
  2022-09-27  7:09     ` Petr Vorel
  0 siblings, 1 reply; 6+ messages in thread
From: Marcos Paulo de Souza @ 2022-09-26 22:17 UTC (permalink / raw)
  To: Petr Vorel; +Cc: ltp

On Mon, Sep 26, 2022 at 09:26:33PM +0200, Petr Vorel wrote:
> Hi Marcos,
> 
> > mount_setattr and mount_attr are defined in sys/mount.h.
> 
> > Signed-off-by: Marcos Paulo de Souza <mpdesouza@suse.com>
> > ---
> >  Tested on openSUSE Tumbleweed
> 
> >  configure.ac | 1 +
> >  1 file changed, 1 insertion(+)
> 
> > diff --git a/configure.ac b/configure.ac
> > index 1deeffc0c..0e9895415 100644
> > --- a/configure.ac
> > +++ b/configure.ac
> > @@ -71,6 +71,7 @@ AC_CHECK_HEADERS_ONCE([ \
> >      sys/epoll.h \
> >      sys/fanotify.h \
> >      sys/inotify.h \
> > +    sys/mount.h \
> 
> Well, we don't add check for this, as sys/mount.h has been here since "ever", so
> it'd just make configure little bit slower for no gain.
> 
> But you'd have to use somewhere compiler macro #ifdef HAVE_SYS_MOUNT_H, as this
> macro is generated by configure script. Adding header to the list does nothing.

It wasn't needed in my case, let me explain better below.

> 
> You obviously wanted to fix something, could you post the problem you're trying
> to solve + steps you did to ML?

I was seeing redefinition problems:

In file included from fsconfig01.c:9:
../../../../include/lapi/fsmount.h:55:8: error: redefinition of 'struct mount_attr'
   55 | struct mount_attr {
      |        ^~~~~~~~~~
In file included from /usr/include/sys/mount.h:32,
                 from ../../../../include/lapi/fsmount.h:14:
/usr/include/linux/mount.h:129:8: note: originally defined here
  129 | struct mount_attr {
      |        ^~~~~~~~~~
../../../../include/lapi/fsmount.h:110:19: error: conflicting types for 'mount_setattr'; have 'int(int,  const char *, unsigned int,  struct mount_attr *, size_t)' {aka 'int(int,  const char *, unsigned int,  struct mount_attr *, long unsigned int)'}
  110 | static inline int mount_setattr(int dirfd, const char *from_pathname, unsigned int flags,
      |                   ^~~~~~~~~~~~~
In file included from fsconfig02.c:8:
../../../../include/lapi/fsmount.h:55:8: error: redefinition of 'struct mount_attr'
   55 | struct mount_attr {
      |        ^~~~~~~~~~
/usr/include/sys/mount.h:316:12: note: previous declaration of 'mount_setattr' with type 'int(int,  const char *, unsigned int,  struct mount_attr *, size_t)' {aka 'int(int,  const char *, unsigned int,  struct mount_attr *, long unsigned int)'}
  316 | extern int mount_setattr (int __dfd, const char *__path, unsigned int __flags,
      |            ^~~~~~~~~~~~~
In file included from /usr/include/sys/mount.h:32,
                 from ../../../../include/lapi/fsmount.h:14:
/usr/include/linux/mount.h:129:8: note: originally defined here
  129 | struct mount_attr {
      |        ^~~~~~~~~~
../../../../include/lapi/fsmount.h:110:19: error: conflicting types for 'mount_setattr'; have 'int(int,  const char *, unsigned int,  struct mount_attr *, size_t)' {aka 'int(int,  const char *, unsigned int,  struct mount_attr *, long unsigned int)'}
  110 | static inline int mount_setattr(int dirfd, const char *from_pathname, unsigned int flags,
      |                   ^~~~~~~~~~~~~
/usr/include/sys/mount.h:316:12: note: previous declaration of 'mount_setattr' with type 'int(int,  const char *, unsigned int,  struct mount_attr *, size_t)' {aka 'int(int,  const char *, unsigned int,  struct mount_attr *, long unsigned int)'}
  316 | extern int mount_setattr (int __dfd, const char *__path, unsigned int __flags,
      |            ^~~~~~~~~~~~~
make[4]: *** [../../../../include/mk/rules.mk:45: fsconfig01] Error 1
make[4]: *** Waiting for unfinished jobs....
make[4]: *** [../../../../include/mk/rules.mk:45: fsconfig02] Error 1
make[3]: *** [../../../include/mk/generic_trunk_target.inc:108: all] Error 2
make[2]: *** [../../include/mk/generic_trunk_target.inc:108: all] Error 2
make[1]: *** [../include/mk/generic_trunk_target.inc:108: all] Error 2
make[1]: Leaving directory '/home/mpdesouza/git/ltp/testcases'
make: *** [Makefile:106: testcases-all] Error 2

In my TW system I found that the struct mount_attr was being defined in
sys/mount.h. Checking include/lapi/fsmount.h I found some ifdefs:

...
#ifndef HAVE_STRUCT_MOUNT_ATTR
/*
 * mount_setattr()
 */
struct mount_attr {
        uint64_t attr_set;
        uint64_t attr_clr;
        uint64_t propagation;
        uint64_t userns_fd;
};
#endif
...

#ifndef HAVE_MOUNT_SETATTR
static inline int mount_setattr(int dirfd, const char *from_pathname, unsigned int flags,
                                struct mount_attr *attr, size_t size)
{
        return tst_syscall(__NR_mount_setattr, dirfd, from_pathname, flags,
                           attr, size);
}
#endif /* HAVE_MOUNT_SETATTR */

So, only adding the sys/mount.h entry to the headers list is enough to make
autoconf to find that sys/mount.h defines the same struct and function, fixing
the issue.

> 
> BTW I have no problem to build locally on the latest Tumbleweed. Also LTP
> package build for Tumbleweed is also fine:
> https://build.opensuse.org/package/binaries/benchmark:ltp:devel/ltp/openSUSE_Factory
> https://build.opensuse.org/package/binaries/benchmark:ltp:devel/ltp/openSUSE_Tumbleweed

Interesting... so is there anything wrong with my setup? Am I missing something?

> 
> Kind regards,
> Petr

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [LTP] [PATCH] configure.ac: Fix redefinition of mount_attr by checking sys/mount.h
  2022-09-26 22:17   ` Marcos Paulo de Souza
@ 2022-09-27  7:09     ` Petr Vorel
  2022-09-27 13:10       ` Marcos Paulo de Souza
  0 siblings, 1 reply; 6+ messages in thread
From: Petr Vorel @ 2022-09-27  7:09 UTC (permalink / raw)
  To: Marcos Paulo de Souza; +Cc: ltp

Hi Marcos,

...
> > > +++ b/configure.ac
> > > @@ -71,6 +71,7 @@ AC_CHECK_HEADERS_ONCE([ \
> > >      sys/epoll.h \
> > >      sys/fanotify.h \
> > >      sys/inotify.h \
> > > +    sys/mount.h \

> > Well, we don't add check for this, as sys/mount.h has been here since "ever", so
> > it'd just make configure little bit slower for no gain.

> > But you'd have to use somewhere compiler macro #ifdef HAVE_SYS_MOUNT_H, as this
> > macro is generated by configure script. Adding header to the list does nothing.

> It wasn't needed in my case, let me explain better below.
Interesting, maybe I'm missing something.

> > You obviously wanted to fix something, could you post the problem you're trying
> > to solve + steps you did to ML?

> I was seeing redefinition problems:

> In file included from fsconfig01.c:9:
> ../../../../include/lapi/fsmount.h:55:8: error: redefinition of 'struct mount_attr'
>    55 | struct mount_attr {
>       |        ^~~~~~~~~~
> In file included from /usr/include/sys/mount.h:32,
>                  from ../../../../include/lapi/fsmount.h:14:
> /usr/include/linux/mount.h:129:8: note: originally defined here
>   129 | struct mount_attr {
>       |        ^~~~~~~~~~
> ../../../../include/lapi/fsmount.h:110:19: error: conflicting types for 'mount_setattr'; have 'int(int,  const char *, unsigned int,  struct mount_attr *, size_t)' {aka 'int(int,  const char *, unsigned int,  struct mount_attr *, long unsigned int)'}
>   110 | static inline int mount_setattr(int dirfd, const char *from_pathname, unsigned int flags,
>       |                   ^~~~~~~~~~~~~
> In file included from fsconfig02.c:8:
> ../../../../include/lapi/fsmount.h:55:8: error: redefinition of 'struct mount_attr'
>    55 | struct mount_attr {
>       |        ^~~~~~~~~~
> /usr/include/sys/mount.h:316:12: note: previous declaration of 'mount_setattr' with type 'int(int,  const char *, unsigned int,  struct mount_attr *, size_t)' {aka 'int(int,  const char *, unsigned int,  struct mount_attr *, long unsigned int)'}
>   316 | extern int mount_setattr (int __dfd, const char *__path, unsigned int __flags,
>       |            ^~~~~~~~~~~~~
> In file included from /usr/include/sys/mount.h:32,
>                  from ../../../../include/lapi/fsmount.h:14:
> /usr/include/linux/mount.h:129:8: note: originally defined here
>   129 | struct mount_attr {
>       |        ^~~~~~~~~~
> ../../../../include/lapi/fsmount.h:110:19: error: conflicting types for 'mount_setattr'; have 'int(int,  const char *, unsigned int,  struct mount_attr *, size_t)' {aka 'int(int,  const char *, unsigned int,  struct mount_attr *, long unsigned int)'}
>   110 | static inline int mount_setattr(int dirfd, const char *from_pathname, unsigned int flags,
>       |                   ^~~~~~~~~~~~~
> /usr/include/sys/mount.h:316:12: note: previous declaration of 'mount_setattr' with type 'int(int,  const char *, unsigned int,  struct mount_attr *, size_t)' {aka 'int(int,  const char *, unsigned int,  struct mount_attr *, long unsigned int)'}
>   316 | extern int mount_setattr (int __dfd, const char *__path, unsigned int __flags,
>       |            ^~~~~~~~~~~~~
> make[4]: *** [../../../../include/mk/rules.mk:45: fsconfig01] Error 1
> make[4]: *** Waiting for unfinished jobs....
> make[4]: *** [../../../../include/mk/rules.mk:45: fsconfig02] Error 1
> make[3]: *** [../../../include/mk/generic_trunk_target.inc:108: all] Error 2
> make[2]: *** [../../include/mk/generic_trunk_target.inc:108: all] Error 2
> make[1]: *** [../include/mk/generic_trunk_target.inc:108: all] Error 2
> make[1]: Leaving directory '/home/mpdesouza/git/ltp/testcases'
> make: *** [Makefile:106: testcases-all] Error 2

> In my TW system I found that the struct mount_attr was being defined in
> sys/mount.h. Checking include/lapi/fsmount.h I found some ifdefs:

> ...
> #ifndef HAVE_STRUCT_MOUNT_ATTR
> /*
>  * mount_setattr()
>  */
> struct mount_attr {
>         uint64_t attr_set;
>         uint64_t attr_clr;
>         uint64_t propagation;
>         uint64_t userns_fd;
> };
> #endif
> ...

> #ifndef HAVE_MOUNT_SETATTR
> static inline int mount_setattr(int dirfd, const char *from_pathname, unsigned int flags,
>                                 struct mount_attr *attr, size_t size)
> {
>         return tst_syscall(__NR_mount_setattr, dirfd, from_pathname, flags,
>                            attr, size);
> }
> #endif /* HAVE_MOUNT_SETATTR */

> So, only adding the sys/mount.h entry to the headers list is enough to make
> autoconf to find that sys/mount.h defines the same struct and function, fixing
> the issue.
Hm, I'm likely missing something :).

$ rpm -q glibc
glibc-2.36-5.1.x86_64

$ grep -B2 '^struct mount_attr' /usr/include/sys/mount.h
#ifndef MOUNT_ATTR_SIZE_VER0
/* For mount_setattr.  */
struct mount_attr

=> I'm not sure who/where is supposed to define MOUNT_ATTR_SIZE_VER0.
Is it in your config?
Do you have different config than mine?

grep MOUNT include/config.h
#define HAVE_FSMOUNT 1
#define HAVE_LINUX_MOUNT_H 1
#define HAVE_MOUNT_SETATTR 1
#define HAVE_MOVE_MOUNT 1
#define HAVE_STRUCT_MOUNT_ATTR 1
(i.e. HAVE_STRUCT_MOUNT_ATTR found with code in current master)

I also tested fedora rawhide (glibc 2.36.9000), which we don't have in our CI:
https://github.com/pevik/ltp/actions/runs/3133529596
Works well.

> > BTW I have no problem to build locally on the latest Tumbleweed. Also LTP
> > package build for Tumbleweed is also fine:
> > https://build.opensuse.org/package/binaries/benchmark:ltp:devel/ltp/openSUSE_Factory
> > https://build.opensuse.org/package/binaries/benchmark:ltp:devel/ltp/openSUSE_Tumbleweed

> Interesting... so is there anything wrong with my setup? Am I missing something?

Hard to tell. Could you share your commands?
I suppose it's the usual: use gcc and in the root directory:
make autotools && ./configure && make -j`nproc`

Kind regards,
Petr

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [LTP] [PATCH] configure.ac: Fix redefinition of mount_attr by checking sys/mount.h
  2022-09-27  7:09     ` Petr Vorel
@ 2022-09-27 13:10       ` Marcos Paulo de Souza
  2022-09-27 20:08         ` Petr Vorel
  0 siblings, 1 reply; 6+ messages in thread
From: Marcos Paulo de Souza @ 2022-09-27 13:10 UTC (permalink / raw)
  To: Petr Vorel; +Cc: ltp

On Tue, Sep 27, 2022 at 09:09:46AM +0200, Petr Vorel wrote:
> Hi Marcos,
> 
> ...
> > > > +++ b/configure.ac
> > > > @@ -71,6 +71,7 @@ AC_CHECK_HEADERS_ONCE([ \
> > > >      sys/epoll.h \
> > > >      sys/fanotify.h \
> > > >      sys/inotify.h \
> > > > +    sys/mount.h \
> 
> > > Well, we don't add check for this, as sys/mount.h has been here since "ever", so
> > > it'd just make configure little bit slower for no gain.
> 
> > > But you'd have to use somewhere compiler macro #ifdef HAVE_SYS_MOUNT_H, as this
> > > macro is generated by configure script. Adding header to the list does nothing.
> 
> > It wasn't needed in my case, let me explain better below.
> Interesting, maybe I'm missing something.
> 
> > > You obviously wanted to fix something, could you post the problem you're trying
> > > to solve + steps you did to ML?
> 
> > I was seeing redefinition problems:
> 
> > In file included from fsconfig01.c:9:
> > ../../../../include/lapi/fsmount.h:55:8: error: redefinition of 'struct mount_attr'
> >    55 | struct mount_attr {
> >       |        ^~~~~~~~~~
> > In file included from /usr/include/sys/mount.h:32,
> >                  from ../../../../include/lapi/fsmount.h:14:
> > /usr/include/linux/mount.h:129:8: note: originally defined here
> >   129 | struct mount_attr {
> >       |        ^~~~~~~~~~
> > ../../../../include/lapi/fsmount.h:110:19: error: conflicting types for 'mount_setattr'; have 'int(int,  const char *, unsigned int,  struct mount_attr *, size_t)' {aka 'int(int,  const char *, unsigned int,  struct mount_attr *, long unsigned int)'}
> >   110 | static inline int mount_setattr(int dirfd, const char *from_pathname, unsigned int flags,
> >       |                   ^~~~~~~~~~~~~
> > In file included from fsconfig02.c:8:
> > ../../../../include/lapi/fsmount.h:55:8: error: redefinition of 'struct mount_attr'
> >    55 | struct mount_attr {
> >       |        ^~~~~~~~~~
> > /usr/include/sys/mount.h:316:12: note: previous declaration of 'mount_setattr' with type 'int(int,  const char *, unsigned int,  struct mount_attr *, size_t)' {aka 'int(int,  const char *, unsigned int,  struct mount_attr *, long unsigned int)'}
> >   316 | extern int mount_setattr (int __dfd, const char *__path, unsigned int __flags,
> >       |            ^~~~~~~~~~~~~
> > In file included from /usr/include/sys/mount.h:32,
> >                  from ../../../../include/lapi/fsmount.h:14:
> > /usr/include/linux/mount.h:129:8: note: originally defined here
> >   129 | struct mount_attr {
> >       |        ^~~~~~~~~~
> > ../../../../include/lapi/fsmount.h:110:19: error: conflicting types for 'mount_setattr'; have 'int(int,  const char *, unsigned int,  struct mount_attr *, size_t)' {aka 'int(int,  const char *, unsigned int,  struct mount_attr *, long unsigned int)'}
> >   110 | static inline int mount_setattr(int dirfd, const char *from_pathname, unsigned int flags,
> >       |                   ^~~~~~~~~~~~~
> > /usr/include/sys/mount.h:316:12: note: previous declaration of 'mount_setattr' with type 'int(int,  const char *, unsigned int,  struct mount_attr *, size_t)' {aka 'int(int,  const char *, unsigned int,  struct mount_attr *, long unsigned int)'}
> >   316 | extern int mount_setattr (int __dfd, const char *__path, unsigned int __flags,
> >       |            ^~~~~~~~~~~~~
> > make[4]: *** [../../../../include/mk/rules.mk:45: fsconfig01] Error 1
> > make[4]: *** Waiting for unfinished jobs....
> > make[4]: *** [../../../../include/mk/rules.mk:45: fsconfig02] Error 1
> > make[3]: *** [../../../include/mk/generic_trunk_target.inc:108: all] Error 2
> > make[2]: *** [../../include/mk/generic_trunk_target.inc:108: all] Error 2
> > make[1]: *** [../include/mk/generic_trunk_target.inc:108: all] Error 2
> > make[1]: Leaving directory '/home/mpdesouza/git/ltp/testcases'
> > make: *** [Makefile:106: testcases-all] Error 2
> 
> > In my TW system I found that the struct mount_attr was being defined in
> > sys/mount.h. Checking include/lapi/fsmount.h I found some ifdefs:
> 
> > ...
> > #ifndef HAVE_STRUCT_MOUNT_ATTR
> > /*
> >  * mount_setattr()
> >  */
> > struct mount_attr {
> >         uint64_t attr_set;
> >         uint64_t attr_clr;
> >         uint64_t propagation;
> >         uint64_t userns_fd;
> > };
> > #endif
> > ...
> 
> > #ifndef HAVE_MOUNT_SETATTR
> > static inline int mount_setattr(int dirfd, const char *from_pathname, unsigned int flags,
> >                                 struct mount_attr *attr, size_t size)
> > {
> >         return tst_syscall(__NR_mount_setattr, dirfd, from_pathname, flags,
> >                            attr, size);
> > }
> > #endif /* HAVE_MOUNT_SETATTR */
> 
> > So, only adding the sys/mount.h entry to the headers list is enough to make
> > autoconf to find that sys/mount.h defines the same struct and function, fixing
> > the issue.
> Hm, I'm likely missing something :).
> 
> $ rpm -q glibc
> glibc-2.36-5.1.x86_64
> 
> $ grep -B2 '^struct mount_attr' /usr/include/sys/mount.h
> #ifndef MOUNT_ATTR_SIZE_VER0
> /* For mount_setattr.  */
> struct mount_attr
> 
> => I'm not sure who/where is supposed to define MOUNT_ATTR_SIZE_VER0.
> Is it in your config?
> Do you have different config than mine?
> 
> grep MOUNT include/config.h
> #define HAVE_FSMOUNT 1
> #define HAVE_LINUX_MOUNT_H 1
> #define HAVE_MOUNT_SETATTR 1
> #define HAVE_MOVE_MOUNT 1
> #define HAVE_STRUCT_MOUNT_ATTR 1
> (i.e. HAVE_STRUCT_MOUNT_ATTR found with code in current master)
> 
> I also tested fedora rawhide (glibc 2.36.9000), which we don't have in our CI:
> https://github.com/pevik/ltp/actions/runs/3133529596
> Works well.
> 
> > > BTW I have no problem to build locally on the latest Tumbleweed. Also LTP
> > > package build for Tumbleweed is also fine:
> > > https://build.opensuse.org/package/binaries/benchmark:ltp:devel/ltp/openSUSE_Factory
> > > https://build.opensuse.org/package/binaries/benchmark:ltp:devel/ltp/openSUSE_Tumbleweed
> 
> > Interesting... so is there anything wrong with my setup? Am I missing something?
> 
> Hard to tell. Could you share your commands?
> I suppose it's the usual: use gcc and in the root directory:
> make autotools && ./configure && make -j`nproc`

My bad. I had this repository for some months already, I might have forgotten to
run "make autotools"... it now build as expected. Thanks and sorry about the
noise.

> 
> Kind regards,
> Petr

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [LTP] [PATCH] configure.ac: Fix redefinition of mount_attr by checking sys/mount.h
  2022-09-27 13:10       ` Marcos Paulo de Souza
@ 2022-09-27 20:08         ` Petr Vorel
  0 siblings, 0 replies; 6+ messages in thread
From: Petr Vorel @ 2022-09-27 20:08 UTC (permalink / raw)
  To: Marcos Paulo de Souza; +Cc: ltp


[-- Attachment #1.1: Type: text/plain, Size: 7952 bytes --]

Hi Marcos,

>
> My bad. I had this repository for some months already, I might have
> forgotten to
> run "make autotools"... it now build as expected. Thanks and sorry about
> the
> noise.
>
> No problem. But Buildroot CI reports similar problem, I wonder if I find
some time in my after work time to look into it
http://autobuild.buildroot.net/results/ef429f764d7b017b37e4a1216a2b7b325bc1ea73/build-end.log

Petr

In file included from
/home/buildroot/autobuild/instance-0/output-1/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/linux/fs.h:19,
                 from ../../../../include/lapi/fs.h:10,
                 from statx09.c:24:
/home/buildroot/autobuild/instance-0/output-1/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/linux/mount.h:95:6:
error: redeclaration of 'enum fsconfig_command'
   95 | enum fsconfig_command {
      |      ^~~~~~~~~~~~~~~~
In file included from statx09.c:21:
/home/buildroot/autobuild/instance-0/output-1/host/lib/gcc/aarch64-buildroot-linux-gnu/11.3.0/include-fixed/sys/mount.h:249:6:
note: originally defined here
  249 | enum fsconfig_command
      |      ^~~~~~~~~~~~~~~~
/home/buildroot/autobuild/instance-0/output-1/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/linux/mount.h:96:9:
error: redeclaration of enumerator 'FSCONFIG_SET_FLAG'
   96 |         FSCONFIG_SET_FLAG       = 0,    /* Set parameter, supplying
no value */
      |         ^~~~~~~~~~~~~~~~~
/home/buildroot/autobuild/instance-0/output-1/host/lib/gcc/aarch64-buildroot-linux-gnu/11.3.0/include-fixed/sys/mount.h:251:3:
note: previous definition of 'FSCONFIG_SET_FLAG' with type 'enum
fsconfig_command'
  251 |   FSCONFIG_SET_FLAG       = 0,    /* Set parameter, supplying no
value */
      |   ^~~~~~~~~~~~~~~~~
/home/buildroot/autobuild/instance-0/output-1/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/linux/mount.h:97:9:
error: redeclaration of enumerator 'FSCONFIG_SET_STRING'
   97 |         FSCONFIG_SET_STRING     = 1,    /* Set parameter, supplying
a string value */
      |         ^~~~~~~~~~~~~~~~~~~
/home/buildroot/autobuild/instance-0/output-1/host/lib/gcc/aarch64-buildroot-linux-gnu/11.3.0/include-fixed/sys/mount.h:253:3:
note: previous definition of 'FSCONFIG_SET_STRING' with type 'enum
fsconfig_command'
  253 |   FSCONFIG_SET_STRING     = 1,    /* Set parameter, supplying a
string value */
      |   ^~~~~~~~~~~~~~~~~~~
/home/buildroot/autobuild/instance-0/output-1/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/linux/mount.h:98:9:
error: redeclaration of enumerator 'FSCONFIG_SET_BINARY'
   98 |         FSCONFIG_SET_BINARY     = 2,    /* Set parameter, supplying
a binary blob value */
      |         ^~~~~~~~~~~~~~~~~~~
/home/buildroot/autobuild/instance-0/output-1/host/lib/gcc/aarch64-buildroot-linux-gnu/11.3.0/include-fixed/sys/mount.h:255:3:
note: previous definition of 'FSCONFIG_SET_BINARY' with type 'enum
fsconfig_command'
  255 |   FSCONFIG_SET_BINARY     = 2,    /* Set parameter, supplying a
binary blob value */
      |   ^~~~~~~~~~~~~~~~~~~
/home/buildroot/autobuild/instance-0/output-1/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/linux/mount.h:99:9:
error: redeclaration of enumerator 'FSCONFIG_SET_PATH'
   99 |         FSCONFIG_SET_PATH       = 3,    /* Set parameter, supplying
an object by path */
      |         ^~~~~~~~~~~~~~~~~
/home/buildroot/autobuild/instance-0/output-1/host/lib/gcc/aarch64-buildroot-linux-gnu/11.3.0/include-fixed/sys/mount.h:257:3:
note: previous definition of 'FSCONFIG_SET_PATH' with type 'enum
fsconfig_command'
  257 |   FSCONFIG_SET_PATH       = 3,    /* Set parameter, supplying an
object by path */
      |   ^~~~~~~~~~~~~~~~~
/home/buildroot/autobuild/instance-0/output-1/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/linux/mount.h:100:9:
error: redeclaration of enumerator 'FSCONFIG_SET_PATH_EMPTY'
  100 |         FSCONFIG_SET_PATH_EMPTY = 4,    /* Set parameter, supplying
an object by (empty) path */
      |         ^~~~~~~~~~~~~~~~~~~~~~~
/home/buildroot/autobuild/instance-0/output-1/host/lib/gcc/aarch64-buildroot-linux-gnu/11.3.0/include-fixed/sys/mount.h:259:3:
note: previous definition of 'FSCONFIG_SET_PATH_EMPTY' with type 'enum
fsconfig_command'
  259 |   FSCONFIG_SET_PATH_EMPTY = 4,    /* Set parameter, supplying an
object by (empty) path */
      |   ^~~~~~~~~~~~~~~~~~~~~~~
/home/buildroot/autobuild/instance-0/output-1/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/linux/mount.h:101:9:
error: redeclaration of enumerator 'FSCONFIG_SET_FD'
  101 |         FSCONFIG_SET_FD         = 5,    /* Set parameter, supplying
an object by fd */
      |         ^~~~~~~~~~~~~~~
/home/buildroot/autobuild/instance-0/output-1/host/lib/gcc/aarch64-buildroot-linux-gnu/11.3.0/include-fixed/sys/mount.h:261:3:
note: previous definition of 'FSCONFIG_SET_FD' with type 'enum
fsconfig_command'
  261 |   FSCONFIG_SET_FD         = 5,    /* Set parameter, supplying an
object by fd */
      |   ^~~~~~~~~~~~~~~
/home/buildroot/autobuild/instance-0/output-1/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/linux/mount.h:102:9:
error: redeclaration of enumerator 'FSCONFIG_CMD_CREATE'
  102 |         FSCONFIG_CMD_CREATE     = 6,    /* Invoke superblock
creation */
      |         ^~~~~~~~~~~~~~~~~~~
/home/buildroot/autobuild/instance-0/output-1/host/lib/gcc/aarch64-buildroot-linux-gnu/11.3.0/include-fixed/sys/mount.h:263:3:
note: previous definition of 'FSCONFIG_CMD_CREATE' with type 'enum
fsconfig_command'
  263 |   FSCONFIG_CMD_CREATE     = 6,    /* Invoke superblock creation */
      |   ^~~~~~~~~~~~~~~~~~~
/home/buildroot/autobuild/instance-0/output-1/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/linux/mount.h:103:9:
error: redeclaration of enumerator 'FSCONFIG_CMD_RECONFIGURE'
  103 |         FSCONFIG_CMD_RECONFIGURE = 7,   /* Invoke superblock
reconfiguration */
      |         ^~~~~~~~~~~~~~~~~~~~~~~~
/home/buildroot/autobuild/instance-0/output-1/host/lib/gcc/aarch64-buildroot-linux-gnu/11.3.0/include-fixed/sys/mount.h:265:3:
note: previous definition of 'FSCONFIG_CMD_RECONFIGURE' with type 'enum
fsconfig_command'
  265 |   FSCONFIG_CMD_RECONFIGURE = 7,   /* Invoke superblock
reconfiguration */
      |   ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from
/home/buildroot/autobuild/instance-0/output-1/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/linux/fs.h:19,
                 from ../../../../include/lapi/fs.h:10,
                 from statx09.c:24:
/home/buildroot/autobuild/instance-0/output-1/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/linux/mount.h:129:8:
error: redefinition of 'struct mount_attr'
  129 | struct mount_attr {
      |        ^~~~~~~~~~
In file included from statx09.c:21:
/home/buildroot/autobuild/instance-0/output-1/host/lib/gcc/aarch64-buildroot-linux-gnu/11.3.0/include-fixed/sys/mount.h:219:8:
note: originally defined here
  219 | struct mount_attr
      |        ^~~~~~~~~~
../../../../include/mk/rules.mk:45: recipe for target 'statx09' failed
make[5]: *** [statx09] Error 1
../../../include/mk/generic_trunk_target.inc:108: recipe for target 'all'
failed
make[4]: *** [all] Error 2
../../include/mk/generic_trunk_target.inc:108: recipe for target 'all'
failed
make[3]: *** [all] Error 2
../include/mk/generic_trunk_target.inc:108: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory
'/home/buildroot/autobuild/instance-0/output-1/build/ltp-testsuite-20220527/testcases'
Makefile:106: recipe for target 'testcases-all' failed
make[1]: *** [testcases-all] Error 2
make[1]: Leaving directory
'/home/buildroot/autobuild/instance-0/output-1/build/ltp-testsuite-20220527'
package/pkg-generic.mk:290: recipe for target
'/home/buildroot/autobuild/instance-0/output-1/build/ltp-testsuite-20220527/.stamp_built'
failed
make: ***
[/home/buildroot/autobuild/instance-0/output-1/build/ltp-testsuite-20220527/.stamp_built]
Error 2
make: Leaving directory '/home/buildroot/autobuild/instance-0/buildroot'

[-- Attachment #1.2: Type: text/html, Size: 9232 bytes --]

[-- Attachment #2: Type: text/plain, Size: 60 bytes --]


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-09-27 20:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-26 16:59 [LTP] [PATCH] configure.ac: Fix redefinition of mount_attr by checking sys/mount.h Marcos Paulo de Souza via ltp
2022-09-26 19:26 ` Petr Vorel
2022-09-26 22:17   ` Marcos Paulo de Souza
2022-09-27  7:09     ` Petr Vorel
2022-09-27 13:10       ` Marcos Paulo de Souza
2022-09-27 20:08         ` Petr Vorel

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.