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 ...
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: glib2 (Show other bugs)
13
i686 Linux
low Severity low
: ---
: ---
Assigned To: Matthias Clasen
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  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:
Environment:
Last Closed: 2010-07-01 20:57:41 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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):
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-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
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 12:48:18 EDT
I have typos above.

"IA-64 does not it"

should be

"IA-64 does have it".

Cheers,

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