mpris-scrobbler
mpris-scrobbler copied to clipboard
s390x does not compile in Fedora package build system
Originally posted by @mariusor in #73.
Summary
Fix compile errors for s390x
architectures, or obtain architecture exception for mpris-scrobbler
Background
Quoted from old ticket:
@mariusor:
So, I looked at what the
s390x
architecture represents, and I'm pretty sure nobody will want to run the scrobbler on bare metal IBM Z mainframes.So, if you don't mind, we can move this issue to another ticket and remove
s390x
from the build list for the time, while I fiddle with the emulator I need in order to reproduce this. But, I must warn you, it'd be low priority, I again spend most of my time working on some Go projects.
Details
Currently this is blocked on me. I am looking for an exception for the Fedora package, or to get some debug help on how to fix these issues from the Fedora Community.
Here are some logs to help out with debugging:
-
Fedora 32 builds (all passed except
s390x
) - Fedora 31 builds (all passed)
- EPEL 8 (all passed)
Outcome
New mpris-scrobbler versions can be packaged for Fedora 32, 33, and EL 7
This may be an issue with GCC10. The failing s390x
builds only happen on Fedora 32 and later. Fedora 32 introduced the newest GCC release:
I also had a Fedora dev point out this Object Size Checking page to me, but I'm not sure how helpful this is for debugging this issue.
Thanx for the effort. I'll look at the object size checking page, I hope it'll help.
The problem is that configuration->pid_path
is MAX_PROPERTY_LENGTH
characters long, but env_variables->xdg_runtime_dir
is also MAX_PROPERTY_LENGTH+1
characters long. You are snprintf
'ing the latter into the former plus some other stuff, and that has the possibility to overflow.
Thank you @QuLogic. :) I guess it's been just laziness on my side from picking correct array lengths.
I opened BZ #1846774 to document the architecture failure. It would be nice to fix this eventually, but for now, I have a workaround to ship an update for the rest of the working Fedora architectures.
You can reproduce the s390x behaviour by adding --param=inline-min-speedup=2 --param=max-inline-insns-auto=80
to your compiler flags. This will enable the same level of aggressive inlining as gcc does on s390x by default. Often it uncovers real bugs, because the compiler has a different view on the code.
Thank you @sharkcz, I'll add it to the CI pipeline to see what's up.
This appears fixed on the current gcc version, so this bug can be closed. Removed excludearch s390x for v0.5.3 build. rhbz#2278145