Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 610269 - Incorrect pkgconfig files in glib2-devel package break buildings that depend on them.
Incorrect pkgconfig files in glib2-devel package break buildings that depend ...
Product: Fedora
Classification: Fedora
Component: glib2 (Show other bugs)
i686 Linux
low Severity low
: ---
: ---
Assigned To: Matthias Clasen
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2010-07-01 17:44 EDT by Yufei Yuan
Modified: 2010-07-02 12:58 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-07-01 20:57:41 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Yufei Yuan 2010-07-01 17:44:02 EDT
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):

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

Steps to Reproduce:
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-01 20:57:41 EDT
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 12:46:14 EDT
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

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

I also read an excerpt like this:

           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.

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

"IA-64 does not it"

should be

"IA-64 does have it".


Note You need to log in before you can comment on or make changes to this bug.