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

David Holmes david.holmes at oracle.com
Wed Dec 21 02:48:11 UTC 2022


Hi Mariell,

On 20/12/2022 6:14 pm, Mariell Hoversholm wrote:
> 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.

build-dev at openjdk.org is probably a better place, but AFAIK we've only 
just started looking at use of Xcode 14.2

Cheers,
David
-----

> 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)


More information about the jdk-dev mailing list