Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 687606 - dev-cpp/gtest-1.9.0_pre*: New snapshot needed
Summary: dev-cpp/gtest-1.9.0_pre*: New snapshot needed
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: Normal normal
Assignee: Peter Levine
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2019-06-07 22:58 UTC by Arfrever Frehtes Taifersar Arahesis
Modified: 2019-06-15 20:29 UTC (History)
1 user (show)

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


Attachments
gtest-1.9.0_pre20190607170818.ebuild (gtest-1.9.0_pre20190607170818.ebuild,1.81 KB, text/plain)
2019-06-08 01:01 UTC, Arfrever Frehtes Taifersar Arahesis
Details
gtest-1.9.0-increase-clone-stack-size.patch (gtest-1.9.0-increase-clone-stack-size.patch,629 bytes, patch)
2019-06-08 01:04 UTC, Arfrever Frehtes Taifersar Arahesis
Details | Diff
gtest-1.9.0_pre20190607170818.ebuild (gtest-1.9.0_pre20190607170818.ebuild,1.84 KB, text/plain)
2019-06-08 01:10 UTC, Arfrever Frehtes Taifersar Arahesis
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Arfrever Frehtes Taifersar Arahesis 2019-06-07 22:58:46 UTC
dev-cpp/gtest-1.9.0_pre* snapshot is needed for test suite of dev-libs/protobuf-3.8.0 which was released in last week.

Snapshot should be from "master" branch, not "v1.8.x" branch. (There is no "v1.9.x" branch in upstream repository.)


dev-libs/protobuf-3.8.0[test] fails to build with =dev-cpp/gtest-1.8*:
"""
x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I/var/tmp/portage/dev-libs/protobuf-3.8.0/work/protobuf-3.8.0/src -I..   -DGOOGLE_PROTOBUF_NO_RTTI -pthread -DHAVE_PTHREAD=1 -DHAVE_ZLIB=1 -Wall -Wno-sign-compare -march=native -O2 -fno-ident -frecord-gcc-switches -fstack-clash-protection -fstack-protector-all -mfunction-return=thunk -mindirect-branch=thunk -mindirect-branch-register -pipe -Wall -Werror=terminate -c -o google/protobuf/protobuf_test-descriptor_unittest.o `test -f 'google/protobuf/descriptor_unittest.cc' || echo '/var/tmp/portage/dev-libs/protobuf-3.8.0/work/protobuf-3.8.0/src/'`google/protobuf/descriptor_unittest.cc
/var/tmp/portage/dev-libs/protobuf-3.8.0/work/protobuf-3.8.0/src/google/protobuf/descriptor_unittest.cc:2917:25: error: expected constructor, destructor, or type conversion before ‘(’ token
 INSTANTIATE_TEST_SUITE_P(DatabaseSource, AllowUnknownDependenciesTest,
                         ^
make[2]: *** [Makefile:5366: google/protobuf/protobuf_test-descriptor_unittest.o] Error 1
"""
(INSTANTIATE_TEST_SUITE_P macro is absent in =dev-cpp/gtest-1.8*.)


I can create appropriate ebuild of dev-cpp/gtest-1.9.0_pre*.
Would you prefer versioning with ${year}${month}${day}${hour}${minute}${second} or ${year}${month}${day}?
(Based on time (in UTC time zone) of newest commit available now, it would be dev-cpp/gtest-1.9.0_pre20190607170818 or dev-cpp/gtest-1.9.0_pre20190607)
Comment 1 Peter Levine 2019-06-07 23:58:52 UTC
Good timing.  I've been in the process of adding some commits to a proposed pull request so I'll take a look at it tonight.
Comment 2 Arfrever Frehtes Taifersar Arahesis 2019-06-08 00:59:53 UTC
I am attaching my initial work for your convenience...
Comment 3 Arfrever Frehtes Taifersar Arahesis 2019-06-08 01:01:59 UTC
Created attachment 579184 [details]
gtest-1.9.0_pre20190607170818.ebuild

--- gtest-1.8.1-r1.ebuild
+++ gtest-1.9.0_pre20190607170818.ebuild
@@ -11,6 +11,10 @@
 if [[ ${PV} == "9999" ]]; then
        inherit git-r3
        EGIT_REPO_URI="https://github.com/google/googletest"
+elif [[ ${PV} == *_pre* ]]; then
+       GOOGLETEST_REVISION="da10da05c262af0a9e8fa91789a272a3dec67655"
+       SRC_URI="https://github.com/google/googletest/archive/${GOOGLETEST_REVISION}.tar.gz -> ${P}.tar.gz"
+       S="${WORKDIR}"/googletest-${GOOGLETEST_REVISION}
 else
        SRC_URI="https://github.com/google/googletest/archive/release-${PV}.tar.gz -> ${P}.tar.gz"
        KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos"
@@ -28,8 +32,7 @@
 RDEPEND="!dev-cpp/gmock"
 
 PATCHES=(
-       "${FILESDIR}"/${PN}-9999-fix-gcc6-undefined-behavior.patch
-       "${FILESDIR}"/${PN}-1.8.0-increase-clone-stack-size.patch
+       "${FILESDIR}"/${PN}-1.9.0-increase-clone-stack-size.patch
 )
 
 pkg_setup() {
Comment 4 Arfrever Frehtes Taifersar Arahesis 2019-06-08 01:04:45 UTC
Created attachment 579186 [details, diff]
gtest-1.9.0-increase-clone-stack-size.patch

You might want to send updated version of *-increase-clone-stack-size.patch to upstream, either in https://github.com/google/googletest/pull/1274, or in a new pull request (and updating URL in patch).
Comment 5 Arfrever Frehtes Taifersar Arahesis 2019-06-08 01:10:11 UTC
Created attachment 579188 [details]
gtest-1.9.0_pre20190607170818.ebuild

(KEYWORDS fixed)
Comment 6 Arfrever Frehtes Taifersar Arahesis 2019-06-08 01:15:59 UTC
Beside this, commit 8341c97fd2aeccd008c55d4a88e7af48026e3f69 (https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8341c97fd2aeccd008c55d4a88e7af48026e3f69) changed ebuilds to use EAPI="7", but in this EAPI build-time dependency on Python should be in BDEPEND, not DEPEND. So:
-DEPEND="test? ( ${PYTHON_DEPS} )"
+BDEPEND="test? ( ${PYTHON_DEPS} )"
Comment 7 Peter Levine 2019-06-08 02:42:15 UTC
(In reply to Arfrever Frehtes Taifersar Arahesis from comment #4)
> Created attachment 579186 [details, diff] [details, diff]
> gtest-1.9.0-increase-clone-stack-size.patch
> 
> You might want to send updated version of *-increase-clone-stack-size.patch
> to upstream, either in https://github.com/google/googletest/pull/1274, or in
> a new pull request (and updating URL in patch).

I am utterly incapable of reproducing the underlying issue in 9999 so, assuming there is some other upstream commit that had inadvertently fixed it, I may drop the patch entirely.  I'll keep testing though.
Comment 8 Peter Levine 2019-06-08 02:44:59 UTC
(In reply to Peter Levine from comment #7)
> I may drop the patch entirely.

...from the latest ebuilds.
Comment 9 Peter Levine 2019-06-08 06:08:31 UTC
(In reply to Peter Levine from comment #7)
> I am utterly incapable of reproducing the underlying issue in 9999 so,
> assuming there is some other upstream commit that had inadvertently fixed
> it, I may drop the patch entirely.  I'll keep testing though.

Nevermind. https://github.com/InBetweenNames/gentooLTO/issues/347
Comment 10 Arfrever Frehtes Taifersar Arahesis 2019-06-08 10:12:38 UTC
I have now confirmed that app-i18n/mozc-2.23.2815.102[test] and dev-libs/protobuf-3.8.0[test] build correctly and pass all tests with dev-cpp/gtest-1.9.0_pre20190607170818.
Comment 11 Larry the Git Cow gentoo-dev 2019-06-15 20:29:33 UTC
The bug has been closed via the following commit(s):

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

commit e58c0ab35c35b4de684f86137e432efba6592080
Author:     Peter Levine <plevine457@gmail.com>
AuthorDate: 2019-06-08 22:27:02 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2019-06-15 20:29:28 +0000

    dev-cpp/gtest: Update to 1.9.0_pre20190607
    
    Latest dev-libs/protobuf-3.8.0 is going to need the INSTANTIATE_TEST_SUITE_P
    macro which is defined in upstream master branch.  Also, fixes for building
    with gcc-9 have been included upstream so this kills two bugs.
    
    Reported-by: Toralf Förster <toralf@gentoo.org>
    Closes: https://bugs.gentoo.org/687086
    Reported-by: Arfrever Frehtes Taifersar Arahesis <arfrever.fta@gmail.com>
    Tested-by: Arfrever Frehtes Taifersar Arahesis <arfrever.fta@gmail.com>
    Closes: https://bugs.gentoo.org/687606
    Closes: https://github.com/gentoo/gentoo/pull/12222
    Package-Manager: Portage-2.3.67, Repoman-2.3.13
    Signed-off-by: Peter Levine <plevine457@gmail.com>
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 dev-cpp/gtest/Manifest                       |  1 +
 dev-cpp/gtest/gtest-1.9.0_pre20190607.ebuild | 79 ++++++++++++++++++++++++++++
 dev-cpp/gtest/gtest-9999.ebuild              |  9 +++-
 3 files changed, 87 insertions(+), 2 deletions(-)