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

BUG: compilation error on Fedora 38 #112

Open
Cropi opened this issue Jun 28, 2024 · 1 comment
Open

BUG: compilation error on Fedora 38 #112

Cropi opened this issue Jun 28, 2024 · 1 comment
Labels

Comments

@Cropi
Copy link

Cropi commented Jun 28, 2024

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.

@pcmoore pcmoore changed the title Compilation error on Fedora 38 BUG: compilation error on Fedora 38 Jul 1, 2024
@pcmoore pcmoore added the bug label Jul 1, 2024
@pcmoore
Copy link
Contributor

pcmoore commented Jul 1, 2024

Everything compiles fine on my Rawhide (currently F41) based system. On my Rawhide system the stubs-32.h header file is provided by the glibc-devel-2.39.9000-26.fc41.i686 package:

% rpm -qf /usr/include/gnu/stubs-32.h
glibc-devel-2.39.9000-26.fc41.i686

It is worth noting that Fedora 38 has now reached end-of-life status, but if I look at Fedora 39 it appears that i686 builds are still available.

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

No branches or pull requests

2 participants