Page MenuHomeFreeBSD

Fix incremental builds after GoogleTest update
ClosedPublic

Authored by dim on Aug 15 2023, 9:15 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Sep 19, 12:44 PM
Unknown Object (File)
Thu, Sep 19, 6:03 AM
Unknown Object (File)
Wed, Sep 18, 11:18 PM
Unknown Object (File)
Mon, Sep 16, 10:54 AM
Unknown Object (File)
Mon, Sep 16, 7:48 AM
Unknown Object (File)
Wed, Sep 11, 4:59 AM
Unknown Object (File)
Tue, Sep 3, 7:16 AM
Unknown Object (File)
Sat, Aug 31, 2:10 AM
Subscribers

Details

Summary

At the moment, several Makefiles under tests/ do not correctly generate
.depend files, which can lead to link errors when doing incremental
(e.g. WITHOUT_CLEAN) builds:

ld: error: undefined symbol: testing::internal::g_linked_ptr_mutex
>>> referenced by gtest-port.h:2137 (/usr/obj/usr/src/amd64.amd64/tmp/usr/include/private/gtest/internal/gtest-port.h:2137)
>>>               mockfs.o:(testing::internal::linked_ptr_internal::depart())
>>> referenced by gtest-port.h:2139 (/usr/obj/usr/src/amd64.amd64/tmp/usr/include/private/gtest/internal/gtest-port.h:2139)
>>>               mockfs.o:(testing::internal::linked_ptr_internal::depart())
>>> referenced by gtest-port.h:2139 (/usr/obj/usr/src/amd64.amd64/tmp/usr/include/private/gtest/internal/gtest-port.h:2139)
>>>               mockfs.o:(testing::internal::linked_ptr_internal::depart())
>>> referenced 3 more times

For the time being, put in a depend-cleanup.sh workaround for this.

Fixes: 28f6c2f29280
MFC after: 2 weeks

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

dim requested review of this revision.Aug 15 2023, 9:15 PM
tools/build/depend-cleanup.sh
210

Is -U/--binary beneficial too?

This revision is now accepted and ready to land.Aug 15 2023, 10:35 PM
tools/build/depend-cleanup.sh
210

It doesn't really matter, since we are using -q to shut up grep's output anyway. (-U is to "Search binary files, but do not attempt to print them".)

This revision was automatically updated to reflect the committed changes.