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)
Tue, Nov 5, 11:33 PM
Unknown Object (File)
Tue, Nov 5, 11:20 PM
Unknown Object (File)
Sep 24 2024, 3:29 PM
Unknown Object (File)
Sep 19 2024, 12:44 PM
Unknown Object (File)
Sep 19 2024, 6:03 AM
Unknown Object (File)
Sep 18 2024, 11:18 PM
Unknown Object (File)
Sep 16 2024, 10:54 AM
Unknown Object (File)
Sep 16 2024, 7:48 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.