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: [email protected]
        ReportedBy: [email protected]
         QAContact: [email protected]
                CC: [email protected], [email protected],
                    [email protected],
                    [email protected]
    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.
_______________________________________________
fedora-mingw mailing list
[email protected]
https://admin.fedoraproject.org/mailman/listinfo/fedora-mingw

Reply via email to