Bug 125539 - not compiled with -fPIC
Summary: not compiled with -fPIC
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 2.1
Classification: Red Hat
Component: glib2
Version: 2.1
Hardware: x86_64
OS: Linux
medium
high
Target Milestone: ---
Assignee: Matthias Clasen
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-06-08 16:24 UTC by James Willcox
Modified: 2007-11-30 22:06 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-10-19 19:22:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Test case (tarball) (365 bytes, application/octet-stream)
2004-06-21 16:46 UTC, James Willcox
no flags Details

Description James Willcox 2004-06-08 16:24:17 UTC
glib2 is not compiled with -fPIC, so static linking fails.  This is at
least true with libgobject.

Comment 1 James Willcox 2004-06-08 18:43:13 UTC
Actually, I was wrong, it was one of our packages.  Sigh.

Comment 2 James Willcox 2004-06-09 03:37:13 UTC
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 16:16:59 UTC
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 16:44:39 UTC
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 16:46:14 UTC
Created attachment 101300 [details]
Test case (tarball)

Comment 6 Mike A. Harris 2005-01-21 21:07:30 UTC
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 Program Management 2007-10-19 19:22:24 UTC
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.