Bug 610269

Summary: Incorrect pkgconfig files in glib2-devel package break buildings that depend on them.
Product: [Fedora] Fedora Reporter: Yufei Yuan <yyuan>
Component: glib2Assignee: Matthias Clasen <mclasen>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 13CC: mclasen, yyuan
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-07-02 00:57:41 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Yufei Yuan 2010-07-01 21:44:02 UTC
Description of problem:
Several incorrect .pc files in the glib2-devel package breaks building of other packages. Specifically, search for '-pthread' in *.pc files. While for '--libs' this should be '-lpthread', and for '--cflags' it is totally unnecessary.

Version-Release number of selected component (if applicable):
glib2-devel-2.24.1-1.fc13.i686

How reproducible:
Build packages that relies on these pkgconfig files.

Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
Files that need fix in this package:
gthread-2.0.pc, gmodule-no-export-2.0.pc, gmodule-2.0.pc, gmodule-export-2.0.pc

Comment 1 Matthias Clasen 2010-07-02 00:57:41 UTC
No, you are wrong here.

E.g. man pthreads:

       On Linux, programs that use the Pthreads API should be  compiled  using
       cc -pthread.

Comment 2 Yufei Yuan 2010-07-02 16:46:14 UTC
That is an interesting point. Are we sure this '-pthread' is universal, I mean, that all targets support it? Also, is here 'cc' implies 'gcc'?

I am running on Intel IA-32, and I just checked the gcc version and man page:


[alex@core2duo ~]$ gcc --version
gcc (GCC) 4.4.4 20100503 (Red Hat 4.4.4-2)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

The man page only shows that some targets do have this flag,like SPARC and PPC.

I also read an excerpt like this:


-ftree-parallelize-loops=n
           Parallelize loops, i.e., split their iteration space to run in n
           threads.  This is only possible for loops whose iterations are
           independent and can be arbitrarily reordered.  The optimization is
           only profitable on multiprocessor machines, for loops that are CPU-
           intensive, rather than constrained e.g. by memory bandwidth.  This
           option implies -pthread, and thus is only supported on targets that
           have support for -pthread.

If you read the last sentence, it sounds to me like not all targets having -pthread support, and it seems that I cannot find it for IA-32. IA-64 does not it.

And by adding the flags as I have shown, I actually got good build on IA-32.

Cheers,

Comment 3 Yufei Yuan 2010-07-02 16:48:18 UTC
I have typos above.

"IA-64 does not it"

should be

"IA-64 does have it".

Cheers,