Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 669856

Summary: cross-x86_64-w64-mingw32/gcc-8.2.0-r4 - libgomp/configure: /usr/libexec/gcc/x86_64-w64-mingw32/ld: cannot find -lpthread
Product: Gentoo Linux Reporter: Rafael Kitover <rkitover>
Component: Current packagesAssignee: Gentoo Toolchain Maintainers <toolchain>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: gcc-build-logs.tar.bz2

Description Rafael Kitover 2018-10-28 12:23:16 UTC
Created attachment 553486 [details]
gcc-build-logs.tar.bz2

The problem seems to be:

configure: error: Pthreads are required to build libgomp

build logs are attached.

I have mingw winpthreads installed by re-emerging the libraries with USE=libraries like you suggested, but it seems this directory is not searched by the gcc build.

I have it here:

/usr/x86_64-w64-mingw32/usr/lib64/libpthread.a
Comment 1 Anton Romanov 2018-12-31 21:52:13 UTC
for me this was solved by reemerging mingw64-runtime with +libraries and then reemerging gcc
Comment 2 tt_1 2020-03-22 08:30:20 UTC
that's correct, if your cross-x86_64-w64-mingw32/gcc needs posix threads support, you first must build mingw64-runtime with USE="libraries"
Comment 3 Sergei Trofimovich (RETIRED) gentoo-dev 2021-01-03 12:51:53 UTC

*** This bug has been marked as a duplicate of bug 631460 ***