Skip to contentSkip to conversation

configure.ac: Fix redefinition of mount_attr by checking sys/mount.h

PATCH In review Marcos Paulo de Souza via ltp 4 participants 6 messages Sep 26, 2022 – Sep 27, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 configure.ac: Fix redefinition of mount_attr by checking sys/mount.h

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

---
Tested on openSUSE Tumbleweed

 configure.ac | 1 +
 1 file changed, 1 insertion(+)
configure.ac +1 -0
index 1deeffc0c..0e9895415 100644
@@ -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 \
Signature · 5 lines
2.37.3


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
#1 lore raw

Hi Marcos,

Quoted 14 lines

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

---
Tested on openSUSE Tumbleweed

 configure.ac | 1 +
 1 file changed, 1 insertion(+)
configure.ac +0 -0
index 1deeffc0c..0e9895415 100644

configure.ac AC_CHECK_HEADERS_ONCE([ \ · line 74

Quoted 4 lines
configure.ac +1 -0
@@ -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

Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
#2 lore raw
Quoted 24 lines · Petr Vorel

Hi Marcos,

Quoted 14 lines

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

---
Tested on openSUSE Tumbleweed

 configure.ac | 1 +
 1 file changed, 1 insertion(+)
configure.ac +0 -0
index 1deeffc0c..0e9895415 100644

configure.ac AC_CHECK_HEADERS_ONCE([ \ · line 74

Quoted 4 lines
configure.ac +1 -0
@@ -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.

Quoted 2 lines

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.

Quoted 3 lines

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.

Quoted 5 lines

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?

Quoted 3 lines

Kind regards,
Petr

Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
#3 lore raw

Hi Marcos,

...

Quoted 10 lines
Quoted 9 lines

configure.ac AC_CHECK_HEADERS_ONCE([ \ · line 74

Quoted 6 lines

+++ b/configure.ac

configure.ac +1 -0
@@ -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.

Quoted 4 lines
Quoted 2 lines

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.

Quoted 70 lines
Quoted 2 lines

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 */

Quoted 3 lines

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.

Quoted 6 lines
Quoted 4 lines

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 -jnproc

Kind regards,
Petr

Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
#4 lore raw
Quoted 123 lines · Petr Vorel

Hi Marcos,

...

Quoted 10 lines
Quoted 9 lines

configure.ac AC_CHECK_HEADERS_ONCE([ \ · line 74

Quoted 6 lines

+++ b/configure.ac

configure.ac +1 -0
@@ -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.

Quoted 4 lines
Quoted 2 lines

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.

Quoted 70 lines
Quoted 2 lines

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 */

Quoted 3 lines

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.

Quoted 4 lines
Quoted 4 lines

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

Quoted 5 lines
Quoted 1 line

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 -jnproc

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.

Quoted 3 lines

Kind regards,
Petr

Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
#5 lore raw

Hi Marcos,

Quoted 8 lines

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'

Signature · 2 lines
-- 
Mailing list info: https://lists.linux.it/listinfo/ltp