Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 760881 - dev-libs/rapidjson: USE="test": Drop dependency on dev-util/valgrind; USE="examples": Compilation failure on SPARC due to unsupported -march=native
Summary: dev-libs/rapidjson: USE="test": Drop dependency on dev-util/valgrind; USE="ex...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Craig Andrews
URL: https://github.com/Tencent/rapidjson/...
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2020-12-20 12:43 UTC by Arfrever Frehtes Taifersar Arahesis
Modified: 2020-12-28 16:44 UTC (History)
2 users (show)

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


Attachments
Patch (rapidjson.patch,10.26 KB, patch)
2020-12-28 02:19 UTC, Arfrever Frehtes Taifersar Arahesis
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Arfrever Frehtes Taifersar Arahesis 2020-12-20 12:43:30 UTC
dev-libs/rapidjson needs patch from https://github.com/Tencent/rapidjson/issues/1808 added and dependency on dev-util/valgrind dropped.

This will allow to easily keyword dev-libs/rapidjson on architectures not supported by dev-util/valgrind.
Comment 1 Arfrever Frehtes Taifersar Arahesis 2020-12-28 00:21:17 UTC
Rolf Eike Beer also asked for including of some fix for:
https://github.com/Tencent/rapidjson/issues/1816

Problem occurs only with USE="examples" and results in compilation failure on some architectures (e.g. SPARC) which do not support -march=native option.
Comment 2 Arfrever Frehtes Taifersar Arahesis 2020-12-28 00:41:39 UTC
(In reply to Arfrever Frehtes Taifersar Arahesis from comment #1)
> Rolf Eike Beer also asked for including of some fix for:
> https://github.com/Tencent/rapidjson/issues/1816
> 
> Problem occurs only with USE="examples" and results in compilation failure
> on some architectures (e.g. SPARC) which do not support -march=native option.

Patch for trunk fails to apply to 1.1.0 release, and ebuild already uses sed to remove -Werror option, so it will be easier to use sed to remove -march=native / -mcpu=native options.
Comment 3 Arfrever Frehtes Taifersar Arahesis 2020-12-28 01:31:26 UTC
Build system fails to detect gtest and no tests are run:

...
-- Could NOT find GTestSrc (missing: GTEST_SOURCE_DIR)
...
-- Configuring done
-- Generating done
-- Build files have been written to: /var/tmp/portage/dev-libs/rapidjson-1.1.0-r2/work/rapidjson-1.1.0_build
>>> Source configured.
>>> Compiling source in /var/tmp/portage/dev-libs/rapidjson-1.1.0-r2/work/rapidjson-1.1.0 ...
 * Working in BUILD_DIR: "/var/tmp/portage/dev-libs/rapidjson-1.1.0-r2/work/rapidjson-1.1.0_build"
ninja -v -j10 -l0
ninja: no work to do.
>>> Source compiled.
>>> Test phase: dev-libs/rapidjson-1.1.0-r2
 * Working in BUILD_DIR: "/var/tmp/portage/dev-libs/rapidjson-1.1.0-r2/work/rapidjson-1.1.0_build"
ctest -j 10 --test-load 999
Test project /var/tmp/portage/dev-libs/rapidjson-1.1.0-r2/work/rapidjson-1.1.0_build
No tests were found!!!
 * Tests succeeded.
>>> Completed testing dev-libs/rapidjson-1.1.0-r2


After fixing this problem:
>>> Test phase: dev-libs/rapidjson-1.1.0-r2
 * Working in BUILD_DIR: "/var/tmp/portage/dev-libs/rapidjson-1.1.0-r2/work/rapidjson-1.1.0_build"
ctest -j 10 --test-load 999
Test project /var/tmp/portage/dev-libs/rapidjson-1.1.0-r2/work/rapidjson-1.1.0_build
    Start 1: perftest
    Start 2: unittest
    Start 3: valgrind_unittest
1/3 Test #3: valgrind_unittest ................***Failed    0.12 sec
2/3 Test #2: unittest .........................   Passed    1.33 sec
3/3 Test #1: perftest .........................   Passed   31.70 sec

67% tests passed, 1 tests failed out of 3

Total Test time (real) =  31.70 sec

The following tests FAILED:
          3 - valgrind_unittest (Failed)
Errors while running CTest
 * ERROR: dev-libs/rapidjson-1.1.0-r2::gentoo failed (test phase):
Comment 4 Arfrever Frehtes Taifersar Arahesis 2020-12-28 02:19:46 UTC
Created attachment 679928 [details, diff]
Patch
Comment 5 Craig Andrews gentoo-dev 2020-12-28 16:43:45 UTC
(In reply to Arfrever Frehtes Taifersar Arahesis from comment #4)
> Created attachment 679928 [details, diff] [details, diff]
> Patch

Thank you!

I've merged the patch with one small change: instead of modifying the existing version, I've done a revbump.
Comment 6 Larry the Git Cow gentoo-dev 2020-12-28 16:44:00 UTC
The bug has been closed via the following commit(s):

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

commit cf938e7183d49f0da60052ddc884bc99643a49cc
Author:     Craig Andrews <candrews@gentoo.org>
AuthorDate: 2020-12-28 16:43:33 +0000
Commit:     Craig Andrews <candrews@gentoo.org>
CommitDate: 2020-12-28 16:43:56 +0000

    dev-libs/rapidjson: Drop dependency on valgrind; remove -march=native
    
    Closes: https://bugs.gentoo.org/760881
    Package-Manager: Portage-3.0.12, Repoman-3.0.2
    Signed-off-by: Craig Andrews <candrews@gentoo.org>

 .../files/rapidjson-1.1.0-system_gtest.patch       | 44 ++++++++++++++++++
 .../files/rapidjson-1.1.0-valgrind_optional.patch  | 21 +++++++++
 .../files/rapidjson-1.1.1-valgrind_optional.patch  | 21 +++++++++
 dev-libs/rapidjson/rapidjson-1.1.0-r3.ebuild       | 54 ++++++++++++++++++++++
 dev-libs/rapidjson/rapidjson-9999.ebuild           | 18 +++++---
 5 files changed, 151 insertions(+), 7 deletions(-)