Summary: | media-libs/audiofile-0.3.6-r1: building w/gcc-6: error: left operand of shift expression '(-1 << 7)' is negative [-fpermissive] | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Peter Levine <plevine457> |
Component: | Current packages | Assignee: | Gentoo Linux Gnome Desktop Team <gnome> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | dracwyrm, fturco, sound |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 582084 | ||
Attachments: |
Add -fpermissive to CXXFLAGS to avoid errors with gcc-v6
audiofile-0.3.6-gcc6-build-fixes.patch |
Description
Peter Levine
2016-05-12 02:28:58 UTC
Created attachment 434972 [details, diff]
Add -fpermissive to CXXFLAGS to avoid errors with gcc-v6
What about adding the '-fpermissive' flag as the gcc itself suggest? Comment on attachment 434972 [details, diff]
Add -fpermissive to CXXFLAGS to avoid errors with gcc-v6
What about adding the '-fpermissive' flag as the gcc itself suggest?
(I'm sorry for the mess, this is my first time using bugzilla, didn't know you can't edit nor delete a comment.) C++14 dialect forces the programmer to explicitly declare his/her intent to code something potentially dangerous that might have been assumed to be fine in C++98 dialect. You can add -fpermissive and/or -std=c++98 flag to overcome most gcc-6 related errors but it's really a bandaid over the problem. Though some upstream developers have chosen this route, IMHO it should be avoided if possible and a dialect neutral solution should be preferred. I confirm adding -fpermissive to CXXFLAGS "fixes" the problem. Created attachment 451648 [details, diff]
audiofile-0.3.6-gcc6-build-fixes.patch
Adding the compiler flag does not fix the underlying issues.
Please find attached the proper patch that fixes the issues. It's compatible with all versions of GCC officially in portage now. :)
To use this:
Save the attached patch with the description name.
Place it in /etc/portage/patches/media-libs/audiofile/
The ebuild does not need to be modified as it will pick up this patch and apply it.
Cheers.
commit db5ba8d0625e670e679f558e0943006f238f952b Author: Jonathan Scruggs <j.scruggs@gmail.com> Date: Fri Oct 28 10:31:09 2016 +0100 media-libs/audiofile: Add gcc 6 build fixes patch Gentoo-bug: 582792 Signed-off by: Jonathan Scruggs (j.scruggs@gmail.com) Closes: https://github.com/gentoo/gentoo/pull/2684 Signed-off-by: David Seifert <soap@gentoo.org> |