ruby2.7-dev: extensions fails to build on ppc64el by lack of gcc-10

Bug #1948950 reported by Simon Chopin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ruby2.7 (Ubuntu)
Triaged
Undecided
Unassigned
Impish
Invalid
Undecided
Unassigned
Jammy
Triaged
Undecided
Unassigned

Bug Description

Some Ruby extensions fail to build on ppc64el when trying to invoke the ppc64el-linux-gnu-gcc-10 binary, which isn't present. For example, see https://launchpad.net/~schopin/+archive/ubuntu/rebuilds/+sourcepub/12854340/+listing-archive-extra which is a straight rebuild without any modification.

I figure the cause is that ruby2.7 uses gcc-10 on ppc64el but doesn't reflect this in ruby-dev dependencies. I have a patch, I'm just waiting for the build to finish to verify it fixes the issue.

Tags: patch
Revision history for this message
Simon Chopin (schopin) wrote :

Attached is the debdiff. A matching package has been uploaded to my PPA: https://launchpad.net/~schopin/+archive/ubuntu/test-ppa/+sourcepub/12853681/+listing-archive-extra

In the same PPA you'll find the ruby-mysql2 package that was the initial reason I looked into this, and it now builds fine :)

tags: added: patch
Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

Thanks for the patch Simon! I'd change a bit your proposed solution here, I'd add g++-10 [ppc64el] to Recommends instead of gcc-10 [ppc64el] to Depends. Let's use g++-10 to follow what doko did in the Build-Depends, I am not sure but maybe we can find an extension which requires a C++ compiler and then we will have the same issue. And I'd prefer Recommends to avoid forcing any user to install the entire GCC toolchain in case they opt-out. Would you mind applying those changes?

Moreover, I am seeing in your PPA that the ruby2.7 build on arm64 failed:

https://launchpad.net/~schopin/+archive/ubuntu/test-ppa/+build/22344486

It seems a timeout issue and it might be fixed with a simple rebuild. Could you confirm that to us before we upload the package?

Changed in ruby2.7 (Ubuntu):
status: New → Triaged
Revision history for this message
Simon Chopin (schopin) wrote :

I purposefully chose gcc-10 instead of g++-10 as, while the ruby implementation seems to use C++ internally, the exposed headers and ABI are C. If you insist I'll change it.

I don't think Recomends is a good way to go as I believe sbuild doesn't take them into account, which sort of defeats the purpose here ;-). However to be sure I've uploaded a version with Recommends gcc-10 to my PPA, let's see how it goes.

Revision history for this message
Simon Chopin (schopin) wrote :

Trying out the Recommends change on the PPA does trigger the failure, so we need to use Depends. The new build succeeded for arm64 but failed for armhf, with a similar failure mode (timeouts). Retrying it now.

Revision history for this message
Simon Chopin (schopin) wrote :

I mistakenly added impish as a target series. I misread my build reports in my PPA, sorry about that! Marking it as invalid there.

Changed in ruby2.7 (Ubuntu Impish):
status: New → Invalid
Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

I am not sure if I understood your point here Simon, at the moment Impish and Jammy have the same ruby2.7 version. Are you saying the ruby-mysql2 build worked fine in one and failed in the other?

Revision history for this message
Simon Chopin (schopin) wrote : Re: [Bug 1948950] Re: ruby2.7-dev: extensions fails to build on ppc64el by lack of gcc-10

It seems so, yes. See
https://launchpad.net/~schopin/+archive/ubuntu/rebuilds/+packages

I believe it's because GCC 10 is included in the builder chroots for
impish, but not for jammy. You can see gcc-10 being upgraded in the logs
for the impish build.

So, the bug doesn't appear on impish on our builders, but mostly by
happenstance.

Revision history for this message
Matthias Klose (doko) wrote :

I'm uploading this workaround for jammy. It helps to fix ftbfs for packages which build both python and ruby bindings.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.