gcc on ppc64le has bogus r30 register handling, as exposed by greenlet 0.4.14 will not build on ppc64le

Bug #1783252 reported by bugproxy
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
The Ubuntu-power-systems project
Fix Released
High
Canonical Foundations Team
gcc-5 (Ubuntu)
Fix Released
Undecided
Ubuntu on IBM Power Systems Bug Triage
Xenial
Fix Released
Wishlist
Unassigned
Bionic
Won't Fix
Undecided
Unassigned
gcc-6 (Ubuntu)
Fix Released
Undecided
Unassigned
Cosmic
Fix Released
Undecided
Unassigned
python-greenlet (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

[Impact]

 * GCC has a minor bug w.r.t. clobber r30 register in PIC binaries.
 * A patch to fix this has been upstream in 6+
 * But it is not in gcc-5.4 as used on xenial
 * This prevents compiling future-proof and correct greenlet code, on Ubuntu 16.04 LTS as used by current and supported Openstack Queens release on ppc64el
 * Whilst backported greenlet is available via the cloud archive for binary usage, the toolchain is still technically incorrect, and thus hinders using Ubuntu 16.04 LTS as workers in upstream Openstack CI
 * As a wishlist it would be nice to backport this one small gcc patch as an SRU

[Test Case]

 * git clone https://github.com/python-greenlet/greenlet
 * cd greenlet
 * ./setup.py build
Expect success

Current result failure:

creating build/temp.linux-ppc64le-2.7
powerpc64le-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c greenlet.c -o build/temp.linux-ppc64le-2.7/greenlet.o -fno-tree-dominator-opts
In file included from slp_platformselect.h:16:0,
                 from greenlet.c:343:
platform/switch_ppc64_linux.h: In function 'slp_switch':
platform/switch_ppc64_linux.h:80:5: error: PIC register clobbered by 'r30' in 'asm'
     __asm__ volatile ("" : : : REGS_TO_SAVE);
     ^
platform/switch_ppc64_linux.h:95:5: error: PIC register clobbered by 'r30' in 'asm'
     __asm__ volatile ("" : : : REGS_TO_SAVE);
     ^
error: command 'powerpc64le-linux-gnu-gcc' failed with exit status 1

[Regression Potential]

 * Upstream cherrypick present in later releases including bionic
https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=9213244550335bcb2b8590a0d7d58ac74c932361

[Other Info]

 * Original bug report

== Comment: #0 - William M. Edmonds <email address hidden> - 2018-07-23 16:21:41 ==
---Problem Description---
greenlet 0.4.14 will not build on ppc64le

Opened https://github.com/python-greenlet/greenlet/issues/136 because attempting to build bdist_wheel for greenlet 0.4.14 on ppc64le Ubuntu 16.04 LTS yields the following error:

running build
running build_ext
building 'greenlet' extension
creating build
creating build/temp.linux-ppc64le-2.7
powerpc64le-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c greenlet.c -o build/temp.linux-ppc64le-2.7/greenlet.o -fno-tree-dominator-opts
In file included from slp_platformselect.h:16:0,
                    from greenlet.c:343:
   platform/switch_ppc64_linux.h: In function 'slp_switch':
   platform/switch_ppc64_linux.h:80:5: error: PIC register clobbered by 'r30' in 'asm'
        __asm__ volatile ("" : : : REGS_TO_SAVE);
        ^
   platform/switch_ppc64_linux.h:95:5: error: PIC register clobbered by 'r30' in 'asm'
        __asm__ volatile ("" : : : REGS_TO_SAVE);
        ^
   error: command 'powerpc64le-linux-gnu-gcc' failed with exit status 1```

But the greenlet community is saying this is a gcc bug and it would not be safe to revert the greenlet change that exposed this issue. I have no idea whether that is true or not. Supposedly this should be fixed by https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=9213244550335bcb2b8590a0d7d58ac74c932361 but that fix is not present in the latest version of gcc (5.4.0) available for Ubuntu 16.04 LTS.

---uname output---
unavailable due to lab outage

Machine Type = unavailable due to lab outage

---Debugger---
A debugger is not configured

---Steps to Reproduce---
This should be reproducible with `git clone git://github.com/python-greenlet/greenlet; cd greenlet; python setup.py bdist_wheel`, though it was originally found using pypi rather than github and with a more complicated (scripted) command as detailed in the greenlet bug description.

Contact Information = Matthew Edmonds / <email address hidden>

Userspace tool common name: greenlet

The userspace tool has the following bit modes: no idea

Userspace rpm: N/A

Userspace tool obtained from project website: 0.4.14

*Additional Instructions for Matthew Edmonds / <email address hidden>:
-Attach ltrace and strace of userspace application.

bugproxy (bugproxy)
tags: added: architecture-ppc64le bugnameltc-169893 severity-high targetmilestone-inin---
Changed in ubuntu:
assignee: nobody → Ubuntu on IBM Power Systems Bug Triage (ubuntu-power-triage)
affects: ubuntu → python-greenlet (Ubuntu)
Frank Heimes (fheimes)
Changed in ubuntu-power-systems:
importance: Undecided → High
Frank Heimes (fheimes)
Changed in ubuntu-power-systems:
assignee: nobody → Ubuntu OpenStack (ubuntu-openstack)
Revision history for this message
James Page (james-page) wrote :

This is a slightly odd request as Ubuntu dev only has 0.4.13? Which does build on ppc64el.

Revision history for this message
James Page (james-page) wrote :

Reading the upstream issue, this has been identified as a bug in gcc; moving bug task.

affects: python-greenlet (Ubuntu) → gcc-5 (Ubuntu)
Changed in ubuntu-power-systems:
assignee: Ubuntu OpenStack (ubuntu-openstack) → Canonical Foundations Team (canonical-foundations)
Revision history for this message
Frank Heimes (fheimes) wrote :

16.04 is now in maintenance and any SRUs need to be carefully considered for potential regressions. Also, the impact of toolchain regressions can be far reaching.

As greenlet 0.4.14 is not supported on 16.04, and there are newer LTS versions of Ubuntu available which are unaffected by this issue, we are marking this as "Won't fix".
___

Since the self-recompiled version 0.4.14 of python-greenlet is newer than the one from the archive::
$ rmadison --arch=ppc64el python-greenlet | grep xenial
 python-greenlet | 0.4.9-2fakesync1 | xenial | ppc64el
it won’t be supported anyway.
Hence one may also just consider an (unsupported but as-is available) compiler from the
“Toolchain test builds” PPA:
https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test
It has a newer gcc-5 version compared to the one in xenial / main (but I think is still not working):
gcc-5 5.5.0-12ubuntu1~16.04
But there are also even more recent gcc versions 6, 7 and 8 for xenial:
gcc-6 6.4.0-17ubuntu1~16.04
gcc-7 7.3.0-21ubuntu1~16.04
gcc-8 8.1.0-5ubuntu1~16.04

Changed in ubuntu-power-systems:
status: New → Won't Fix
Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2018-08-01 09:45 EDT-------
Current versions of OpenStack, e.g. Queens [1], require at least greenlet 0.4.10, so the 0.4.9 version that is the latest currently packaged for Ubuntu 16.04 is insufficient. Therefore, in order to run OpenStack's devstack project on Ubuntu 16.04, which is commonly done in OpenStack development and in OpenStack CI (continuous integration) automation, greenlet has to be pip installed, which fails with this issue because pip install will pull the latest release by default.

But let's step back for a minute. Top priority here should be to determine whether this is really a gcc bug or a greenlet bug. Does Ubuntu agree with the greenlet community that this is a gcc bug? At least one greenlet contributor that I spoke to did not agree with that assessment, so I don't think this is a given. And I was still able to reproduce this bug after upgrading gcc-5, installing gcc-6, installing gcc-7, and installing gcc-8 from the toolchain test builds PPA.

If this is a greenlet bug, then it needs to be fixed by the greenlet community regardless of any Ubuntu versioning/packaging, and we'll all be better off determining that sooner rather than later.

On the other hand, if it is a gcc bug, then it would presumably affect other things besides greenlet, so that risk would need to be assessed and balanced against the risk of patching gcc on Ubuntu 16.04.

I have not tested this on Ubuntu 18.04, so I cannot say whether the same issue exists there or not.

[1] https://github.com/openstack/requirements/blob/stable/queens/global-requirements.txt#L73

Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2018-08-01 09:56 EDT-------
Looking at upstream sources, I see that the GCC bug referenced here has been fixed in GCC 7 and later. So if you still have a problem when using gcc-7, you'll need to understand why. If you're seeing the same symptom, you may not actually be picking up the compiler you think you are. If it's a different error message, then it may be that there is also a problem in greenlet.

Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2018-08-01 10:10 EDT-------
By the way, there *will* be a problem in greenlet if REGS_TO_SAVE includes r2. In that case you'll see the same error message, with r30 replaced by r2. That's because you aren't allowed to clobber the TOC register with an asm like this, so it's a feechur, not a bug. So please verify they aren't doing that.

Manoj Iyer (manjo)
Changed in gcc-5 (Ubuntu):
status: New → Won't Fix
Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2018-08-01 11:16 EDT-------
I'm still seeing the same error with r30.

I ran `powerpc64le-linux-gnu-gcc -v` and it appears to still be using gcc 5.5.0. How do I get it to try 6, 7, or 8?

Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2018-08-01 11:44 EDT-------
These are all separate packages. Look for /usr/bin/gcc-7, for example.

Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2018-08-01 12:04 EDT-------
sure, but how do I control that? I just run `pip install greenlet` to reproduce this. I'm not specifying a gcc version.

From the error, it is using powerpc64le-linux-gnu-gcc, so I located that and tracked it back to the gcc package:

myuser@myhost:~$ which powerpc64le-linux-gnu-gcc
/usr/bin/powerpc64le-linux-gnu-gcc
myuser@myhost:~$ dpkg -S /usr/bin/powerpc64le-linux-gnu-gcc
gcc: /usr/bin/powerpc64le-linux-gnu-gcc

And confirmed that I already have the latest version of that installed, with no other candidates that might cause it to use a newer version of gcc:

myuser@myhost:~$ sudo apt-cache policy gcc
gcc:
Installed: 4:5.3.1-1ubuntu1
Candidate: 4:5.3.1-1ubuntu1
Version table:
*** 4:5.3.1-1ubuntu1 500
500 http://ports.ubuntu.com/ubuntu-ports xenial/main ppc64el Packages
100 /var/lib/dpkg/status

------- Comment From <email address hidden> 2018-08-01 12:09 EDT-------
You have to figure out the build process and whether you can override the selection of the compiler. Often this is done with a CC macro. There's no magic bullet that I can give you, I don't have package build expertise or any knowledge of greenlet.

Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2018-08-01 12:33 EDT-------
I found that powerpc64le-linux-gnu-gcc was just a symlink, so I redirected it (and the other related symlinks) to use gcc-7 instead of gcc-5. This did resolve the issue. I do not see the problem with gcc-7.

Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2018-08-01 13:19 EDT-------
The reason for marking Won't Fix was given as the following:

> As greenlet 0.4.14 is not supported on 16.04, and there are newer LTS
> versions of Ubuntu available which are unaffected by this issue, we are
> marking this as "Won't fix".

Since this appears to be a gcc bug, not a greenlet bug, greenlet version support is irrelevant.

As for there being newer LTS versions of Ubuntu available... 1) that's not true for PowerVM systems, where Ubuntu 18.04 is not currently supported and 2) long-term support for LTS releases does not end when a newer LTS release is available. According to [1] 16.04 is still supported into 2021.

So can we reopen this to get a gcc fix for 16.04?

[1] https://wiki.ubuntu.com/Releases

Revision history for this message
Dimitri John Ledkov (xnox) wrote : Re: greenlet 0.4.14 will not build on ppc64le

RE: greenlet

Newer Openstack releases on LTS releases are provided via Ubuntu Cloud archive. There you can find Queens release available for 16.04 LTS (xenial), it appears to include python-greenlet 0.4.12-2~cloud0 is that what you are looking for?

If you are working on Openstack, it would make sense to enable appropriate release Cloud Archive and pull the dependencies from there.

To enable Queens Cloud Archive please use:
sudo add-apt-repository cloud-archive:queens

For more information please see:
https://wiki.ubuntu.com/OpenStack/CloudArchive

Cloud Archive is supported by Canonical and is the recommended place to get pre-compiled binaries and updates to run newer/recent Openstack releases on Ubuntu LTS.

Given that we do provide prebuilt newer supported greenlet, in the context of Openstack only, on 16.04 LTS (xenial) are further fixes still required to the toolchain?

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

re: toolchain fix

The commit mention is sparse on details, is there a gcc PR about this? Test case, regression testsuite?
Has this been requested in gcc upstream to be cherry-picked onto the stable branches? Is IBM POWER gcc port maintainers aware if this issue / commit?

gcc-5.4 is, unfortunately, the highest version shipped with bionic. Please note whilst Queens Cloud Archive is ready available, a gcc SRU for this issue alone may take a long time given that we toolchain updates affect a lot things that require long validation cycles due to high risk of regressing building any subsequent security uploads and updates.

Changed in gcc-5 (Ubuntu):
status: Won't Fix → Incomplete
Changed in python-greenlet (Ubuntu):
status: New → Fix Released
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

marking the bug as incomplete for now, awaiting further comments re:toolchain PR/SRU.

Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2018-08-01 14:20 EDT-------
From what I can see in the gcc history, there isn't an associated PR and test case. I'm personally agnostic with respect to the resolution of this problem. Since GCC 5 has been out of service upstream for over a year, I can understand the reluctance to modify the toolchain, even for a low-risk fix like this one.

Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2018-08-01 14:51 EDT-------
I understand the confusion, but Ubuntu's OpenStack distribution doesn't help here. I'm an OpenStack developer. We need to be able to build from source in our CI (continuous integration) automation [1] and development environments [2] so that we aren't tied to any one distro. And we need to be able to test with the latest available version of greenlet that OpenStack supports, which is currently 0.4.14. I was able to get a temporary block of greenlet 0.4.14 on the OpenStack side (for all environments... there's no way to block it only for Ubuntu 16.04), but that is a very short-term solution while we work this out.

I have not made any requests in gcc upstream. I'm not sure how to do that, or how to make the IBM POWER gcc port maintainers aware other than via this bug.

[1] https://docs.openstack.org/infra/system-config/third_party.html
[2] https://docs.openstack.org/devstack/latest/

Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2018-08-01 15:42 EDT-------
I'm not the port maintainer, just the architect for IBM's contributions to the Power port. CCing the maintainer here. However, the maintainer being aware of the patch doesn't buy you a whole lot. The only question is whether the Canonical toolchain team is comfortable carrying the patch.

Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2018-08-01 16:19 EDT-------
The patch is at
https://gcc.gnu.org/ml/gcc-patches/2016-05/msg00267.html
(or https://patchwork.ozlabs.org/patch/618253/ if you prefer).

It is on GCC 7 and GCC 8 branch (and on trunk), but not on older branches; not in GCC 6
and not in GCC 5.

As Bill says, GCC 5 is out of service, so if you want this patch in Ubuntu's GCC you'll need
to get Ubuntu to port this; the GCC project cannot do it, there will be no more GCC 5 releases.

Revision history for this message
Dimitri John Ledkov (xnox) wrote : Re: greenlet 0.4.14 will not build on ppc64le

I think I get it all now.....

https://github.com/python-greenlet/greenlet/commit/9c8a65fddcffe161f38679a0b3289de9b25e2bc6.patch -> unbreaks with new gcc-7, but broken again with old gcc-5 again

And hence you are stuck between a rock and a hard-place.... either hack-up a Frankenstein toolchain or somehow revert future-proof correct upstream code, for sake of older buggy gcc.

I wonder if greenlet could somehow detect buggy compiler and still build with it... 😂

Changed in gcc-5 (Ubuntu Xenial):
status: New → Triaged
importance: Undecided → High
importance: High → Wishlist
Changed in gcc-5 (Ubuntu):
status: Incomplete → Won't Fix
no longer affects: python-greenlet (Ubuntu Xenial)
description: updated
summary: - greenlet 0.4.14 will not build on ppc64le
+ gcc on ppc64le has bogus r30 register handling, as exposed by greenlet
+ 0.4.14 will not build on ppc64le
Changed in gcc-5 (Ubuntu):
status: Won't Fix → Fix Released
status: Fix Released → Won't Fix
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Please try toolchain from:

https://launchpad.net/~ci-train-ppa-service/+archive/ubuntu/3339

sudo add-apt-repository ppa:ci-train-ppa-service/3339
sudo apt-get update
sudo apt-get dist-upgrade

Full diff of changes is:
https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_39a8dbb93caf4ec889f8a1b7f69885db/bileto-3339/2018-08-02_12:08:21/xenial_gcc-5_content.diff

Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2018-08-02 09:50 EDT-------
Thanks xnox, that worked!

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

I'll keep that PPA available for as long as possible, and hopefully until after similar update is available via xenial-updates... at the mercy of SRU team at this point.

gcc-5 5.4.0-6ubuntu1~16.04.11 (Waiting for approval)

Changed in gcc-5 (Ubuntu Xenial):
status: Triaged → In Progress
Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2018-08-02 12:52 EDT-------
to make sure I understand... the ball is now in someone else's court to decide whether this fix is ok to release in xenial-updates? And they know that the ball is in their court?

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

yes, please see https://wiki.ubuntu.com/StableReleaseUpdates

In terms of https://wiki.ubuntu.com/StableReleaseUpdates#Procedure this bug has passed step 4, and is awaiting step 5.

Changed in ubuntu-power-systems:
status: Won't Fix → In Progress
Changed in ubuntu-power-systems:
status: In Progress → Won't Fix
Manoj Iyer (manjo)
Changed in ubuntu-power-systems:
status: Won't Fix → In Progress
Manoj Iyer (manjo)
tags: added: triage-g
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gcc-5 - 5.5.0-12ubuntu6

---------------
gcc-5 (5.5.0-12ubuntu6) cosmic; urgency=medium

  * Backport r235876 from the trunk (PPC). LP: #1783252.

 -- Matthias Klose <email address hidden> Sat, 04 Aug 2018 04:54:56 +0200

Changed in gcc-5 (Ubuntu):
status: Won't Fix → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

What is the status of this bug in bionic? It has been mentioned that it's present in the 6+ versions, but what about gcc-5 in bionic? Seeing that this has been only recently fixed in 5.5.0-12ubuntu6 in cosmic, I guess it still needs a fix in bionic? Or is it not needed?

It is not a *strict* requirement from what I know which is why I will continue the review, but it's highly recommendable that all upgrade paths will not cause people to regress from what they had before.

Changed in gcc-5 (Ubuntu Xenial):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-xenial
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello bugproxy, or anyone else affected,

Accepted gcc-5 into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/gcc-5/5.4.0-6ubuntu1~16.04.11 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Frank Heimes (fheimes)
Changed in ubuntu-power-systems:
status: In Progress → Fix Committed
Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2018-08-27 12:28 EDT-------
It hasn't been fixed anywhere in GCC 5 prior to this, so I would agree that it also should be fixed in gcc-5 in bionic to avoid a regression.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

@sil2100

In practice we care about the default compiler only. In bionic it is gcc-7 and is fixed.

Unfortunately, we do still have gcc-5 around as non default. The fix for this was cherrypicked into cosmic already - https://launchpad.net/ubuntu/+source/gcc-5/5.5.0-12ubuntu6

I will open a task to fix this in bionic as well, although gcc-5 should not be used on bionic! (or specifically not in the openstack CI with 16.04/bionic as base os)

no longer affects: python-greenlet (Ubuntu Bionic)
Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2018-09-18 15:40 EDT-------
@sil2100 I haven't been able to get anything from xenial-proposed. Not sure if I'm doing something wrong, or if it's just not there for ppc64le (wondering because I don't see a Contents-ppc64le.gz file at http://archive.ubuntu.com/ubuntu/dists/xenial-proposed/ like I do for some other architectures). I did add this line to /etc/apt/sources.list:

deb http://archive.ubuntu.com/ubuntu/ xenial-proposed restricted main multiverse universe

and this to /etc/apt/preferences.d/proposed-updates:

Package: *
Pin: release a=xenial-proposed
Pin-Priority: 400

but then I still get this:

$ sudo apt-get install gcc-5/xenial-proposed
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Release 'xenial-proposed' for 'gcc-5' was not found

Revision history for this message
Frank Heimes (fheimes) wrote :

The (imho) easiest way to install packages from proposed is like this:

First of all enable proposed:
sudo apt install software-properties-common
sudo add-apt-repository "deb http://us.ports.ubuntu.com/ubuntu-ports/ $(lsb_release -sc)-proposed restricted main"
(depending on the Ubuntu release you might need to do an "sudo apt update" now to update your archive indices.)

Next step could be to check for any available packages (and from which archive they come from) like this:
apt-cache policy <package>

Now have (at least) the following three options:
1)
in case the package you are looking for has the newest version (which is very likely the case) just do:
sudo apt-get install <package>
2)
Provide a specific package version during installation (update):
sudo apt-get install <package>=1.23.4.5.67
3)
Point to a specific archive where the package you are going to install should be taken from:
sudo apt-get -t $(lsb_release -cs)-proposed install <package>

[Replace <package> with a valid package name.]

Revision history for this message
Andrew Cloke (andrew-cloke) wrote :

Marking as incomplete as we're waiting for IBM to verify the xenial-proposed gcc.

Changed in ubuntu-power-systems:
status: Fix Committed → Incomplete
Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2018-11-05 11:20 EDT-------
I've confirmed that the xenial-proposed gcc-5 solves this issue. Thanks.

Changed in ubuntu-power-systems:
status: Incomplete → Fix Committed
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello bugproxy, or anyone else affected,

Accepted gcc-6 into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/gcc-6/6.5.0-2ubuntu1~18.04 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

tags: added: verification-needed-bionic
Changed in gcc-5 (Ubuntu Bionic):
status: New → Fix Committed
Revision history for this message
Andrew Cloke (andrew-cloke) wrote :

Based on comment #33, marked Xenial verification as done.

tags: added: verification-done-xenial
removed: verification-needed-xenial
Revision history for this message
Andrew Cloke (andrew-cloke) wrote :

Update: IBM progressing with Bionic verification.

Revision history for this message
Mike Ranweiler (mranweil) wrote :

I verified this both on bionic with gcc-6 (6.5.0-2ubuntu1) and on xenial with gcc-5 (5.4.0-6ubuntu1) and it worked in both cases. Greenlet did commit a patch to work around this issue - so I built with and without that patch to recreate and verify the fix.

tags: added: verification-done-bionic
removed: verification-needed-bionic
Changed in gcc-5 (Ubuntu Bionic):
status: Fix Committed → Confirmed
Changed in gcc-6 (Ubuntu):
status: New → Fix Committed
no longer affects: gcc-6 (Ubuntu Trusty)
no longer affects: gcc-5 (Ubuntu Trusty)
no longer affects: python-greenlet (Ubuntu Trusty)
no longer affects: python-greenlet (Ubuntu Cosmic)
no longer affects: gcc-5 (Ubuntu Cosmic)
Changed in gcc-6 (Ubuntu Cosmic):
status: New → Fix Committed
Changed in gcc-6 (Ubuntu):
status: Fix Committed → Confirmed
Revision history for this message
Chris Halse Rogers (raof) wrote :

Do we have a gcc-5 upload for bionic? As far as I can tell that's not been done.

Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2018-12-12 17:24 EDT-------
The gcc-5 I tried was for xenial, I hadn't seen an upload for gcc-5 for bioinic.

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

note that this is fixed in newer GCC packages. Probably doesn't need to be fixed for bionic

Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for gcc-6 has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (6.4 KiB)

This bug was fixed in the package gcc-6 - 6.5.0-2ubuntu1~18.04

---------------
gcc-6 (6.5.0-2ubuntu1~18.04) bionic-proposed; urgency=medium

  * SRU: LP: #1800197. Update gcc-6 to the last GCC 6.5.0 upstream release.

gcc-6 (6.5.0-2ubuntu1) disco; urgency=medium

  * Merge with Debian; remaining changes:
    - Build from upstream sources.

gcc-6 (6.5.0-2) unstable; urgency=medium

  * Fix PR libstdc++/87822, taken from the bug report.
  * Fix VCS attribute in the control file. Addresses: #912405.

gcc-6 (6.5.0-1) unstable; urgency=medium

  * GCC 6.5.0 release.
  * Refresh patches.

gcc-6 (6.4.0-23) unstable; urgency=medium

  * GCC 6.5.0 release candidate.
  * Update to SVN 20181019 (r265212) from the gcc-6-branch.
    - Fix PR middle-end/86542, PR middle-end/86539, PR middle-end/86660,
      PR sanitizer/84761, PR libstdc++/87641, PR libstdc++/86751,
      PR libstdc++/87061, PR libstdc++/70966, PR libstdc++/70966,
      PR libstdc++/77854, PR libstdc++/85098, PR middle-end/87623,
      PR middle-end/87024, PR middle-end/86505, PR target/87550 (x86),
      PR middle-end/87248, PR rtl-optimization/87065, PR middle-end/86627,
      PR middle-end/86542, PR middle-end/86539, PR middle-end/86660,
      PR c++/54278, PR tree-optimization/80032, PR tree-optimization/80032,
      PR target/87517 (x86), PR target/87522 (x86), PR c++/3698, PR c++/86208.
  * Don't configure native builds with --with-sysroot. Apparently this cannot
    be completely overridden with the command line option --sysroot.
  * Update VCS attributes in the control file.

gcc-6 (6.4.0-22ubuntu1) cosmic; urgency=medium

  * Merge with Debian; remaining changes:
    - Build from upstream sources.

gcc-6 (6.4.0-22) unstable; urgency=medium

  * Update to SVN 20180921 (r264530) from the gcc-6-branch.
    - Fix libsanitizer build failure on sparc64.

gcc-6 (6.4.0-21ubuntu1) cosmic; urgency=medium

  * Merge with Debian; remaining changes:
    - Build from upstream sources.

gcc-6 (6.4.0-21) unstable; urgency=medium

  * Update to SVN 20180921 (r264459) from the gcc-6-branch.
    - Fix PR sanitizer/85835, PR tree-optimization/85859, PR target/87014,
      PR fortran/86116.
    - Fix build failure with glibc 2.28.

gcc-6 (6.4.0-20ubuntu1) cosmic; urgency=medium

  * Merge with Debian; remaining changes:
    - Build from upstream sources.

gcc-6 (6.4.0-20) unstable; urgency=medium

  * Update to SVN 20180814 (r263539) from the gcc-6-branch.
    - Fix PR libstdc++/83982, PR libstdc++/80893, PR libstdc++/80893,
      PR libstdc++/68519, PR libstdc++/86292, PR libstdc++/60555,
      PR libstdc++/86734, PR libstdc++/66145, PR libstdc++/85222,
      PR target/86197 (PPC).
    - Fix PR bootstrap/86724. Closes: #905708.
  * Backport r235876 from the trunk (PPC). LP: #1783252.
  * Add some basic autopkg tests for Ada, C, C++, Go, OpenMP and Fortran.
  * Update the src_libgo_Makefile.in patch (Svante Signell). Closes: #905714.

gcc-6 (6.4.0-19ubuntu1) cosmic; urgency=medium

  * Merge with Debian; remaining changes:
    - Build from upstream sources.

gcc-6 (6.4.0-19) unstable; urgency=medium

  * Update to SVN 20180727 (r263028) from the gcc-6-branch.
    - Fix PR c++/86291, PR libgomp/84096,...

Read more...

Changed in gcc-6 (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

I guess the latest gcc-6 in cosmic has the fix for this bug already? I see r235876 mentioned for the fix, and that seems to be present in the 6.5.0 release?

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gcc-5 - 5.4.0-6ubuntu1~16.04.11

---------------
gcc-5 (5.4.0-6ubuntu1~16.04.11) xenial; urgency=medium

  * Backport upstream revision r235876 to correct PIC_OFFSET_TABLE_REGNUM
    on ppc64el.
    LP: #1783252

 -- Dimitri John Ledkov <email address hidden> Wed, 01 Aug 2018 22:22:10 +0100

Changed in gcc-5 (Ubuntu Xenial):
status: Fix Committed → Fix Released
Revision history for this message
Andrew Cloke (andrew-cloke) wrote :

Following comment #40 (above), should the gcc-5 bionic series be marked as "Won't Fix"?

Revision history for this message
Manoj Iyer (manjo) wrote :

Based on comment #40 (doko) marking this series as won't fix.

Changed in gcc-5 (Ubuntu Bionic):
status: Confirmed → Won't Fix
Manoj Iyer (manjo)
tags: added: verification-done
removed: verification-needed
Revision history for this message
Manoj Iyer (manjo) wrote :

Doko confirmed that this is fix released. So marking this track fix released.

Changed in gcc-6 (Ubuntu Cosmic):
status: Fix Committed → Fix Released
Changed in ubuntu-power-systems:
status: Fix Committed → Fix Released
Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2020-08-07 07:22 EDT-------
No update from tester for more than 11 months. Closing

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.