Hide Forgot
Description of problem: In RHEL 6, ld would resolve symbols in a library that were brought in from another library, but this is not the case in RHEL 7. Version-Release number of selected component (if applicable): binutils-2.23.52.0.1-55 How reproducible: Always Steps to Reproduce: 1. Download simple.c from https://github.com/markkilgard/glut/blob/master/progs/examples/simple.c 2. g++ simple.c -lglut -o simple Actual results: ~> g++ simple.c -lglut -o simple /usr/bin/ld: /tmp/ccPIpRiP.o: undefined reference to symbol 'glOrtho' /usr/bin/ld: note: 'glOrtho' is defined in DSO /lib64/libGL.so.1 so try adding it to the linker command line /lib64/libGL.so.1: could not read symbols: Invalid operation collect2: error: ld returned 1 exit status Expected results: Program links like it did in RHEL 6. Additional info: This is a regression from RHEL 6. Right now, the only solution that I know of is to explicitly add the second level libraries in the top level link. This is a painful process that will require a lot of changes to a lot of build processes out there.
Apparently, this was an intended change: https://fedoraproject.org/wiki/UnderstandingDSOLinkChange https://fedoraproject.org/wiki/Features/ChangeInImplicitDSOLinking I just looked through the release notes for RHEL 7 and didn't see anything about this, so could it please be documented, so others don't have to jump through all of the same hurdles that we do.
Correct. This was an intentional change. I thought I was documented somewhere already for RHEL 7. It might be in the developer guide. I'm reassigning to the doc folks to confirm its location.
Apologies, this totally slipped through the net. The change should've been documented in the Release Notes for the respective version of RHEL. Unfortunately, that didn't happen, and -- on top of that -- I forgot about this bug. Feel free to yell at me -- that shouldn't have happened. I'm now reassigning this to the Release Notes component, and we'll figure out how to deal with it. That is, we'll definitely add the info to the 7.2 Release Notes document, but we might also highlight it in the current or upcoming Release Notes. I'll leave that for Lenka's consideration.
Thank you all for the input. The doc text has been added to Release Notes for Red Hat Enterprise Linux 7.0 through 7.4 and will be carried over in the future minor releases (which we normally do with Deprecated Functionality descriptions).
Is it possible to add a linker flag to ES6 to enforce explicit DSO linking (as is default in ES7?)
(In reply to Nathaniel Groendyk from comment #16) > Is it possible to add a linker flag to ES6 to enforce explicit DSO linking > (as is default in ES7?) Yes. You can add the "--no-copy-dt-needed-entries" option to the linker command line. Or if you are invoking the linker via gcc/g++ then "-Wl,--no-copy-dt-needed-entries" should do the trick.