#13 reenable audit support in systemd and fix link issue
Closed 2 years ago by dcavalca. Opened 3 years ago by dcavalca.

Putting this here so I don't forget, cc @anitazha @filbranden

[1108/2021] cc  -o test-emergency-action test-emergency-action.p/src_test_test-emergency-action.c.o -flto -Wl,--as-needed -Wl,--no-undefined -Wl,-z,relro -Wl,-z,now -fstack-protector -Wl,--gc-sections -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,--start-group src/core/libcore.a src/core/libcore-shared.a src/shared/libsystemd-shared-246.so -pthread -lrt /usr/lib64/libseccomp.so -lpam /lib64/libaudit.so /usr/lib64/libkmod.so /usr/lib64/libselinux.so /usr/lib64/libmount.so -Wl,--end-group '-Wl,-rpath,$ORIGIN/src/shared:/lib64' -Wl,-rpath-link,/lib64 -Wl,-rpath-link,/builddir/build/BUILD/systemd-stable-246.1/x86_64-redhat-linux-gnu/src/shared
FAILED: test-emergency-action 
cc  -o test-emergency-action test-emergency-action.p/src_test_test-emergency-action.c.o -flto -Wl,--as-needed -Wl,--no-undefined -Wl,-z,relro -Wl,-z,now -fstack-protector -Wl,--gc-sections -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,--start-group src/core/libcore.a src/core/libcore-shared.a src/shared/libsystemd-shared-246.so -pthread -lrt /usr/lib64/libseccomp.so -lpam /lib64/libaudit.so /usr/lib64/libkmod.so /usr/lib64/libselinux.so /usr/lib64/libmount.so -Wl,--end-group '-Wl,-rpath,$ORIGIN/src/shared:/lib64' -Wl,-rpath-link,/lib64 -Wl,-rpath-link,/builddir/build/BUILD/systemd-stable-246.1/x86_64-redhat-linux-gnu/src/shared
/usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/libpam.so: undefined reference to symbol 'audit_open'
/lib64/libaudit.so: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

Metadata Update from @dcavalca:
- Issue tagged with: systemd

3 years ago

The error is due to a difference between the versions of binutils in the centos-stream-x86_64 and centos-8-x86_64 chroots. binutils-2.30-90.el8 in CentOS Stream is the bad one and binutils-2.30-79.el8 in CentOS 8 is the working one.

@dcavalca Perhaps it makes sense to file a bug about this...

Yeah, though I'd like to pinpoint this a little bit better first. Let's see:
- 84 https://git.centos.org/rpms/binutils/c/a9feeeb1fd8da4204b52003c1c8d504e4095ec48?branch=c8s
- 85 https://git.centos.org/rpms/binutils/c/d67f1fc6f3a324267d65e421078b94f2839e924d?branch=c8s
- 87 https://git.centos.org/rpms/binutils/c/20249342108a0ec9bc1c51a43c52420889fd0cd4?branch=c8s
- 90 https://git.centos.org/rpms/binutils/c/8eb6fd73426d8e426f6c144fdbaccaa03fffcb51?branch=c8s
are the versions in between. 87 is just some aarch64 stuff, so I think we can ignore it. 85 adds some new assembly instructions, also probably unrelated. That leaves 84 and 90, which are both messing with the linker.

Pushed a temporary workaround that disables the tests affected to unbreak the build

Filed https://bugzilla.redhat.com/show_bug.cgi?id=1930988 with the blame and potential fix.

We can also work around this by building without LTO.

This should be fixed in binutils-2.30-97.el8 which is currently in QA.

Reenabled LTO in systemd-247.3-9.hs.el8 and tagged it for -release.

Metadata Update from @dcavalca:
- Issue status updated to: Closed (was: Open)

2 years ago

Login to comment on this ticket.

Metadata