Skip to content

Mac clang-format binary has a homebrew dependency #120820

@bhelyer

Description

@bhelyer

Hi there.
I don't use Homebrew on my systems. I tried to acquire clang-format from the LLVM 19.1 release on GitHub. Sadly, the clang-format (Along with every other executable) has a dependency to homebrew that isn't mentioned anywhere:

% otool -L ~/Downloads/LLVM-19.1.0-macOS-ARM64/bin/clang-format 
/Users/bernard/Downloads/LLVM-19.1.0-macOS-ARM64/bin/clang-format:
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1345.120.2)
	/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.12)
	/opt/homebrew/opt/zstd/lib/libzstd.1.dylib (compatibility version 1.0.0, current version 1.5.6)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1700.255.5)

Is this intentional?

Edit: I worked around this locally by compiling zstd, then modifying clang-format using install_name_tool.

For posterity:

install_name_tool -change /opt/homebrew/opt/zstd/lib/libzstd.1.dylib /Users/bernard/.local/lib/libzstd.1.dylib `which clang-format`

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions