Red Hat Bugzilla – Bug 125539
not compiled with -fPIC
Last modified: 2007-11-30 17:06:54 EST
glib2 is not compiled with -fPIC, so static linking fails. This is at
least true with libgobject.
Actually, I was wrong, it was one of our packages. Sigh.
Hmm, I can't make up my mind here.
The rhel3 packages don't seem to be compiled with either, or so the
linker says. Reopening.
I will need more information to make sense of this. The object files
are definitively compiled with -fPIC, at least thats what I'm seeing here.
And the produced object files show up as REL (Relocatable file) in
Am I missing something here ? What exactly is the problem you're seeing ?
When trying to statically link to glib and create a shared object, I
get the following messages:
relocation R_X86_64_32 can not be used when making a shared object;
recompile with -fPIC
I've a test case, which I will attach.
Created attachment 101300 [details]
Test case (tarball)
Matthias: Is it compiled with "-fPIC" or is it compiled with "-fpic"?
I'd check the rpm build logs directly to be sure.
This bug is filed against RHEL2.1, which is in maintenance phase.
During the maintenance phase, only security errata and select mission
critical bug fixes will be released for enterprise products. Since
this bug does not meet that criteria, it is now being closed.
For more information of the RHEL errata support policy, please visit:
If you feel this bug is indeed mission critical, please contact your
support representative. You may be asked to provide detailed
information on how this bug is affecting you.