From: Maynard J. <may...@us...> - 2009-04-29 16:31:06
|
Andi Kleen wrote: > On Mon, Apr 27, 2009 at 12:28:55PM -0500, Maynard Johnson wrote: >> Andi Kleen wrote: >>> The libbfd in recent suse always needs -lz added to link. >>> >>> This patch adds that to the configure script. >>> >>> Right now it requires to always have libz -- it would be probably >>> better to check if bfd really needs it, but that was beyond >>> my autoconf-fu. >> We should not force users to install a package that isn't really needed. I suspect you're encountering the same problem on SUSE that I had encountered with SLES 11. Initially, SLES 11's binutils-devel package provided neither a libbfd.so symbolic link nor a libbfd.la. Without either of those, oprofile's build (using libtool) was unable to automatically determine libbfd's dependency on libz. After some discussion, I got Novell to see the light and to add a libbfd.la to the binutils-devel package, which allowed oprofile to build successfully. Please check the binutils-devel package for SUSE and see if they're also missing the .la file. > > It doesn't have one. Yes it's a distro bug. But that doesn't change the fact that oprofile should > build on it anyways, so oprofile should have a workaround for that distribution bug. Otherwise all > the SUSE users can't build it. Generally speaking, I don't think any OSS project should be putting in workarounds for distro bugs, but since an easy, non-intrusive fix can be made for this, I agree that we shouldn't make users suffer. But as I said in an earlier reply, the fix you posted results in every user having to install libz whether they truly need it or not. I've attached a patch here that adds "-lz" to BFD_LIBS only if necessary. Can you test this out on the SUSE box where you saw this problem? Thanks. -Maynard > > -Andi > |