Bug 339931 - shapelib build fails because of missing build-id flag to ld
Summary: shapelib build fails because of missing build-id flag to ld
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: shapelib
Version: rawhide
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Shawn McCann
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: fedora-ia64
TreeView+ depends on / blocked
 
Reported: 2007-10-19 15:49 UTC by Doug Chapman
Modified: 2007-11-30 22:12 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2007-10-28 02:01:33 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
patch to add --build-id flag to LD (843 bytes, patch)
2007-10-19 15:49 UTC, Doug Chapman
no flags Details | Diff

Description Doug Chapman 2007-10-19 15:49:02 UTC
Description of problem:
In fedora 8 the find-debuginfo script used by rpmbuild to make the debuginfo
package requires that all binaries had the build id info.  When linking is done
via gcc this happens automatically as --build-id is always passed to the linker
in recent versions of Fedora 8's gcc however when a build script calls ld
directly it must pass --build-id itself.

Attached is a patch for the shapelib Makefile to add this.

I am adding Roland to the cc list as he can answer any questions regarding why
--build-id is now needed.


Version-Release number of selected component (if applicable):
shapelib-1.2.10-12.20060304cvs.src.rpm

How reproducible:
100%

Steps to Reproduce:
On a Fedora 8 Test 3 system
1. rpmbuild --rebuild -bb shapelib-1.2.10-12.20060304cvs.src.rpm
2.
3.
  
Actual results:
fails in find-debuginfo.sh


Expected results:


Additional info:

Comment 1 Doug Chapman 2007-10-19 15:49:02 UTC
Created attachment 232691 [details]
patch to add --build-id flag to LD

Comment 2 Roland McGrath 2007-10-19 20:23:17 UTC
The right fix is to use $(CC) instead of $(LD) for creating the DSO.
In that example, you may have to rewrite -G -h foo as -shared -Wl,-soname,foo to
get those options down correctly.  The --build-id switch is not the only thing
missing/wrong in creating a DSO with ld directly, it's just the one we now
notice as a hard error.

Comment 3 Shawn McCann 2007-10-22 04:47:03 UTC
OK, I'll submit the basic fix for now and the more complete fix later this week.
Tried submitting the update tonight but apparently now need to use koji instead
of plague to run builds. Will sort this out tomorrow night.

Comment 4 Shawn McCann 2007-10-28 02:02:29 UTC
Have submitted the basic patch and tested the build. Will fix the Makefile to
use $(CC) instead of $(LD) in the next update


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