Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 881842 - When linking statically only against elfutils libs, one needs to provide complete path to static library
Summary: When linking statically only against elfutils libs, one needs to provide comp...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Developer Toolset
Classification: Red Hat
Component: doc-Release_Notes
Version: DTS 1.1 RHEL 6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 1.1
Assignee: Eliska Slobodova
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-11-29 16:41 UTC by Miroslav Franc
Modified: 2016-02-01 02:28 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-01-22 16:41:11 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Miroslav Franc 2012-11-29 16:41:27 UTC
Description of problem:

When linking against one of the elfutils libs with -static -l<library> it's not working because their suffix changed from a to ar (bug 865388).  When RHEL versions of elfutils static libraries are present the program is linked against them instead of dts versions.


Reproducer:

gcc -static somecfile.c -lelf

Without elfutils-libelf-devel-static present the reproducer above fails, with the package present it succeeds, but you can verify with strace that it's linking the program against RHEL version because linker assumes static libraries end with ".a".


Workaround is to provide complete path to the static library.

gcc -static somecfile.c /opt/rh/devtoolset-1.1/root/usr/lib/libelf.ar


I believe this should be documented for DTS 1.1.


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