Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 608688 - dev-db/mongodb fails to build with LTO
Summary: dev-db/mongodb fails to build with LTO
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Ultrabug
URL:
Whiteboard:
Keywords: EBUILD, PATCH, PullRequest
Depends on:
Blocks: lto
  Show dependency tree
 
Reported: 2017-02-09 06:12 UTC by Amit Prakash Ambasta
Modified: 2019-03-04 01:35 UTC (History)
1 user (show)

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


Attachments
mongodb-3.4.1.ebuild (mongodb-3.4.1.ebuild,4.93 KB, text/plain)
2017-02-09 06:12 UTC, Amit Prakash Ambasta
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Amit Prakash Ambasta 2017-02-09 06:12:36 UTC
Created attachment 462920 [details]
mongodb-3.4.1.ebuild

Hi,

Currently, mongodb fails to emerge at all when -flto=thin or -flto are included in CFLAGS with:

Compiler must support a thread local storage class for trivially constructible types


This is because while mongodb supports building with LTO, it requires an additional scons argument as:

scons_opts+=( --lto=on )

to be enabled. I'd recommend that the ebuilds support this feature either by detecting LTO in cflags or passing it on as a separate USE flag.

I'm attaching a working ebuild alongwith for reference.
Comment 1 Larry the Git Cow gentoo-dev 2019-03-04 01:35:48 UTC
The bug has been closed via the following commit(s):

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

commit 020f4bb69894058b9a5fc7342aaeb3fa06c9e957
Author:     Tomas Mozes <hydrapolic@gmail.com>
AuthorDate: 2019-01-26 05:26:46 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2019-03-04 00:47:28 +0000

    dev-db/mongodb: bump to 4.0.5
    
    Signed-off-by: Tomas Mozes <hydrapolic@gmail.com>
    Closes: https://bugs.gentoo.org/673776
    Closes: https://bugs.gentoo.org/608688
    Closes: https://bugs.gentoo.org/673512
    Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>

 dev-db/mongodb/Manifest             |   1 +
 dev-db/mongodb/mongodb-4.0.5.ebuild | 164 ++++++++++++++++++++++++++++++++++++
 2 files changed, 165 insertions(+)