Bug 2108548

Summary: automake fails to build on aarch64 builders
Product: [Fedora] Fedora Reporter: Frédéric Bérat <fberat>
Component: automakeAssignee: Frédéric Bérat <fberat>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: codonell, fberat, fjanus, fweimer, jjanco, karsten, kasal, odubaj, panovotn, praiskup, releng
Target Milestone: ---   
Target Release: ---   
Hardware: aarch64   
OS: Linux   
Whiteboard:
Fixed In Version: automake-1.16.5-9.fc37 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-08-03 11:30:54 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2045102    

Description Frédéric Bérat 2022-07-19 09:57:39 UTC
The build behavior defers depending on the builder architecture.

Some tests are skipped on x86 while they are failing on aarch64.

That is the case for example for the objc-deps.sh test:

/usr/bin/ld: bar.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `stdout@@GLIBC_2.17' which may bind externally can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: bar.o(.text.startup+0x4): unresolvable R_AARCH64_ADR_PREL_PG_HI21 relocation against symbol `stdout@@GLIBC_2.17'
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
make: *** [Makefile:366: foo] Error 1

It's yet unclear why the test is skipped on x86, while it is executed on aarch64, since there seems not to be any architecture specificity here.

Comment 3 Frédéric Bérat 2022-07-27 11:59:56 UTC
I made some progress on this, the failure is related to the LDFLAGS being set by redhat-rpm-config, which changes the behavior of the some tests depending on the arch (e.g objc-deps.sh fails is skipped on x86, but fails on aarch64).

The consequence of the LDFLAGS is that objc programs using stdout file descriptor can't be compiled without -fPIE on x86 and without -fPIC on aarch64. Since on x86 that even prevent configure to verify that the compiler "works" the tests are skipped, while on aarch64, configure is able to build its conftest app, but the objc-deps app (using stdout) is failing to be built during the test phase leading to the general failure.

In the following build "LDFLAGS" is unset during the test execution (running on aarch64):

https://koji.fedoraproject.org/koji/taskinfo?taskID=90123766

This build shows no trouble to build any of the "objc*" tests.

Further discussion is needed to decide on the proper way to fix this behavior.

Comment 4 Frédéric Bérat 2022-08-03 11:43:40 UTC
*** Bug 2113115 has been marked as a duplicate of this bug. ***