Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation error when building against linux-rolling-stable branch headers #1123

Open
DaanDeMeyer opened this issue Jan 24, 2024 · 22 comments

Comments

@DaanDeMeyer
Copy link

In file included from /usr/include/xfs/xfs.h:9,
                 from /usr/include/xfs/xqm.h:9,
                 from quotactl07.c:25:
/usr/include/xfs/linux.h: In function ‘platform_zero_range’:
/usr/include/xfs/linux.h:188:15: error: implicit declaration of function ‘fallocate’ [-Wimplicit-function-declaration]
  188 |         ret = fallocate(fd, FALLOC_FL_ZERO_RANGE, start, len);
      |               ^~~~~~~~~
/usr/include/xfs/xqm.h: At top level:
/usr/include/xfs/xqm.h:167:8: error: redefinition of ‘struct fs_qfilestatv’
  167 | struct fs_qfilestatv {
      |        ^~~~~~~~~~~~~
In file included from quotactl_syscall_var.h:10,
                 from quotactl07.c:22:
../../../../include/lapi/quotactl.h:42:8: note: originally defined here
   42 | struct fs_qfilestatv {
      |        ^~~~~~~~~~~~~
/usr/include/xfs/xqm.h:174:8: error: redefinition of ‘struct fs_quota_statv’
  174 | struct fs_quota_statv {
      |        ^~~~~~~~~~~~~~
../../../../include/lapi/quotactl.h:49:8: note: originally defined here
   49 | struct fs_quota_statv {
      |        ^~~~~~~~~~~~~~
In file included from quotactl03.c:35:
/usr/include/xfs/xqm.h:167:8: error: redefinition of ‘struct fs_qfilestatv’
  167 | struct fs_qfilestatv {
      |        ^~~~~~~~~~~~~
In file included from quotactl_syscall_var.h:10,
                 from quotactl03.c:32:
../../../../include/lapi/quotactl.h:42:8: note: originally defined here
   42 | struct fs_qfilestatv {
      |        ^~~~~~~~~~~~~
/usr/include/xfs/xqm.h:174:8: error: redefinition of ‘struct fs_quota_statv’
  174 | struct fs_quota_statv {
      |        ^~~~~~~~~~~~~~
../../../../include/lapi/quotactl.h:49:8: note: originally defined here
   49 | struct fs_quota_statv {
      |        ^~~~~~~~~~~~~~
In file included from quotactl02.h:18,
                 from quotactl05.c:21:
/usr/include/xfs/xqm.h:167:8: error: redefinition of ‘struct fs_qfilestatv’
  167 | struct fs_qfilestatv {
      |        ^~~~~~~~~~~~~
In file included from quotactl_syscall_var.h:10,
                 from quotactl02.h:15:
../../../../include/lapi/quotactl.h:42:8: note: originally defined here
   42 | struct fs_qfilestatv {
      |        ^~~~~~~~~~~~~
/usr/include/xfs/xqm.h:174:8: error: redefinition of ‘struct fs_quota_statv’
  174 | struct fs_quota_statv {
      |        ^~~~~~~~~~~~~~
../../../../include/lapi/quotactl.h:49:8: note: originally defined here
   49 | struct fs_quota_statv {
      |        ^~~~~~~~~~~~~~
In file included from quotactl02.h:18,
                 from quotactl02.c:28:
/usr/include/xfs/xqm.h:167:8: error: redefinition of ‘struct fs_qfilestatv’
  167 | struct fs_qfilestatv {
      |        ^~~~~~~~~~~~~
In file included from quotactl_syscall_var.h:10,
                 from quotactl02.h:15:
../../../../include/lapi/quotactl.h:42:8: note: originally defined here
   42 | struct fs_qfilestatv {
      |        ^~~~~~~~~~~~~
/usr/include/xfs/xqm.h:174:8: error: redefinition of ‘struct fs_quota_statv’
  174 | struct fs_quota_statv {
      |        ^~~~~~~~~~~~~~
../../../../include/lapi/quotactl.h:49:8: note: originally defined here
   49 | struct fs_quota_statv {
      |        ^~~~~~~~~~~~~~
@metan-ucw
Copy link
Member

This looks like configure script failed to detect that these definitions are present and the fallback definitions in LTP are enabled unexpectedly.

Are you sure that you have run the configure script against the right headers?

What is the include/config.h is the HAVE_STRUCT_FS_QUOTA_STATV defined to 1 there?

@pevik
Copy link
Member

pevik commented Jan 25, 2024

Also, make sure you always run before compilation:

make autotools && ./configure

@DaanDeMeyer
Copy link
Author

DaanDeMeyer commented Jan 25, 2024

My build script:

cp --archive --update --reflink=auto ltp "$BUILDDIR"
cd "$BUILDDIR/ltp"
make -j "$(nproc)" autotools
./configure
make -j "$(nproc)"
make install

(Unrelated but it sucks that I can't do an out of tree build, it'd be great if that was possible)

./configure output:

checking for struct fs_quota_statv... no
sh-5.2# grep -r "fs_quota_statv" /usr/include/linux/
/usr/include/linux/dqblk_xfs.h: * fs_quota_statv is used by Q_XGETQSTATV for a given file system. It provides
/usr/include/linux/dqblk_xfs.h: * fs_quota_statv.qs_version to determine the return data layout of
/usr/include/linux/dqblk_xfs.h: * fs_quota_statv.  The kernel will fill the data fields relevant to that
/usr/include/linux/dqblk_xfs.h:#define FS_QSTATV_VERSION1       1       /* fs_quota_statv.qs_version */
/usr/include/linux/dqblk_xfs.h:struct fs_quota_statv {

@pevik
Copy link
Member

pevik commented Jan 25, 2024

Strange.

BTW out of tree build might have some minor bugs, but generally it should be working.

See https://github.com/linux-test-project/ltp/blob/master/INSTALL#L75
It's even somehow supported in CI build script:
https://github.com/linux-test-project/ltp/blob/master/build.sh
https://github.com/linux-test-project/ltp/actions/runs/7653264167/job/20854751842

@metan-ucw
Copy link
Member

The configure check for the structure looks like:

AC_CHECK_TYPES([struct fs_quota_statv],,,[#include <xfs/xqm.h>])

We are not looking under include/linux but include/xfs which is part of xfsprogs and not linux-headers. And it looks like this package wasn't installed/found during configure phase, but is present during build.

@DaanDeMeyer
Copy link
Author

@metan-ucw Something about ./configure is still going wrong:

sh-5.2# grep -r "fs_quota_statv" /usr/include/xfs
/usr/include/xfs/xqm.h:#define FS_QSTATV_VERSION1       1       /* fs_quota_statv.qs_version */
/usr/include/xfs/xqm.h:struct fs_quota_statv {
sh-5.2# ./configure
...
checking for struct fs_quota_statv... no
...

@metan-ucw
Copy link
Member

@DaanDeMeyer this really sounds like a system paths are not set up properly, e.g. compiler looks into a different path than /usr/include for headers.

@DaanDeMeyer
Copy link
Author

@metan-ucw It seems the xfs headers are broken somehow:

configure:5693: checking for struct fs_quota_statv
configure:5693: gcc -c -g -O2  conftest.c >&5
In file included from /usr/include/xfs/xfs.h:9,
                 from /usr/include/xfs/xqm.h:9,
                 from conftest.c:136:
/usr/include/xfs/linux.h: In function 'platform_zero_range':
/usr/include/xfs/linux.h:188:15: error: implicit declaration of function 'fallocate' [-Wimplicit-function-declaration]
  188 |         ret = fallocate(fd, FALLOC_FL_ZERO_RANGE, start, len);
      |               ^~~~~~~~~
configure:5693: $? = 1
configure: failed program was:

@DaanDeMeyer
Copy link
Author

DaanDeMeyer commented Jan 25, 2024

@metan-ucw _GNU_SOURCE should be defined before including <xfs/xqm.h>. That fixes the issue.

@DaanDeMeyer
Copy link
Author

#1124

@metan-ucw
Copy link
Member

@DaanDeMeyer that's really strange I did look at the git repository of xfs-progs and there isn't a single use of __GNU_SOURCE or __USE_GNU. This failure does not show up in our CI either. Where does you xfstools package came from?

@DaanDeMeyer
Copy link
Author

@metan-ucw This is on Fedora 39 with xfsprogs-devel installed straight from the fedora repositories

@pevik
Copy link
Member

pevik commented Jan 25, 2024

@wangli5665 Can you please have a look? Is it #1124 really needed?

@DaanDeMeyer FYI we have Fedora 39 build: https://github.com/linux-test-project/ltp/actions/runs/7653264167/job/20854753494

@DaanDeMeyer
Copy link
Author

This build already seems to differ in that it uses clang, I'm using gcc

@metan-ucw
Copy link
Member

@DaanDeMeyer I just installed Fedora-39 VM and the configure script works as expected both with and without xfsprogs-devel installed. I can't reproduce the failure at all.

@metan-ucw
Copy link
Member

metan-ucw commented Jan 25, 2024

On Fedora-39:

$ cat test.c
#include <xfs/xqm.h>

int main(void)
{
  if (sizeof(struct fs_quota_statv))
    return 0;

  return 0;
}

$ gcc -W -Wall test.c
$ echo $?
0

@DaanDeMeyer
Copy link
Author

DaanDeMeyer commented Jan 25, 2024

@metan-ucw I got the distro version wrong, the build is done in Fedora rawhide. This is with gcc 14.

Reproduce instructions:

$ git clone https://github.com/systemd/mkosi/
$ ln -s $PWD/mkosi/bin/mkosi /usr/local/bin/mkosi
$ git clone https://github.com/DaanDeMeyer/mkosi-kernel
$ cd mkosi-kernel
$ tee mkosi.local.conf <<EOF
[Distribution]
Distribution=fedora

[Config]
@Include=modules/kernel
         modules/fstests
         modules/ltp

[Content]
BuildSources=<path-to-ltp-repo>:ltp
EOF
$ mkosi -f

conftest.c from configure:

/* confdefs.h */
#define PACKAGE_NAME "ltp"
#define PACKAGE_TARNAME "ltp"
#define PACKAGE_VERSION "LTP_VERSION"
#define PACKAGE_STRING "ltp LTP_VERSION"
#define PACKAGE_BUGREPORT "[email protected]"
#define PACKAGE_URL ""
#define PACKAGE "ltp"
#define VERSION "LTP_VERSION"
#define HAVE_DECL_IFLA_NET_NS_PID 1
#define HAVE_DECL_MADV_MERGEABLE 1
#define HAVE_DECL_NFTA_CHAIN_ID 1
#define HAVE_DECL_NFTA_VERDICT_CHAIN_ID 1
#define HAVE_DECL_PR_CAPBSET_DROP 1
#define HAVE_DECL_PR_CAPBSET_READ 1
#define HAVE_DECL_SEM_STAT_ANY 1
#define HAVE_STDIO_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRING_H 1
#define HAVE_INTTYPES_H 1
#define HAVE_STDINT_H 1
#define HAVE_STRINGS_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_UNISTD_H 1
#define HAVE_ASM_LDT_H 1
#define HAVE_CPUID_H 1
#define HAVE_EMMINTRIN_H 1
#define HAVE_IFADDRS_H 1
#define HAVE_LINUX_CAN_H 1
#define HAVE_LINUX_CGROUPSTATS_H 1
#define HAVE_LINUX_CRYPTOUSER_H 1
#define HAVE_LINUX_CLOSE_RANGE_H 1
#define HAVE_LINUX_DCCP_H 1
#define HAVE_LINUX_FS_H 1
#define HAVE_LINUX_FUTEX_H 1
#define HAVE_LINUX_GENETLINK_H 1
#define HAVE_LINUX_IF_ALG_H 1
#define HAVE_LINUX_IF_ETHER_H 1
#define HAVE_LINUX_IF_PACKET_H 1
#define HAVE_LINUX_IO_URING_H 1
#define HAVE_LINUX_IOPRIO_H 1
#define HAVE_LINUX_KEYCTL_H 1
#define HAVE_LINUX_MEMPOLICY_H 1
#define HAVE_LINUX_MODULE_H 1
#define HAVE_LINUX_MOUNT_H 1
#define HAVE_LINUX_NETLINK_H 1
#define HAVE_LINUX_SECCOMP_H 1
#define HAVE_LINUX_SECUREBITS_H 1
#define HAVE_LINUX_TLS_H 1
#define HAVE_LINUX_TTY_H 1
#define HAVE_LINUX_TYPES_H 1
#define HAVE_LINUX_USERFAULTFD_H 1
#define HAVE_PTHREAD_H 1
#define HAVE_SYS_EPOLL_H 1
#define HAVE_SYS_FANOTIFY_H 1
#define HAVE_SYS_INOTIFY_H 1
#define HAVE_SYS_PIDFD_H 1
#define HAVE_SYS_PRCTL_H 1
#define HAVE_SYS_SHM_H 1
#define HAVE_SYS_TIMERFD_H 1
#define HAVE_SYS_UTSNAME_H 1
#define HAVE_SYS_XATTR_H 1
#define HAVE_XFS_XQM_H 1
#define STDC_HEADERS 1
#define HAVE_FTS_H 1
#define HAVE_LINUX_VM_SOCKETS_H 1
#define HAVE_CLOSE_RANGE 1
#define HAVE_COPY_FILE_RANGE 1
#define HAVE_EPOLL_PWAIT 1
#define HAVE_EPOLL_PWAIT2 1
#define HAVE_EXECVEAT 1
#define HAVE_FALLOCATE 1
#define HAVE_FSCONFIG 1
#define HAVE_FSMOUNT 1
#define HAVE_FSOPEN 1
#define HAVE_FSPICK 1
#define HAVE_FSTATAT 1
#define HAVE_GETAUXVAL 1
#define HAVE_GETCONTEXT 1
#define HAVE_GETCPU 1
#define HAVE_GETDENTS64 1
#define HAVE_MALLINFO 1
#define HAVE_MALLINFO2 1
#define HAVE_MALLOPT 1
#define HAVE_MODIFY_LDT 1
#define HAVE_MOUNT_SETATTR 1
#define HAVE_MOVE_MOUNT 1
#define HAVE_NAME_TO_HANDLE_AT 1
#define HAVE_OPEN_TREE 1
#define HAVE_OPENAT 1
#define HAVE_PIDFD_GETFD 1
#define HAVE_PIDFD_OPEN 1
#define HAVE_PIDFD_SEND_SIGNAL 1
#define HAVE_PKEY_MPROTECT 1
#define HAVE_PREADV 1
#define HAVE_PREADV2 1
#define HAVE_PROFIL 1
#define HAVE_PWRITEV 1
#define HAVE_PWRITEV2 1
#define HAVE_RAND_R 1
#define HAVE_RECVMMSG 1
#define HAVE_RENAMEAT2 1
#define HAVE_SCHED_GETCPU 1
#define HAVE_SENDMMSG 1
#define HAVE_SETHOSTID 1
#define HAVE_SETNS 1
#define HAVE_SIGPENDING 1
#define HAVE_SPLICE 1
#define HAVE_STATX 1
#define HAVE_SYNC_FILE_RANGE 1
#define HAVE_SYNCFS 1
#define HAVE_TEE 1
#define HAVE_TIMERFD_CREATE 1
#define HAVE_TIMERFD_GETTIME 1
#define HAVE_TIMERFD_SETTIME 1
#define HAVE_UNSHARE 1
#define HAVE_VMSPLICE 1
#define HAVE_MKDTEMP 1
#define HAVE_STRUCT_PERF_EVENT_MMAP_PAGE_AUX_HEAD 1
#define HAVE_STRUCT_SIGACTION_SA_SIGACTION 1
#define HAVE_STRUCT_STATX_STX_MNT_ID 1
#define HAVE_STRUCT_STATX_STX_DIO_MEM_ALIGN 1
#define HAVE_STRUCT_UTSNAME_DOMAINNAME 1
#define HAVE_ENUM_KCMP_TYPE 1
#define HAVE_STRUCT_ACCT_V3 1
#define HAVE_STRUCT_AF_ALG_IV 1
#define HAVE_STRUCT_SOCKADDR_ALG 1
#define HAVE_STRUCT_FANOTIFY_EVENT_INFO_FID 1
#define HAVE_STRUCT_FANOTIFY_EVENT_INFO_ERROR 1
#define HAVE_STRUCT_FANOTIFY_EVENT_INFO_HEADER 1
#define HAVE_STRUCT_FANOTIFY_EVENT_INFO_PIDFD 1
#define HAVE_STRUCT_FILE_DEDUPE_RANGE 1
#define HAVE_STRUCT_FILE_HANDLE 1
/* end confdefs.h.  */
#include <xfs/xqm.h>

int
main (void)
{
if (sizeof (struct fs_quota_statv))
       return 0;
  ;
  return 0;
}

Results:

sh-5.2# gcc -c -g -O2 ltp/test.c 
In file included from /usr/include/xfs/xfs.h:9,
                 from /usr/include/xfs/xqm.h:9,
                 from ltp/test.c:136:
/usr/include/xfs/linux.h: In function ‘platform_zero_range’:
/usr/include/xfs/linux.h:188:15: error: implicit declaration of function ‘fallocate’ [-Wimplicit-function-declaration]
  188 |         ret = fallocate(fd, FALLOC_FL_ZERO_RANGE, start, len);
      |               ^~~~~~~~~

@metan-ucw
Copy link
Member

Given that rawhide is not yet released version it may be as well bug in the fedora. I suppose that something in the headers that are included from the xfs/xfs.h did defined the _GNU_SOURCE previously, now it does not and that did break xfsprogs-devel.

Either way we do have a policy in LTP that we do not accept patches against unreleased codebases unless it's 100% clear that the change will make it into the next release.

@brauner
Copy link

brauner commented Jan 25, 2024

@metan-ucw I got the distro version wrong, the build is done in Fedora rawhide. This is with gcc 14.

Reproduce instructions:

$ git clone https://github.com/systemd/mkosi/
$ ln -s $PWD/mkosi/bin/mkosi /usr/local/bin/mkosi
$ git clone https://github.com/DaanDeMeyer/mkosi-kernel
$ cd mkosi-kernel
$ tee mkosi.local.conf <<EOF
[Distribution]
Distribution=fedora

[Config]
@Include=modules/kernel
         modules/fstests
         modules/ltp

[Content]
BuildSources=<path-to-ltp-repo>:ltp
EOF
$ mkosi -f

conftest.c from configure:

/* confdefs.h */
#define PACKAGE_NAME "ltp"
#define PACKAGE_TARNAME "ltp"
#define PACKAGE_VERSION "LTP_VERSION"
#define PACKAGE_STRING "ltp LTP_VERSION"
#define PACKAGE_BUGREPORT "[email protected]"
#define PACKAGE_URL ""
#define PACKAGE "ltp"
#define VERSION "LTP_VERSION"
#define HAVE_DECL_IFLA_NET_NS_PID 1
#define HAVE_DECL_MADV_MERGEABLE 1
#define HAVE_DECL_NFTA_CHAIN_ID 1
#define HAVE_DECL_NFTA_VERDICT_CHAIN_ID 1
#define HAVE_DECL_PR_CAPBSET_DROP 1
#define HAVE_DECL_PR_CAPBSET_READ 1
#define HAVE_DECL_SEM_STAT_ANY 1
#define HAVE_STDIO_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRING_H 1
#define HAVE_INTTYPES_H 1
#define HAVE_STDINT_H 1
#define HAVE_STRINGS_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_UNISTD_H 1
#define HAVE_ASM_LDT_H 1
#define HAVE_CPUID_H 1
#define HAVE_EMMINTRIN_H 1
#define HAVE_IFADDRS_H 1
#define HAVE_LINUX_CAN_H 1
#define HAVE_LINUX_CGROUPSTATS_H 1
#define HAVE_LINUX_CRYPTOUSER_H 1
#define HAVE_LINUX_CLOSE_RANGE_H 1
#define HAVE_LINUX_DCCP_H 1
#define HAVE_LINUX_FS_H 1
#define HAVE_LINUX_FUTEX_H 1
#define HAVE_LINUX_GENETLINK_H 1
#define HAVE_LINUX_IF_ALG_H 1
#define HAVE_LINUX_IF_ETHER_H 1
#define HAVE_LINUX_IF_PACKET_H 1
#define HAVE_LINUX_IO_URING_H 1
#define HAVE_LINUX_IOPRIO_H 1
#define HAVE_LINUX_KEYCTL_H 1
#define HAVE_LINUX_MEMPOLICY_H 1
#define HAVE_LINUX_MODULE_H 1
#define HAVE_LINUX_MOUNT_H 1
#define HAVE_LINUX_NETLINK_H 1
#define HAVE_LINUX_SECCOMP_H 1
#define HAVE_LINUX_SECUREBITS_H 1
#define HAVE_LINUX_TLS_H 1
#define HAVE_LINUX_TTY_H 1
#define HAVE_LINUX_TYPES_H 1
#define HAVE_LINUX_USERFAULTFD_H 1
#define HAVE_PTHREAD_H 1
#define HAVE_SYS_EPOLL_H 1
#define HAVE_SYS_FANOTIFY_H 1
#define HAVE_SYS_INOTIFY_H 1
#define HAVE_SYS_PIDFD_H 1
#define HAVE_SYS_PRCTL_H 1
#define HAVE_SYS_SHM_H 1
#define HAVE_SYS_TIMERFD_H 1
#define HAVE_SYS_UTSNAME_H 1
#define HAVE_SYS_XATTR_H 1
#define HAVE_XFS_XQM_H 1
#define STDC_HEADERS 1
#define HAVE_FTS_H 1
#define HAVE_LINUX_VM_SOCKETS_H 1
#define HAVE_CLOSE_RANGE 1
#define HAVE_COPY_FILE_RANGE 1
#define HAVE_EPOLL_PWAIT 1
#define HAVE_EPOLL_PWAIT2 1
#define HAVE_EXECVEAT 1
#define HAVE_FALLOCATE 1
#define HAVE_FSCONFIG 1
#define HAVE_FSMOUNT 1
#define HAVE_FSOPEN 1
#define HAVE_FSPICK 1
#define HAVE_FSTATAT 1
#define HAVE_GETAUXVAL 1
#define HAVE_GETCONTEXT 1
#define HAVE_GETCPU 1
#define HAVE_GETDENTS64 1
#define HAVE_MALLINFO 1
#define HAVE_MALLINFO2 1
#define HAVE_MALLOPT 1
#define HAVE_MODIFY_LDT 1
#define HAVE_MOUNT_SETATTR 1
#define HAVE_MOVE_MOUNT 1
#define HAVE_NAME_TO_HANDLE_AT 1
#define HAVE_OPEN_TREE 1
#define HAVE_OPENAT 1
#define HAVE_PIDFD_GETFD 1
#define HAVE_PIDFD_OPEN 1
#define HAVE_PIDFD_SEND_SIGNAL 1
#define HAVE_PKEY_MPROTECT 1
#define HAVE_PREADV 1
#define HAVE_PREADV2 1
#define HAVE_PROFIL 1
#define HAVE_PWRITEV 1
#define HAVE_PWRITEV2 1
#define HAVE_RAND_R 1
#define HAVE_RECVMMSG 1
#define HAVE_RENAMEAT2 1
#define HAVE_SCHED_GETCPU 1
#define HAVE_SENDMMSG 1
#define HAVE_SETHOSTID 1
#define HAVE_SETNS 1
#define HAVE_SIGPENDING 1
#define HAVE_SPLICE 1
#define HAVE_STATX 1
#define HAVE_SYNC_FILE_RANGE 1
#define HAVE_SYNCFS 1
#define HAVE_TEE 1
#define HAVE_TIMERFD_CREATE 1
#define HAVE_TIMERFD_GETTIME 1
#define HAVE_TIMERFD_SETTIME 1
#define HAVE_UNSHARE 1
#define HAVE_VMSPLICE 1
#define HAVE_MKDTEMP 1
#define HAVE_STRUCT_PERF_EVENT_MMAP_PAGE_AUX_HEAD 1
#define HAVE_STRUCT_SIGACTION_SA_SIGACTION 1
#define HAVE_STRUCT_STATX_STX_MNT_ID 1
#define HAVE_STRUCT_STATX_STX_DIO_MEM_ALIGN 1
#define HAVE_STRUCT_UTSNAME_DOMAINNAME 1
#define HAVE_ENUM_KCMP_TYPE 1
#define HAVE_STRUCT_ACCT_V3 1
#define HAVE_STRUCT_AF_ALG_IV 1
#define HAVE_STRUCT_SOCKADDR_ALG 1
#define HAVE_STRUCT_FANOTIFY_EVENT_INFO_FID 1
#define HAVE_STRUCT_FANOTIFY_EVENT_INFO_ERROR 1
#define HAVE_STRUCT_FANOTIFY_EVENT_INFO_HEADER 1
#define HAVE_STRUCT_FANOTIFY_EVENT_INFO_PIDFD 1
#define HAVE_STRUCT_FILE_DEDUPE_RANGE 1
#define HAVE_STRUCT_FILE_HANDLE 1
/* end confdefs.h.  */
#include <xfs/xqm.h>

int
main (void)
{
if (sizeof (struct fs_quota_statv))
       return 0;
  ;
  return 0;
}

Results:

sh-5.2# gcc -c -g -O2 ltp/test.c 
In file included from /usr/include/xfs/xfs.h:9,
                 from /usr/include/xfs/xqm.h:9,
                 from ltp/test.c:136:
/usr/include/xfs/linux.h: In function ‘platform_zero_range’:
/usr/include/xfs/linux.h:188:15: error: implicit declaration of function ‘fallocate’ [-Wimplicit-function-declaration]
  188 |         ret = fallocate(fd, FALLOC_FL_ZERO_RANGE, start, len);
      |               ^~~~~~~~~

Thanks for trying to fix this, @DaanDeMeyer. Worst case we'll just have to wait until Rawhide is released, I guess and until then we might have to skip testing with LTP in mkosi-kernel.

@metan-ucw
Copy link
Member

Any news here?

@DaanDeMeyer
Copy link
Author

Any news here?

Still broken on Rawhide, but given the effort to get fixes merged I kinda gave up on LTP

@wangli5665
Copy link
Member

Sorry for missing this issue, isn't this has been resolved by b3630b5 ?

More discussion: https://lists.linux.it/pipermail/ltp/2024-June/038867.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants