Bug 125539 - not compiled with -fPIC
not compiled with -fPIC
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 2.1
Classification: Red Hat
Component: glib2 (Show other bugs)
2.1
x86_64 Linux
medium Severity high
: ---
: ---
Assigned To: Matthias Clasen
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-06-08 12:24 EDT by James Willcox
Modified: 2007-11-30 17:06 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-10-19 15:22:24 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)
Test case (tarball) (365 bytes, application/octet-stream)
2004-06-21 12:46 EDT, James Willcox
no flags Details

  None (edit)
Description James Willcox 2004-06-08 12:24:17 EDT
glib2 is not compiled with -fPIC, so static linking fails.  This is at
least true with libgobject.
Comment 1 James Willcox 2004-06-08 14:43:13 EDT
Actually, I was wrong, it was one of our packages.  Sigh.
Comment 2 James Willcox 2004-06-08 23:37:13 EDT
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.
Comment 3 Matthias Clasen 2004-06-21 12:16:59 EDT
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
readelf -h

Am I missing something here ? What exactly is the problem you're seeing ?
Comment 4 James Willcox 2004-06-21 12:44:39 EDT
When trying to statically link to glib and create a shared object, I
get the following messages:

/usr/bin/ld:
/usr/lib/gcc-lib/x86_64-redhat-linux/3.2.3/../../../../lib64/libglib-2.0.a(gmessages.o):
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.
Comment 5 James Willcox 2004-06-21 12:46:14 EDT
Created attachment 101300 [details]
Test case (tarball)
Comment 6 Mike A. Harris 2005-01-21 16:07:30 EST
Matthias: Is it compiled with "-fPIC" or is it compiled with "-fpic"?
I'd check the rpm build logs directly to be sure.
Comment 7 RHEL Product and Program Management 2007-10-19 15:22:24 EDT
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:
http://www.redhat.com/security/updates/errata/

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.

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