On Tue, Feb 08, 2022 at 09:46:09AM +0100, Omar Polo wrote:
I just finished a mini bulk build with `show-reverse-deps devel/gtest`
in a clean proot and successfully built 1872 packages, so I'm quite sure
it won't brings things down in real bulks.

if it helps, I've uploaded the logs here.

https://tmp.omarpolo.com/amd64/

only graphics/openscenegraph failed repeatedly to build, but it doesn't
seem to be related to gtest?

https://tmp.omarpolo.com/amd64/paths/graphics/openscenegraph.log

Note that I've tested with the previous commit (14aa11d), but the next
one (the one in your diff) shouldn't bring in differences:

https://github.com/google/googletest/commit/43efa0a4efd40c78b9210d15373112081899a97c

so OK for gtest as long as you don't forget to fix msgpack too :)

Thank you so much, Omar, for testing the build of all these
packages! I really appreciate your help!

On Tue, Feb 08, 2022 at 09:38:19AM +0000, Klemens Nanni wrote:
On Tue, Feb 08, 2022 at 09:46:09AM +0100, Omar Polo wrote:
(a revision bump shouldn't be needed in this case, since gtest is
bumping SHARED_LIBS too, but maybe to play on the safe side a bump is
required?)

msgpack does register gtest in WANTLIB and has no LIB_DEPENDS on it, so
I don't see how msgpack be rebuilt automatically due to the bump, so
a REVISION bump is needed.

I also expect this to change to change regardless of gtest, so another
reason for me to bump.

REVISION bump does not cost anything, so I'd just bump it.

I'd even bump the version spec since we explicitly require the new gtest
version that is built with c++17 now.

thanks Andrew for the msgpack fix

OK for this after updating gtest?

I was thinking a bit about updating the msgpack port. I came to the
conclusion that we should probably bump SHARED_LIBS and also check
the build of all ports that depend on msgpack.
Intend to start doing this now.

Apparently, by changing the C++ standard from C++98 to C++17 we
change abi in an incompatible way (probably mostly due to changes
in the C++ standard library). The gtest linking errors with
msgpack or abseil-cpp are a consequence of this.
I think it would be better to be reinsured here.
What is your opinion?

If you share my concerns, the diff I intend to test now looks
like this:
Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/msgpack/Makefile,v
retrieving revision 1.12
diff -u -p -r1.12 Makefile
--- Makefile    14 Feb 2020 11:11:32 -0000      1.12
+++ Makefile    8 Feb 2022 22:54:04 -0000
@@ -7,8 +7,9 @@ GH_ACCOUNT =            msgpack
 GH_PROJECT =           msgpack-c
 GH_TAGNAME =           cpp-${V}
 DISTNAME =             msgpack-${V}
+REVISION =             0
-SHARED_LIBS += msgpackc 1.0 # 2.0
+SHARED_LIBS += msgpackc                  1.1 # 2.0
CATEGORIES = devel @@ -20,8 +21,11 @@ PERMIT_PACKAGE = Yes
 COMPILER =             base-clang ports-gcc
 MODULES =              devel/cmake
-BUILD_DEPENDS = devel/gtest
-TEST_DEPENDS =         devel/gtest
+BUILD_DEPENDS =                devel/gtest>=1.11.0.20220207
+TEST_DEPENDS =         devel/gtest>=1.11.0.20220207
+
+# match standard version with gtest
+CONFIGURE_ARGS +=      -DCMAKE_CXX_STANDARD=17 
pre-configure:
        cd ${WRKSRC} && sed -i 's,-Werror -g -O3,,' CMakeLists.txt \

On Tue, Feb 08, 2022 at 05:52:46PM +0000, Stuart Henderson wrote:
In any case, my pull-request is now merged into main branch, so, you
can just delete cited code and set GH_COMMIT to
'06519cedc3159de8b36a504766ad6b7966555f10'.

(I will be able to send you the patch when I will be at my
openbsd-machine, right now it is, alas, not so)

Thanks :)


The latest (at the moment) version of my diff to the gtest port.
I hope I haven't forgotten anything:

Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/gtest/Makefile,v
retrieving revision 1.26
diff -u -p -r1.26 Makefile
--- Makefile    8 Feb 2022 09:31:46 -0000       1.26
+++ Makefile    8 Feb 2022 23:28:43 -0000
@@ -5,16 +5,15 @@ BROKEN-alpha =        googletest/test/gtest_uni
COMMENT = C++ unit test framework -V= 1.8.1
 GH_ACCOUNT=    google
 GH_PROJECT=    googletest
-GH_TAGNAME=    release-$V
-PKGNAME =      gtest-$V
+GH_COMMIT=     06519cedc3159de8b36a504766ad6b7966555f10
+DISTNAME=      gtest-1.11.0.20220207
-SHARED_LIBS += gmock 0.1 # .0.0
-SHARED_LIBS += gmock_main      0.1   # .0.0
-SHARED_LIBS += gtest           1.1   # .0.0
-SHARED_LIBS += gtest_main      1.1   # .0.0
+SHARED_LIBS += gmock           1.0   # .0.0
+SHARED_LIBS += gmock_main      1.0   # .0.0
+SHARED_LIBS += gtest           2.0   # .0.0
+SHARED_LIBS += gtest_main      2.0   # .0.0
CATEGORIES = devel @@ -28,17 +27,22 @@ CXXFLAGS += -mxgot
 # New BSD
 PERMIT_PACKAGE =       Yes
-SEPARATE_BUILD = Yes
-
 WANTLIB =              m ${COMPILER_LIBCXX}
-COMPILER = base-clang ports-gcc base-gcc
+COMPILER =             base-clang ports-gcc
MODULES = devel/cmake \
                        lang/python
+
 MODPY_RUNDEP =         No
-CONFIGURE_ARGS = -DBUILD_SHARED_LIBS=ON \
+MODULES +=             devel/cmake
+CONFIGURE_ARGS +=      -DBUILD_SHARED_LIBS=ON \
                        -Dgtest_build_tests=ON
+
+# c++ standard must be the same as in devel/abseil-cpp,
+# otherwise the build of abseil tests will end with an error
+# see https://github.com/abseil/abseil-cpp/issues/819
+CONFIGURE_ARGS +=      -DCMAKE_CXX_STANDARD=17
.include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/devel/gtest/distinfo,v
retrieving revision 1.5
diff -u -p -r1.5 distinfo
--- distinfo    31 Oct 2021 16:09:26 -0000      1.5
+++ distinfo    8 Feb 2022 23:28:43 -0000
@@ -1,2 +1,2 @@
-SHA256 (googletest-1.8.1.tar.gz) = m/H+UYKmBLQTXtwaQlrjVsmtFemyP58SoC6AGEw6JJw=
-SIZE (googletest-1.8.1.tar.gz) = 992298
+SHA256 (gtest-1.11.0.20220207-06519ced.tar.gz) = 
sRI4OZi04SMfIwCe725y3/CchJ110HBAZa2XOcxh9LA=
+SIZE (gtest-1.11.0.20220207-06519ced.tar.gz) = 835586
cvs server: Diffing pkg
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/devel/gtest/pkg/PLIST,v
retrieving revision 1.4
diff -u -p -r1.4 PLIST
--- pkg/PLIST   31 Oct 2021 16:09:26 -0000      1.4
+++ pkg/PLIST   8 Feb 2022 23:28:43 -0000
@@ -2,35 +2,28 @@
 include/gmock/
 include/gmock/gmock-actions.h
 include/gmock/gmock-cardinalities.h
-include/gmock/gmock-generated-actions.h
-include/gmock/gmock-generated-actions.h.pump
-include/gmock/gmock-generated-function-mockers.h
-include/gmock/gmock-generated-function-mockers.h.pump
-include/gmock/gmock-generated-matchers.h
-include/gmock/gmock-generated-matchers.h.pump
-include/gmock/gmock-generated-nice-strict.h
-include/gmock/gmock-generated-nice-strict.h.pump
+include/gmock/gmock-function-mocker.h
 include/gmock/gmock-matchers.h
 include/gmock/gmock-more-actions.h
 include/gmock/gmock-more-matchers.h
+include/gmock/gmock-nice-strict.h
 include/gmock/gmock-spec-builders.h
 include/gmock/gmock.h
 include/gmock/internal/
 include/gmock/internal/custom/
 include/gmock/internal/custom/README.md
 include/gmock/internal/custom/gmock-generated-actions.h
-include/gmock/internal/custom/gmock-generated-actions.h.pump
 include/gmock/internal/custom/gmock-matchers.h
 include/gmock/internal/custom/gmock-port.h
-include/gmock/internal/gmock-generated-internal-utils.h
-include/gmock/internal/gmock-generated-internal-utils.h.pump
 include/gmock/internal/gmock-internal-utils.h
 include/gmock/internal/gmock-port.h
+include/gmock/internal/gmock-pp.h
 include/gtest/
+include/gtest/gtest-assertion-result.h
 include/gtest/gtest-death-test.h
+include/gtest/gtest-matchers.h
 include/gtest/gtest-message.h
 include/gtest/gtest-param-test.h
-include/gtest/gtest-param-test.h.pump
 include/gtest/gtest-printers.h
 include/gtest/gtest-spi.h
 include/gtest/gtest-test-part.h
@@ -47,17 +40,11 @@ include/gtest/internal/custom/gtest.h
 include/gtest/internal/gtest-death-test-internal.h
 include/gtest/internal/gtest-filepath.h
 include/gtest/internal/gtest-internal.h
-include/gtest/internal/gtest-linked_ptr.h
-include/gtest/internal/gtest-param-util-generated.h
-include/gtest/internal/gtest-param-util-generated.h.pump
 include/gtest/internal/gtest-param-util.h
 include/gtest/internal/gtest-port-arch.h
 include/gtest/internal/gtest-port.h
 include/gtest/internal/gtest-string.h
-include/gtest/internal/gtest-tuple.h
-include/gtest/internal/gtest-tuple.h.pump
 include/gtest/internal/gtest-type-util.h
-include/gtest/internal/gtest-type-util.h.pump
 lib/cmake/
 lib/cmake/GTest/
 lib/cmake/GTest/GTestConfig.cmake

--
Wbr, Andrew Krasavin

Reply via email to