JDK tests cannot be built with Xcode 14, deprecated copies in Gtest

Mariell Hoversholm mariellh at spotify.com
Tue Dec 20 08:14:47 UTC 2022


Hi,

I cannot build the JDK tests (`make test`) on macOS (aarch64) with Xcode
14.2 and Googletest v1.8.1.  I checked the issue tracker first, but found
nothing related to this, so thought I'd mention it here; please redirect me
to another mailing list if this is not the appropriate place.

Excerpt from the output is as follows (there are probably more error
locations, but this is all that's given to start, only 20 times over):

=== Output from failing command(s) repeated here ===
* For target hotspot_variant-server_libjvm_gtest_objs_gtestMain.o:
In file included from
/Users/mariellh/Work/jdk/test/hotspot/gtest/gtestMain.cpp:29:
In file included from
/Users/mariellh/Work/jdk/test/hotspot/gtest/unittest.hpp:51:
In file included from
/Users/mariellh/Work/googletest/googlemock/include/gmock/gmock.h:59:
/Users/mariellh/Work/googletest/googlemock/include/gmock/gmock-actions.h:484:3:
error: definition of implicit copy constructor for
'PolymorphicAction<testing::internal::ReturnNullAction>' is deprecated
because it has a user-declared copy assignment operator
[-Werror,-Wdeprecated-copy]
  GTEST_DISALLOW_ASSIGN_(PolymorphicAction);
  ^
/Users/mariellh/Work/googletest/googletest/include/gtest/internal/gtest-port.h:928:8:
note: expanded from macro 'GTEST_DISALLOW_ASSIGN_'
  void operator=(type const &) GTEST_CXX11_EQUALS_DELETE_
       ^
/Users/mariellh/Work/googletest/googlemock/include/gmock/gmock-actions.h:1125:10:
note: in implicit copy constructor for
'testing::PolymorphicAction<testing::internal::ReturnNullAction>' first
required here
  return MakePolymorphicAction(internal::ReturnNullAction());
         ^
/Users/mariellh/Work/googletest/googlemock/include/gmock/gmock-actions.h:484:3:
error: definition of implicit copy constructor for
'PolymorphicAction<testing::internal::ReturnVoidAction>' is deprecated
because it has a user-declared copy assignment operator
[-Werror,-Wdeprecated-copy]
  GTEST_DISALLOW_ASSIGN_(PolymorphicAction);
  ^
   ... (rest of output omitted)

Cheers,
Mariell Hoversholm (she/they)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/jdk-dev/attachments/20221220/c995e597/attachment.htm>


More information about the jdk-dev mailing list