mpris-scrobbler icon indicating copy to clipboard operation
mpris-scrobbler copied to clipboard

s390x does not compile in Fedora package build system

Open jwflory opened this issue 4 years ago • 8 comments

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:

Outcome

New mpris-scrobbler versions can be packaged for Fedora 32, 33, and EL 7

jwflory avatar May 30 '20 20:05 jwflory

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.

jwflory avatar Jun 01 '20 19:06 jwflory

Thanx for the effort. I'll look at the object size checking page, I hope it'll help.

mariusor avatar Jun 01 '20 20:06 mariusor

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.

QuLogic avatar Jun 01 '20 22:06 QuLogic

Thank you @QuLogic. :) I guess it's been just laziness on my side from picking correct array lengths.

mariusor avatar Jun 02 '20 07:06 mariusor

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.

jwflory avatar Jun 14 '20 02:06 jwflory

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.

sharkcz avatar Aug 19 '20 08:08 sharkcz

Thank you @sharkcz, I'll add it to the CI pipeline to see what's up.

mariusor avatar Aug 19 '20 12:08 mariusor

This appears fixed on the current gcc version, so this bug can be closed. Removed excludearch s390x for v0.5.3 build. rhbz#2278145

gbcox avatar May 01 '24 14:05 gbcox