-
-
Notifications
You must be signed in to change notification settings - Fork 12.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
binutils: Enable libiberty in the build #168531
binutils: Enable libiberty in the build #168531
Conversation
Thanks for contributing to Homebrew! 🎉 It looks like you're having trouble with a CI failure. See our contribution guide for help. You may be most interested in the section on dealing with CI failures. You can find the CI logs in the Checks tab of your pull request. |
I don't see how this fixes the issue. |
There's a very long list of linker errors with the default binutils, some from libiberty and some from libsframe and some from libopcodes. I just happened to paste the wrong ones in the original bug report :-) If you're interested, this is the project I'm trying to build: https://github.com/SimonKagstrom/emilpro/tree/next-gen it succeeds on MacOS after my change, and runs successfully. |
And I don't quite understand the potential conflict, perhaps you could elaborate on that? The libraries are built statically, at least on MacOS, so won't be loaded by gdb or any other binary. I'm very much a beginner at Homebrew though, so there might be something I misunderstand. But anyway, I'd like this change to be able to build my applications (and any other which uses meaningful parts of libbfd) on MacOS in addition to Linux. |
For reference, omitting libiberty when linking leads to thousands of lines of these linker errors:
among other symbols needed by libbfd. |
@fxcoudert any more comments? |
Bumping again @fxcoudert and @carlocab :-) As I said, I'm developing an application which uses libbfd as a library. It builds and runs beautifully on MacOS (as well as Linux) with this small patch, so I'd really think it would be splendid if it could be merged. |
|
But is it really so @fxcoudert? libiberty is a static library like the rest of the libbfd libraries:
so I don't really see how it could conflict? gdb runs just fine by the way:
The current recipe for binutils contains libbfd.a, which is practically unusable since it requires libiberty to do any real work. This patch just corrects that. Yes, I can obviously use my local patch to build, but it makes it quite a hassle for anyone else to use my application, or for that matter integrate it into a CI. I really hope you can reconsider this. |
HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>
, where<formula>
is the name of the formula you're submitting?brew test <formula>
, where<formula>
is the name of the formula you're submitting?brew audit --strict <formula>
(after doingHOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>
)? If this is a new formula, does it passbrew audit --new <formula>
?See Issue #168521 . To be able to use libbfd to develop programs, libiberty is needed for non-trivial tasks. This PR enables libiberty during the build.
Tested on my local x86_64 iMac.