Page MenuHomeFreeBSD

devel/googletest: require libpthread
ClosedPublic

Authored by ngie on Mar 4 2019, 9:31 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
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 22887
Build 21973: arc lint + arc unit

Event Timeline

ngie created this revision.Mar 4 2019, 9:31 PM
ngie edited the summary of this revision. (Show Details)Mar 4 2019, 9:34 PM
ngie added subscribers: emaste, jtl.
jbeich accepted this revision.Mar 4 2019, 9:38 PM
jbeich added inline comments.
devel/googletest/Makefile
32

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.