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 issue on Ubuntu #414

Open
AhmedZI opened this issue Nov 8, 2024 · 6 comments
Open

Compilation issue on Ubuntu #414

AhmedZI opened this issue Nov 8, 2024 · 6 comments

Comments

@AhmedZI
Copy link

AhmedZI commented Nov 8, 2024

NOTE: Please refer to the Reporting Bug and Requesting Features wiki page before creating any new GitHub issues.

I'm getting the following error when compiling from source:

depbase=echo common.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||';
/bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../lib -fPIC -DPIC -D_GNU_SOURCE -g -g -O2 -MT common.lo -MD -MP -MF $depbase.Tpo -c -o common.lo common.c &&
mv -f $depbase.Tpo $depbase.Plo
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../lib -fPIC -DPIC -D_GNU_SOURCE -g -g -O2 -MT common.lo -MD -MP -MF .deps/common.Tpo -c common.c -fPIC -DPIC -o .libs/common.o
common.c: In function ‘audit_is_last_record’:
common.c:52:22: error: ‘AUDIT_MAC_CALIPSO_DEL’ undeclared (first use in this function); did you mean ‘AUDIT_MAC_CIPSOV4_DEL’?
52 | type <= AUDIT_MAC_CALIPSO_DEL)) {
| ^~~~~~~~~~~~~~~~~~~~~
| AUDIT_MAC_CIPSOV4_DEL
common.c:52:22: note: each undeclared identifier is reported only once for each function it appears in
Makefile:434: recipe for target 'common.lo' failed
make[2]: *** [common.lo] Error 1

Screenshot from 2024-11-08 06-16-50

I'm compiling using the following commands:
./autogen.sh ./configure --with-python3=yes --with-libcap-ng=yes --without-golang --with-io_uring --disable-zos-remote make
I also tried the following, but no go:
./configure --with-python3=yes --enable-gssapi-krb5=yes --with-libcap-ng=yes --without-golang --with-io_uring --disable-zos-remote --without-arm --without-aarch64

It's not clear to me if this is a GCC version (I've tried 8.2, 10.4, 11.2, 12.2) issue, or otherwise a missing library.
Thoughts anyone? I'd appreciate the help.

@stevegrubb
Copy link
Contributor

This appears to be a kernel change that broke user space (based on the suggested change). It would appear AUDIT_MAC_CALIPSO_DEL got renamed to AUDIT_MAC_CALIPSOV4_DEL. I don't see that in my kernel headers so you must be on something very new.

@AhmedZI
Copy link
Author

AhmedZI commented Nov 8, 2024

This appears to be a kernel change that broke user space (based on the suggested change). It would appear AUDIT_MAC_CALIPSO_DEL got renamed to AUDIT_MAC_CALIPSOV4_DEL. I don't see that in my kernel headers so you must be on something very new.

uname -a outputs:

Linux w587_st 4.15.0-230-generic #242~16.04.1-Ubuntu SMP Mon Sep 30 14:38:50 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

@stevegrubb
Copy link
Contributor

You should look in /usr/include/kernel/audit.h and see if AUDIT_MAC_CALIPSO_DEL exists. The error suggests it was renamed.

@AhmedZI
Copy link
Author

AhmedZI commented Nov 8, 2024

I can only see these
image

@AhmedZI
Copy link
Author

AhmedZI commented Nov 9, 2024

I added replacements in lib/msg_typetab.h just to see where the compilation is going to go, or stop at again. Then, I got this
image
Does this make any sense at all?

@Cropi
Copy link
Contributor

Cropi commented Nov 27, 2024

The constant #define AUDIT_MAC_CALIPSO_DEL 1419 was introduced in /usr/include/kernel/audit.h in the upstream v4.8 release. However, it appears that your version of the header file has not been updated to include this change. The same applies to other newer fields.

I think that AUDIT_MAC_CALIPSO_DEL was not renamed, instead compiler thinks that you wanted to have AUDIT_MAC_CIPSOV4_DEL because it kinda looks the same. I would report this to Ubuntu/kernel component.

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

3 participants