[Bug 498616] New: gcc -lpthread is broken
bugzilla at redhat.com
bugzilla at redhat.com
Fri May 1 14:23:40 UTC 2009
Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug.
Summary: gcc -lpthread is broken
https://bugzilla.redhat.com/show_bug.cgi?id=498616
Summary: gcc -lpthread is broken
Product: Fedora
Version: rawhide
Platform: All
OS/Version: Linux
Status: NEW
Severity: medium
Priority: low
Component: mingw32-pthreads
AssignedTo: rjones at redhat.com
ReportedBy: erik-fedora at vanpienbroek.nl
QAContact: extras-qa at fedoraproject.org
CC: lfarkas at lfarkas.org, berrange at redhat.com,
rjones at redhat.com,
fedora-mingw at lists.fedoraproject.org
Classification: Fedora
Created an attachment (id=342094)
--> (https://bugzilla.redhat.com/attachment.cgi?id=342094)
Libtool file which points to libpthreadGC2.a
When compiling applications or libraries which depend on mingw32-pthread, the
compilation always fails with a linker error:
$ cat test.c
int main(int argc, char **argv)
{
return 0;
}
$ i686-pc-mingw32-gcc test.c -o test.exe -lpthread
/usr/lib64/gcc/i686-pc-mingw32/4.4.0/../../../../i686-pc-mingw32/bin/ld: cannot
find -lpthread
collect2: ld returned 1 exit status
This is caused by the fact that only libpthreadGC2.a and libpthreadGCE2.a exist
in the mingw32-pthread package.
There are multiple solutions to fix this problem:
- Rename one of the two .a files to libpthread.a
- Create a .la file which points libtool to one of the .a files (file attached)
Note: The second solution only works for libtool based projects.
Does anyone know what the actual difference is between the two .a files ?
--
Configure bugmail: https://bugzilla.redhat.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the mingw
mailing list