Skip to content

BUG: compilation error on Fedora 38 #112

@Cropi

Description

@Cropi

Compilation of tests/syscall_socketcall fails with the following error:

make[2]: Entering directory '/mnt/tests/CoreOS/audit/Sanity/audit-rules-smoke/audit-testsuite/tests/syscall_socketcall'
cc -g -O0 -Wall -D_GNU_SOURCE -m32 -o conn conn.c
In file included from /usr/include/features.h:527,
                 from /usr/include/unistd.h:25,
                 from conn.c:1:
/usr/include/gnu/stubs.h:6:11: fatal error: gnu/stubs-32.h: No such file or directory
    6 | # include <gnu/stubs-32.h>
      |           ^~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [Makefile:8: conn] Error 1
make[2]: Leaving directory '/mnt/tests/CoreOS/audit/Sanity/audit-rules-smoke/audit-testsuite/tests/syscall_socketcall'

In gnu/stubs.h, I have:

/* This file is automatically generated.
   This file selects the right generated file of `__stub_FUNCTION' macros
   based on the architecture being compiled for.  */

#if !defined __x86_64__
# include <gnu/stubs-32.h>
#endif
#if defined __x86_64__ && defined __LP64__
# include <gnu/stubs-64.h>
#endif
#if defined __x86_64__ && defined __ILP32__
# include <gnu/stubs-x32.h>
#endif

The <gnu/stubs-32.h> lib is included if __x86_64__ is not defined. However, this is not available. The reason why x86_64 is undefined, is because we are passing -m32 to the compiler in https://github.com/linux-audit/audit-testsuite/blob/main/tests/syscall_socketcall/Makefile#L8 .

Removing -m32 helps with the compilation, but I think it's there for a reason. Introduced in e276b30 . Any suggestion is appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions