Bug 167313 - gtest fails to link on Linux due to missing -lpthread
Summary: gtest fails to link on Linux due to missing -lpthread
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Other Linux
: P2 Normal
Assignee: Timothy Hatcher
Depends on:
Reported: 2017-01-23 09:38 PST by Timothy Hatcher
Modified: 2017-01-23 13:39 PST (History)
5 users (show)

See Also:

Patch (1.37 KB, patch)
2017-01-23 09:58 PST, Timothy Hatcher
achristensen: review+
achristensen: commit-queue+
Details | Formatted Diff | Diff
Patch (1.37 KB, patch)
2017-01-23 10:10 PST, Timothy Hatcher
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Timothy Hatcher 2017-01-23 09:38:54 PST
Building gtest is failing for me because CMAKE_USE_PTHREADS_INIT is not defined and GTEST_HAS_PTHREAD will be assumed true if it is undefined.
Comment 1 Timothy Hatcher 2017-01-23 09:58:02 PST
Created attachment 299521 [details]
Comment 2 WebKit Commit Bot 2017-01-23 10:00:42 PST
Attachment 299521 [details] did not pass style-queue:

ERROR: Source/ThirdParty/gtest/CMakeLists.txt:53:  One space between command "else" and its parentheses, should be "else ("  [whitespace/parentheses] [5]
Total errors found: 1 in 2 files

If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Timothy Hatcher 2017-01-23 10:10:36 PST
Created attachment 299522 [details]
Comment 4 WebKit Commit Bot 2017-01-23 10:47:07 PST
Comment on attachment 299522 [details]

Clearing flags on attachment: 299522

Committed r211044: <http://trac.webkit.org/changeset/211044>
Comment 5 WebKit Commit Bot 2017-01-23 10:47:13 PST
All reviewed patches have been landed.  Closing bug.
Comment 6 Timothy Hatcher 2017-01-23 12:27:39 PST
Comment on attachment 299522 [details]

View in context: https://bugs.webkit.org/attachment.cgi?id=299522&action=review

> Source/ThirdParty/gtest/CMakeLists.txt:48
> +find_package(Threads)

Turns out this isn't needed, it is assumed to happen in the platform make options file. I'll remove this.
Comment 7 Timothy Hatcher 2017-01-23 13:39:28 PST
Follow up. https://trac.webkit.org/changeset/211050