Page MenuHomeFreeBSD

devel/googletest: require libpthread
ClosedPublic

Authored by ngie on Mar 4 2019, 9:31 PM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 29 2024, 9:19 AM
Unknown Object (File)
Jan 15 2024, 4:11 PM
Unknown Object (File)
Jan 13 2024, 7:59 AM
Unknown Object (File)
Jan 6 2024, 1:57 AM
Unknown Object (File)
Jan 1 2024, 7:51 AM
Unknown Object (File)
Dec 26 2023, 11:27 AM
Unknown Object (File)
Dec 23 2023, 3:45 AM
Unknown Object (File)
Sep 15 2023, 9:19 PM

Details

Summary

As noted by @asomers in rS300906 (cddl/usr.sbin/zfsd/tests/Makefile
specifically), googletest requires libpthread in order to function, if
-DGTEST_HAS_PTHREAD is defined.

While this is true, the code was not being linked against libpthread,
resulting in libgtest being broken, and thus all tests reliant on the library
broken at runtime.

Adding LIBS+= -lpthread unbreaks the tests that use pthread support
internally.

PR: 236169
Suggested by: @jbeich

Test Plan

Verified that a newly built/installed copy of the package linked in libthr.so:

$ ldd /usr/local/lib/libgtest.so
/usr/local/lib/libgtest.so:
        libthr.so.3 => /lib/libthr.so.3 (0x801261000)
        libc++.so.1 => /usr/lib/libc++.so.1 (0x801489000)
        libcxxrt.so.1 => /lib/libcxxrt.so.1 (0x801757000)
        libm.so.5 => /lib/libm.so.5 (0x801976000)
        libc.so.7 => /lib/libc.so.7 (0x800823000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x801ba3000)

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

ngie added subscribers: emaste, jtl.
jbeich added inline comments.
devel/googletest/Makefile
32 ↗(On Diff #54710)

Drop terminating dot. It gets in the way of copy-pasting URL.

This revision is now accepted and ready to land.Mar 4 2019, 9:38 PM
This revision was automatically updated to reflect the committed changes.