[Bug 255123] devel/cmake: CMAKE_HAVE_LIBC_PTHREAD fails building projects: ld: error: undefined symbol: pthread_create
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Mon May 2 17:23:53 BST 2022
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=255123
Adriaan de Groot <adridg at freebsd.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|Open |Closed
Resolution|--- |Works As Intended
--- Comment #7 from Adriaan de Groot <adridg at freebsd.org> ---
The errors being written to CMakeErrors.log during cmake-time are **also** from
the tests being run to determine what works and what doesn't. So there's no
harm in there being errors in there: for instance, determining whether a
function strblep() exists will fail and leave an error in that log -- it just
means strblep() doesn't exist. If the compilation of target code **after**
cmake-time fails because of strblep(), then it's a bug in the target code: it
shouldn't be using it if it wasn't found.
So these entries in the log don't indicate there is a problem. So I'm going to
close this as "doesn't show an actual problem". Maybe there **is** a
pthreads-using program that does not work, but the suggested minimal main isn't
it.
Changing main to this:
```
#include <pthread.h>
int main(){
return pthread_create(nullptr, nullptr, nullptr,nullptr);
}
```
Will compile and link (passing `-pthread` to the compiler / linker).
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
More information about the kde-freebsd
mailing list