Red Hat Bugzilla – Bug 339931
shapelib build fails because of missing build-id flag to ld
Last modified: 2007-11-30 17:12:19 EST
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):
Steps to Reproduce:
On a Fedora 8 Test 3 system
1. rpmbuild --rebuild -bb shapelib-1.2.10-12.20060304cvs.src.rpm
fails in find-debuginfo.sh
Created attachment 232691 [details]
patch to add --build-id flag to LD
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.
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.
Have submitted the basic patch and tested the build. Will fix the Makefile to
use $(CC) instead of $(LD) in the next update