Skip to content
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

elftoolchain 0.7.1 (new formula) #104303

Closed
wants to merge 4 commits into from
Closed

Conversation

cho-m
Copy link
Member

@cho-m cho-m commented Jun 23, 2022

  • Have you followed the guidelines for contributing?
  • Have you ensured that your commits follow the commit style guide?
  • Have you checked that there aren't other open pull requests for the same formula update/change?
  • Have you built your formula locally with brew install --build-from-source <formula>, where <formula> is the name of the formula you're submitting?
  • Is your test running fine brew test <formula>, where <formula> is the name of the formula you're submitting?
  • Does your build pass brew audit --strict <formula> (after doing brew install --build-from-source <formula>)? If this is a new formula, does it pass brew audit --new <formula>?

Considering as replacement for libelf on macOS #103251

@cho-m cho-m added do not merge in progress Stale bot should stay away new formula PR adds a new formula to Homebrew/homebrew-core CI-no-fail-fast Continue CI tests despite failing GitHub Actions matrix builds. labels Jun 23, 2022
@cho-m cho-m mentioned this pull request Jun 23, 2022
6 tasks
Comment on lines 17 to 21
# TODO: add conflicts after merge
# on_macos do
# conflicts_with "libelf", because: "both install `libelf`"
# conflicts_with "dwarfutils", because: "both install `libdwarf`"
# end
Copy link
Member Author

@cho-m cho-m Jun 24, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently chose to link on macOS and keep keg-only on Linux. All packages that may conflict:

  • binutils - keg-only on macOS
  • elfutils - Linux-only
  • libelf - deprecated and planning to disable/remove soon
  • mono - due to msc binary, but I added workaround to only install into libexec and not link to bin. Alternatively, could just mark conflict.
  • dwarfutils - only maintained formula that actually conflicts in current state.

Another option is to install libelf*/libdwarf* into a subdirectory like LIBDIR=#{lib}/#{name} which may remove conflict with libelf & dwarfutils, but this may make it trickier to use by dependents/users as may need to manually add LDFLAGS and update RPATH

include.mkpath

# use libexec on macOS to avoid shadowing commands, which break dependent builds
args = %W[
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a PROGRAM_PREFIX argument we can use? That seems to make more sense since the binaries that ship with this formula are meant to work on ELF files, so they're not exactly equivalent to the system-provided ones (which is the case for your typical keg-only/unlinked binaries).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't see anything that we can easily use.

MacPorts manually does this (i.e. mv cmd to elftc-#{cmd} and symlink into libexec/elftoolchain/#{cmd}) and also uses subdirectories (e.g. lib/elftoolchain, include/elftoolchain, ...) to avoid conflicts https://github.com/macports/macports-ports/blob/master/devel/elftoolchain/Portfile#L69-L78

The above would allow us to remove all conflicts/keg-only while having main files installed into linked directories.

Another option is to install binaries under libexec/... and just symlink to bin/SOMEPREFIX-#{cmd} (e.g. either elftc-ar like MacPorts or full name like elftoolchain-ar).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine with doing any of that.

@cho-m cho-m mentioned this pull request Aug 3, 2022
22 tasks
@carlocab
Copy link
Member

I'm ok to merge this as-is or after renaming the binaries to be prefixed with elf- or similar.

@fxcoudert
Copy link
Member

The draft formula feels like a pile of patches and hacks. I'd say either they can be upstreamed, or this does not feel stable at all.

@SMillerDev SMillerDev removed the in progress Stale bot should stay away label Nov 6, 2022
@cho-m
Copy link
Member Author

cho-m commented Dec 11, 2022

Closing for now. Still hoping for a new release.

@cho-m cho-m closed this Dec 11, 2022
@cho-m cho-m added not merged PR was closed without being merged (and may need to be revisited) and removed do not merge labels Dec 11, 2022
@github-actions github-actions bot added the outdated PR was locked due to age label Jan 11, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 11, 2023
@cho-m cho-m deleted the elftoolchain branch October 30, 2023 22:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CI-no-fail-fast Continue CI tests despite failing GitHub Actions matrix builds. new formula PR adds a new formula to Homebrew/homebrew-core not merged PR was closed without being merged (and may need to be revisited) outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants