dyninst: add dependency on libiberty#8806
Conversation
|
How does this relate to https://spack.readthedocs.io/en/latest/getting_started.html?highlight=binutils#binutils? Is this something that can be fixed by having a newer version of |
|
Adding @lee218llnl -- I am not sure this is something we want to do. It's always a pain to remember the right way to add |
|
I take it for granted that libiberty is already installed on our systems. It would be nice if we could add libiberty as a conditional dependence in the case where it is not there. I guess libiberty could be made a virtual package, but then users who already have a system install would be burdened with defining it as an external package. |
|
Binutils (or equivalent) has to be on the system, or else you can't Let me suggest another solution. I'd like to add a new package That way, I could build libiberty static + fPIC, and link that into The problem for dyninst is that you need libiberty built with -fPIC. |
|
@mwkrentel: I actually really like that idea. Do you mind doing the PR? One minor annoyance that you'll notice: if you do this, Spack will download the binutils tarball twice if you install both |
|
Great! Exactly the answer I wanted to hear! I already have a package.py file for this, at least one for my As for the multiple tar files, yes I've noticed that. I think there You don't want to put then in a trie by the first few letters of the You want to understand that this is an unusual case and that the other I suggest, create a per-package option that says, 'put my tar files After we get the libiberty package committed, would you like me to |
|
Sure.
I think you can actually do better than this. Spack has (currently |
The libiberty.a library from GNU binutils. Libiberty provides demangling and support functions for the GNU toolchain. This package uses the binutils tarfile but only builds the libiberty subdirectory. This is useful for other packages that want the demangling functions without the rest of binutils. Add variant 'fpic' to compile with -fPIC. Addresses some issues raised in PR spack#8806.
|
Ok, I've added PR #8912 for building libiberty solo from the binutils Libiberty always builds a static (.a) archive, but I added a variant I was able to edit the Dyninst recipe with just two things: add a Actually, it built cleanly for me even without the patch. I guess my Anyway, I believe this is a clean way of fixing your libiberty It also means that the libiberty code is built by spack, not from the Btw, any thoughts on possibly dropping support for Dyninst 8.x in This was my patch. You'll want to think about a more complete patch. ``--- a/var/spack/repos/builtin/packages/dyninst/package.py
@@ -77,6 +79,8 @@ class Dyninst(Package):
|
|
I guess my attempt at 'code' formatting didn't work out too well. |
|
And I should mention that I only tested the build for dyninst 'master'. |
|
To prevent github from formatting you can surround a text block with three backticks "`" on either side: |
|
You can also format specific blocks by specifying foo
+ bar
- baz |
* libiberty: new package The libiberty.a library from GNU binutils. Libiberty provides demangling and support functions for the GNU toolchain. This package uses the binutils tarfile but only builds the libiberty subdirectory. This is useful for other packages that want the demangling functions without the rest of binutils. Add variant 'fpic' to compile with -fPIC. Addresses some issues raised in PR #8806. * libiberty: change variant name to 'pic'. Allow libiberty to install the library in lib64 and don't try to copy it to lib.
|
My package for libiberty was merged this morning. This gives you a and then add And you can probably close issue #8728 as a duplicate. |
|
@sashanicolas @mwkrentel @adamjstewart @tgamblin @lee218llnl Just ran into this issue on a Power 9 system. Dyninst downloads a version of binutils that has a config.guess file from 2011 and configure can't figure out the build type for this newer platform. Adding: to the dyninst/package.py got around the issue. Thanks for the work on this! |
|
Can anyone accept or reject this? |
|
If it were me, I would also add -DIBERTY_LIBRARIES=%s to the cmake But I did test it with verbose mode and Dyninst does pick up the |
|
Merged! If you want to add @mwkrentel's suggestion later I'd be fine with that. |
* libiberty: new package The libiberty.a library from GNU binutils. Libiberty provides demangling and support functions for the GNU toolchain. This package uses the binutils tarfile but only builds the libiberty subdirectory. This is useful for other packages that want the demangling functions without the rest of binutils. Add variant 'fpic' to compile with -fPIC. Addresses some issues raised in PR spack#8806. * libiberty: change variant name to 'pic'. Allow libiberty to install the library in lib64 and don't try to copy it to lib.
* Adding dependency of libiberty to Dyninst package configuration. * Now it depends on libiberty package and not binutils.
It was missing and failing to compile. I'm not sure about the flag being passed as
depends_on('binutils+libiberty cppflags="-fPIC"', type='build')Someone should review that.