Page MenuHomeFreeBSD

devel/googletest: require libpthread
ClosedPublic

Authored by ngie on Mar 4 2019, 9:31 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Mar 29, 11:35 AM
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

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 Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 22887
Build 21973: arc lint + arc unit

Event Timeline

ngie added subscribers: emaste, jtl.
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.