Red Hat Bugzilla – Bug 610269
Incorrect pkgconfig files in glib2-devel package break buildings that depend on them.
Last modified: 2010-07-02 12:58:30 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):
Build packages that relies on these pkgconfig files.
Steps to Reproduce:
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
No, you are wrong here.
E.g. man pthreads:
On Linux, programs that use the Pthreads API should be compiled using
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:
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.
I have typos above.
"IA-64 does not it"
"IA-64 does have it".