Bug 2343986 - Warning with -mbranch-protection=standard on aarch64
Summary: Warning with -mbranch-protection=standard on aarch64
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: binutils
Version: rawhide
Hardware: aarch64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Nick Clifton
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 2344195 2344330 (view as bug list)
Depends On:
Blocks: F42BetaBlocker 2343981
TreeView+ depends on / blocked
 
Reported: 2025-02-05 15:31 UTC by Mamoru TASAKA
Modified: 2025-02-10 21:55 UTC (History)
15 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2025-02-10 21:55:09 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Fedora Pagure fedora-kde/SIG issue 611 0 None None None 2025-02-06 15:49:16 UTC

Description Mamoru TASAKA 2025-02-05 15:31:50 UTC
From ruby.src code:

With binutils-2.44-1.fc42

$ cat  conftest.c
#include <stdio.h>

int main(void) {
	puts(__func__);
}
$ $ gcc -o conftest -mbranch-protection=standard   conftest.c -lz -lcrypt  -lgmp  >/dev/null  ; echo $?
/usr/lib/gcc/aarch64-redhat-linux/15/../../../../lib64/libz.so: warning: GCS is required by -z gcs, but this shared library lacks the necessary property note. The dynamic loader might not enable GCS or refuse to load the program unless all the shared library dependencies have the GCS marking.
/usr/lib/gcc/aarch64-redhat-linux/15/../../../../lib64/libcrypt.so: warning: GCS is required by -z gcs, but this shared library lacks the necessary property note. The dynamic loader might not enable GCS or refuse to load the program unless all the shared library dependencies have the GCS marking.
/usr/lib/gcc/aarch64-redhat-linux/15/../../../../lib64/libgmp.so: warning: GCS is required by -z gcs, but this shared library lacks the necessary property note. The dynamic loader might not enable GCS or refuse to load the program unless all the shared library dependencies have the GCS marking.
0

binutils-2.43.50-12.fc42 does not show such warnings.

(Trying with gcc-15.0.1-0.7.fc42.aarch64)

Reproducible: Always

Comment 1 Mamoru TASAKA 2025-02-05 16:02:32 UTC
Currently 

$ gcc -o conftest -mbranch-protection=standard   conftest.c -lz -lcrypt  -lgmp -Wl,-z,gcs-report=none

seems a workaround for the above warnings.

Comment 2 Nick Clifton 2025-02-06 08:38:35 UTC
This is actually a problem with the shared libraries.  When AArch64 binaries are built with the -mbranch-protection=standard option they are labelled as supporting the GTS mechanism.  In order for the mechanism to work however all the input binaries (and shared libraries used) need to support GTS, so the linker checks to make sure that this has happened.  In this particular case the conftest.c source file has been compiled with GTS support, as have the GCC support libraries and startup files.  But the libz, libcrypt and libgmp libraries have not.

This is probably a rebuild issue - ie the problem will go away once those libraries are rebuilt with the latest gcc, which should happen in the upcoming mass rebuild.

Comment 3 VĂ­t Ondruch 2025-02-06 11:27:54 UTC
(In reply to Nick Clifton from comment #2)

Thx for the details 👍

> This is probably a rebuild issue - ie the problem will go away once those
> libraries are rebuilt with the latest gcc, which should happen in the
> upcoming mass rebuild.

We are past F42 mass rebuild, aren't we? Or is there some other GCC related mass rebuild planed?

Although GMP for example failed that build:

https://koji.fedoraproject.org/koji/buildinfo?buildID=2620795

Comment 4 Mamoru TASAKA 2025-02-06 13:29:53 UTC
(In reply to Nick Clifton from comment #2)

So your comment means that basically another mass rebuild is needed,
with keeping in mind dependency order?

Comment 5 Siddhesh Poyarekar 2025-02-06 14:06:54 UTC
GMP seems to have failed the mass rebuild and logs (AFAICT) garbage collected.  The other two seem to have succeeded however and appear to have been compiled with -mbranch-protection=standard, so maybe this needs closer inspection to see if the property notes are indeed missing or if there's some other problem.

Comment 6 Siddhesh Poyarekar 2025-02-06 14:50:30 UTC
*** Bug 2344195 has been marked as a duplicate of this bug. ***

Comment 7 Steve Cossette 2025-02-07 10:32:00 UTC
*** Bug 2344330 has been marked as a duplicate of this bug. ***

Comment 8 Fedora Blocker Bugs Application 2025-02-07 11:13:08 UTC
Proposed as a Blocker for 42-beta by Fedora user ngompa using the blocker tracking app because:

 This makes it impossible to update certain release-blocking stacks due to failures on ARM (such as KDE Plasma).

Comment 9 Nick Clifton 2025-02-07 14:58:42 UTC
Should be fixed by binutils-2.44-2.fc43 and binutils-2.44-2.fc42.

Comment 10 Mamoru TASAKA 2025-02-08 13:02:23 UTC
ruby is now okay with binutils-2.44-3.fc42

Comment 11 Adam Williamson 2025-02-10 16:19:58 UTC
Neal, can you confirm if your use cases are now OK with current f42 stable packages?

Comment 12 Steve Cossette 2025-02-10 16:23:11 UTC
(In reply to Adam Williamson from comment #11)
> Neal, can you confirm if your use cases are now OK with current f42 stable
> packages?

I can confirm that arm64 builds are working fine now on f42/rawhide.

Comment 13 Neal Gompa 2025-02-10 19:45:26 UTC
(In reply to Adam Williamson from comment #11)
> Neal, can you confirm if your use cases are now OK with current f42 stable
> packages?

As Steve said, we're good now. Thanks!

Comment 14 Adam Williamson 2025-02-10 21:55:09 UTC
ok, so let's close it.


Note You need to log in before you can comment on or make changes to this bug.