Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 819909 - >=app-arch/snappy-1.1.9 remove -fno-rtti
Summary: >=app-arch/snappy-1.1.9 remove -fno-rtti
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Azamat H. Hackimov
URL:
Whiteboard:
Keywords: PATCH, PullRequest
Depends on:
Blocks:
 
Reported: 2021-10-23 22:38 UTC by Alessandro Barbieri
Modified: 2022-02-27 16:37 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alessandro Barbieri 2021-10-23 22:38:02 UTC
Upstream added -fno-rtti in version 1.1.9 with a questionable reason
https://github.com/google/snappy/commit/c98344f6260d24d921e5e04006d4bedb528f404a

Now I can't build dev-cpp/folly::guru
https://github.com/facebook/folly/issues/1606

Archlinux users got the same issue
https://bugs.archlinux.org/task/72058

Patch available here
https://patch-diff.githubusercontent.com/raw/google/snappy/pull/129.patch
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-10-24 08:03:42 UTC
Well, it's enough to make ceph want to drop it: https://github.com/ceph/ceph/pull/4361 b/c of LevelDB.

But I'd much rather someone sort this out with Google, not modify it downstream, given this stuff is often fragile.
Comment 2 Alessandro Barbieri 2021-10-24 09:28:03 UTC
Google already said that they care only about chromium
https://github.com/google/snappy/pull/129#issuecomment-851666942
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-10-24 09:32:10 UTC
(In reply to Alessandro Barbieri from comment #2)
> Google already said that they care only about chromium
> https://github.com/google/snappy/pull/129#issuecomment-851666942

Changing this will likely break Chromium. So it's not that simple.
Comment 4 Stephan Hartmann (RETIRED) gentoo-dev 2021-10-24 10:44:24 UTC
An options might be to build ceph/folly with -fno-rtti as well. Usually, RTTI is only required for typeid and dynamic_cast in C++. Compiler will bail out if one of the features is used without RTTI. Furthermore, mixing RTTI on and RTTI off is generally not a good idea, because it may break the C++ ODR rule.
Comment 5 Alessandro Barbieri 2021-10-24 11:30:29 UTC
Building folly with -fno-rtti will fail with
error cannot use 'typeid' with '-fno-rtti'
Comment 6 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2021-10-24 11:52:26 UTC
Really, expecting reverse dependencies not to use RTTI because Google employees are incompetent is not a good idea.
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-11-05 07:03:34 UTC
Chromium is no longer using the system copy of Snappy after some discussion with the chromium@ team in Gentoo, so feel free to proceed w/o worrying about that.
Comment 8 Larry the Git Cow gentoo-dev 2021-11-17 07:48:13 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a34edd22137c9c34670aecd60ed75bbe65393c4a

commit a34edd22137c9c34670aecd60ed75bbe65393c4a
Author:     Azamat H. Hackimov <azamat.hackimov@gmail.com>
AuthorDate: 2021-10-24 17:07:44 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2021-11-17 07:48:07 +0000

    app-arch/snappy: remove -fno-rtti option
    
    Remove -fno-rtti option which may broke compilation of dependant
    packages. Migrate to EAPI=8, minor cleanups.
    Closes: https://bugs.gentoo.org/819909
    Package-Manager: Portage-3.0.20, Repoman-3.0.3
    Signed-off-by: Azamat H. Hackimov <azamat.hackimov@gmail.com>
    Closes: https://github.com/gentoo/gentoo/pull/22699
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 .../snappy/files/snappy-1.1.9_remove-no-rtti.patch | 35 +++++++++++++++++
 app-arch/snappy/snappy-1.1.9-r1.ebuild             | 45 ++++++++++++++++++++++
 2 files changed, 80 insertions(+)
Comment 9 Andreas Sturmlechner gentoo-dev 2022-02-27 16:37:49 UTC
Should this be stabilised then, at some point?