Summary: | app-office/libreoffice-6.0.2.1 with --enable-lto - checking if gcc has a visibility bug with class-level attributes: configure: error: Your gcc is not -fvisibility=hidden safe. This is no longer supported. | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Joe Harvell <landshark> |
Component: | Current packages | Assignee: | Gentoo Office Team <office> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | 652638 | ||
Bug Blocks: | |||
Attachments: | output of emerge --info |
Description
Joe Harvell
2018-03-05 17:46:34 UTC
Created attachment 522454 [details]
output of emerge --info
I manually created an overlay ebuild where I added an lto USE flag such that --enable-lto is specified in the configure script if and only if the lto USE flag is enabled. I emerging it now with the lto USE flag enabled, and it has successfully passed the configure phase and is compiling. Probably a better solution would be to have an eclass that allows a USE flag (like lto) that is by design disabled by the eclass if no LTO options are in effect for the build. This would have to take into account not just make.conf, but also overrides in /etc/portage/package.env. This would allow setting this USE flag globally, but if you are building a particular package without LTO the package does not break because you configugure it with LTO support. This package could actually break if you configure with --enable-lto but don't build with -flto, and your compiler has the hidden visiblity bug. The configure script won't detect the compiler bug because you say you are using LTO but are not. I got the same error for app-office/libreoffice-5.4.5.1. As a workaround I created the file /etc/portage/env/app-office/libreoffice with a single line: EXTRA_ECONF='--enable-lto' For a proper solution I don't think a USE flags makes much sense. The ebuild could scan CFLAGS/CXXFLAGS and pass --enable-lto to configure when required, but that's complicated to get right with all of -flto, -flto=*, -fno-lto and possibly several of those present. The cleanest solution would be to patch configure to remove the visibility check entirely; building gentoo with ancient gcc versions that would fail isn't supported anyway I guess. Adding the following line to src_configure should suffice: is-flagq "-flto*" && myeconfargs+=( --enable-lto ) While not perfect, several other ebuilds use similar solutions, so it's probably good enough. The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a00781792fbd23987196bc103187edd9b122cac9 commit a00781792fbd23987196bc103187edd9b122cac9 Author: Andreas Sturmlechner <asturm@gentoo.org> AuthorDate: 2018-05-23 21:24:52 +0000 Commit: Andreas Sturmlechner <asturm@gentoo.org> CommitDate: 2018-05-29 12:31:06 +0000 app-office/libreoffice*: Drop 5.4.5.1 Closes: https://bugs.gentoo.org/619918 Closes: https://bugs.gentoo.org/638012 Closes: https://bugs.gentoo.org/638520 Closes: https://bugs.gentoo.org/649666 Closes: https://bugs.gentoo.org/652354 Package-Manager: Portage-2.3.38, Repoman-2.3.9 app-office/libreoffice-bin-debug/Manifest | 12 - .../libreoffice-bin-debug-5.4.5.1.ebuild | 87 ---- app-office/libreoffice-bin/Manifest | 12 - .../libreoffice-bin/libreoffice-bin-5.4.5.1.ebuild | 255 --------- app-office/libreoffice-l10n/Manifest | 168 ------ .../libreoffice-l10n-5.4.5.1.ebuild | 88 ---- app-office/libreoffice/Manifest | 3 - .../files/libreoffice-5.4.5.1-pyuno-crash.patch | 87 ---- app-office/libreoffice/libreoffice-5.4.5.1.ebuild | 578 --------------------- app-office/libreoffice/metadata.xml | 3 - 10 files changed, 1293 deletions(-) |